Skip to content

Instantly share code, notes, and snippets.

View CerebralDatabank's full-sized avatar
💭
"Authors MUST NOT implement bugs." — RFC 9225 § 4.1

Gopal Othayoth CerebralDatabank

💭
"Authors MUST NOT implement bugs." — RFC 9225 § 4.1
View GitHub Profile
\documentclass[beamer,tikz]{standalone}
% Define some custom colors
\definecolor{seaborncolorblind1}{RGB}{1,115,178}
\definecolor{seaborncolorblind2}{RGB}{222,143,5}
\definecolor{seaborncolorblind3}{RGB}{2,158,115}
\usetikzlibrary{overlay-beamer-styles}
\usetikzlibrary{calc,math}
@kkiris
kkiris / ^unlocking-prefs.md
Last active October 30, 2026 09:34
Unlocking preferences in Firefox forks

It is possible to unlock about:config preferences in Firefox forks. This is done at the installation level, so it is not customizable per-profile. I will be using Zen Browser as my example here, but this works in other Firefox forks as well.

First, navigate to your installation directory (e.g., C:\Program Files\Zen Browser). In this directory, create a text file and give it the .cfg extension. In this example, I've named mine zen.cfg. Type // on thee first line, then for each pref to unlock, add a line with "unlockPref("example.prefname");", replacing example.prefname with the name of the preference you'd like to unlock. If you'd like to set a default value for that preference, you may do so by adding a line with defaultPref("example.prefname", value);, replacing value with your desired default value. You may use // at the beginning of a line if you'd line to add comments

Here's my example for unlocking URLbar suggestion preferences in Zen Browser:

// SKIP THIS FIRST LINE
@Nemiari
Nemiari / README.md
Last active October 20, 2026 02:28
Restore Context Menu icons in Zen Browser >=1.12.10b

Place the file in your profile's chrome folder and import it by adding this line to the beginning of userChrome.css:

@import url("./restore-context-icons.css");

It is important that this line is placed before any rules defined in the file, or the import is invalid.

Once this is done, restart Zen Browser and the changes should apply.


@chowder
chowder / README.md
Last active November 7, 2026 12:14
Exporting Microsoft Authenticator TOTP secrets

Background

Workplaces may enforce TOTP 2FA to be enabled Office 365 accounts, which require the Microsoft Authenticator app to be installed.

Regular TOTP applications (such as Aegis, Authy, or LastPass) cannot be used as Microsoft uses a proprietary scheme called phonefactor. Furthermore, the application requires Google Services Framework (GSF) to be installed (likely to provide device notifications), and will refuse to work when it is not present on the device.

Forunately, after the registration is complete, the underlying mechanism the app uses to generate TOTP codes is regular otpauth, and its secrets can be exported with a little bit of effort.

Extracting the keys

@EDais
EDais / colourTemperature.js
Created August 30, 2017 14:50
JavaScript port of getRGBFromTemperature
"use strict";
const clamp = (num, min, max) => num < min ? min : num > max ? max : num;
/** Given a temperature (in Kelvin), estimate an RGB equivalent
* @param {number} tmpKelvin - Temperature (in Kelvin) between 1000 and 40000
* @returns {{r:number, g:number, b:number}} - RGB channel intensities (0-255)
* @description Ported from: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
*/
exports.getRGBFromTemperature = function(tmpKelvin) {
@staltz
staltz / introrx.md
Last active November 17, 2026 12:40
The introduction to Reactive Programming you've been missing