Author Archives: bullgare
BackBeat Pro not charging. Fix
Once I’ve run into a problem with my lovely Plantronics BackBeat Pro. It decided not to charge with any given cable or power source. It just didn’t react on plugged in a cable, while blinking with red lamp saying that it needs to be charged. After googling and dancing around it, I’ve found a solution: …
Free smart TV channels
Install this application on your TV http://forkplayer.tv/smart-tv/forkplayer/#install. After that start the application, open SMILE BY → Onliner → SEGAZ → IPTV → OnlyBest.
git squash variants
If you just want to squash all commits into one. 1. The simplest way:
1 2 3 4 |
git checkout -b <temp-branch> origin/master git merge --squash origin/<branch-with-changes-you-need> git commit -m 'commit message' git push origin refs/heads/<temp-branch>:<new-branch> |
https://stackoverflow.com/a/5309051 If you have a message like ‘error: failed to push some refs to’, add —force to the last command.
Check ssl certificates on a host
1 |
openssl s_client -connect your-host:443 |
If it says something like gethostbyname failure then try following. It needs socat, which can be installed on macOs like this — brew install socat. Then in one terminal open
1 |
socat TCP4-LISTEN:10443,fork TCP6:your-host:443 |
and in another terminal:
1 |
openssl s_client -crlf -connect 127.0.0.1:10443 |
Webstorm deployment is not working on modern mac and IPv6
First of all, get all interfaces:
1 2 3 |
networksetup -listallhardwareports # or ifconfig |
Possible solutions: 1. It’s working but you should do it after every login to your mac:
1 |
sudo ifconfig en7 down # you should check what interface inactivation works for you |
2. In webstorm: Help → Edit custom VM options
1 2 |
-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true |
Help → Edit custom properties
1 |
deployment.macOs.bannedInterfaces=awdl0,utun0,utun1,utun2,utun3 |
You should also check what interfaces work for you.
Check availability and version of a package in Ubuntu
1 2 |
apt-cache search <name> apt-cache policy <name> |
SRE: SLA vs SLO vs SLI
SLA — Service Level Agreement. It’s more about contracts. SLI — Service Level Indicator. It’s some parameters that should be measured and which should be kept in some range. SLO — Service Level Objective. It says how often SLI could fail. Like SLI should be true for 99.9% of the time. Video from Google’s engineer …
Socks5 proxy for telegram
It’s the easiest one you can install on your VPS server. It’s a docker container. https://github.com/schors/tgdante2 You could use VPN for that but it will send all traffic through your VPN endpoint which is not fast. Socks5 proxy uses much less resources and this one is only applicable for telegram now.
React, redux and redux-thunk with typescript
I tried it and it looks strange, verbose and painful. But if you want to try it, please take a look at: https://github.com/piotrwitek/react-redux-typescript-guide https://levelup.gitconnected.com/react-and-redux-with-typescript-da0c37537a79 (together with https://github.com/JonJam/react-redux-ts/tree/68e8cca4a6e6214b4acb030cf3fdb3321b636085/src)
List of resources to prepare for the interview
Mock Interviews interviewing.io (beta), Free Pramp, Free CareerCup, Paid Algorithms Cracking the Code Interview, Book byte by byte, Website and YouTube CS50, YouTube Interview Cake, Website HackerRank, Website LeetCode, Website Operating Systems Operating System Concepts, Book Architecture Design Intro to Architecture and Systems, YouTube Behavioural Intro to Behavioural Interviews, YouTube Original article with explanations: https://medium.freecodecamp.org/software-engineering-interviews-744380f4f2af