Paul's Programming Notes     Archive     Feed     Github

Firefox - arkenfox user.js

I recently learned about the arkenfox user.js project, which is an easy way to update Firefox’s settings to improve security and privacy.

It suggests you add your own overrides to the bottom of the file. I added these:

/* re-enable location bar using search ***/
user_pref("keyword.enabled", true); 

/* override recipe: enable session restore ***/
user_pref("browser.startup.page", 3); // 0102
user_pref("browser.privatebrowsing.autostart", false); // 0110 required if you had it set as true
user_pref("places.history.enabled", true); // 0862 required if you had it set as false
user_pref("browser.sessionstore.privacy_level", 0); // 1003 optional [to restore cookies/formdata]
user_pref("network.cookie.lifetimePolicy", 0); // 2801  optional [so cookies persist]
user_pref("privacy.clearOnShutdown.history", false); // 2811
user_pref("privacy.cpd.history", false); // 2812 to match when you use Ctrl-Shift-Del

Comparing Tags On Different Branches With GitHub

I recently compared two tags on github using the “compare” dropdown, and it displayed unexpectedly few changes between the tags. However, one of the tags was from a different branch and by default GitHub doesn’t show the other differences between the branches. To see other differences besides the tagged commit compared to the main/master branch, you need to change the “…” in the compare url to “..”.

Now, I’m thinking it’s probably a good idea to avoid making tags from non-master/main branches.

More info: GitHub Docs

Python - Singleton

I saw some interesting Python singleton code in the wild today. It was used for a Redis connection pool.

It looked like this.

ssh-keygen -R hostname

I’ve been manually removing the line from .known_hosts when I saw this message:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:<key>.
Please contact your system administrator.
Add correct host key in /Users/<user>/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/<user>/.ssh/known_hosts:85
ECDSA host key for <ip> has changed and you have requested strict checking.
Host key verification failed.

Today I found out about this command to remove entries from known_hosts: ssh-keygen -R hostname

Raspberry Pi 1U Server

I’ve been working on a power efficient 1U server made with Raspberry Pi’s to take advantage of cheap server colocation options:

More details: Github