2017
You can get a free BNC account on EliteBNC…
You can get a free BNC account on EliteBNC. It runs ZNC which you can run yourself if you have a spare VPS. All you need to do is login on FreeNode (you can use their webchat if you don’t have a client handy) and join #EliteBNC channel and issue the following command command: !request <username> freenode <your email id> and you will get the settings in your email if your request is approved.
SOCKS Proxy
I used to use the `-L` flag in SSH but today I was going through the man page and saw the `-D` flag. It can be used to make a SOCKS5 proxy easily. For eg. `ssh -f -N -D 8080 [email protected]` Also, a big thanks to EliteBNC.org for giving a free ZNC node. Feels great to be back on IRC after so long.
Today my phone was acting strange as it…
Today my phone was acting strange, as it immediately crashed after opening the notification drawer. I was baffled with why this was happening as my phone was working perfectly fine until yesterday. Finally, I had no option but to attempt to see the logs using adb shell logcat and try to figure out what was going on. There was a peculiar error message relating to starting an event a 8:00 AM and I was completely unable to figure out what was causing it.
Checking if a number is prime using Regex
def is_prime(n): return not re.match(r'^.?$|^(..+?)\1+$', '1'*n) This works by first converting the number to unary, i.e. 5 will be ‘11111’ and 3 will be ‘111’ and so on. First, it tries to match 0 or 1 in the LHS and then uses backreferences to try and match multiples of 2, 3, 4 and so on until a match is found or string length is exceeded. For a deeper analysis please read: https://iluxonchik.
Notes on Regex
I’m going to use python. Regex can be used by using the re library. You should not refer to this post as these are just notes, it would be better to follow the actual documentation of the library. To use regex, which uses backslashes \ we must use raw python strings like r"\n". . matches anything but a newline \d matches 0-9 while \D matches anything but digits. Similarly, \w matches word chars.
How to Sign PGP Keys using GPG
xkcd #364: Responsible Behavior I participated in ApacheCon EU 2016’s PGP Keysigning Party recently. Being a newbie about PGP keysigning, I made the mistake of not sending the keys back to the key server after signing as I was using a GUI tool called Seahorse. So today, after realizing this from searching my key on MIT’s PGP keyserver, I decided to do it again and send the keys this time using GnuPG.