Skip to content

Instantly share code, notes, and snippets.

Getting after it

Ayooluwa ayoisaiah

Getting after it
View GitHub Profile
atruskie / terminal-keybind.ahk
Last active Jan 15, 2021
AutoHotkey script to bind Win+~ keyboard shortcut to Windows Terminal
View terminal-keybind.ahk
#SingleInstance force
SendMode Input
DetectHiddenWindows, on
SetWinDelay, 0
terminal := WinExist("ahk_exe WindowsTerminal.exe")
if (terminal)
h0bbel / sources.list
Last active Jan 25, 2021
/etc/apt/sources.list for Ubuntu 18.04.1 LTS Bionic Beaver
View sources.list
# See for how to upgrade to
# newer versions of the distribution.
deb bionic main restricted
# deb-src bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb bionic-updates main restricted
# deb-src bionic-updates main restricted
MarkTiedemann /
Last active Apr 24, 2020
An Easier Way to Enforce Required Parameters in ES6

An Easier Way to Enforce Required Parameters in ES6

Expands on Handling required parameters in ECMAScript 6 by Axel Rauschmayer.

The idea (which is credited to Allen Wirfs-Brock) is, in essence, to use default parameter values to call a function which throws an Error if the parameter is missing:

const throwIfMissing () => { throw new Error('Missing parameter') }
mikelehen / generate-pushid.js
Created Feb 11, 2015
JavaScript code for generating Firebase Push IDs
View generate-pushid.js
* Fancy ID generator that creates 20-character string identifiers with the following properties:
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
cobyism /
Last active Jan 25, 2021
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).


tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a