Skip to content

Instantly share code, notes, and snippets.

@5310
5310 / ._advanced-git-cheatbook.md
Last active March 24, 2022 01:37
Advanced Git and GitHub Cheatbook #cheatsheet
@5310
5310 / ._node-cheatbook.md
Last active September 7, 2017 13:04
Node.js usage and package authoring cheatbook. #cheatsheet

I'll be collecting anything worthwhile or noteworthy I've encountered while learning to use and write Node.js packages here.

@5310
5310 / ._shell-cheatbook.md
Last active September 7, 2017 13:04
List of convenient shell commands. #cheatsheet

I'll be collecting any convenient snippets of shell commands I find and use in here.

@5310
5310 / _rng-murmur-seed-std-raised-cosine.md
Last active April 8, 2021 03:47
MurmurHash driven single-use seed-based pseudo-random number generator. And also a Standard Raised Cosine probabilistic distribution-based map.

This quick Gist shows how to use the fast non-cryptographic hash function MurmurHash to generate a single purely deterministic random numbers based off a of specific seed. I'm borrowing the perezd/node-murmurhash NPM port.

The idea is to deterministically recreate the same set of numbers from a small number of seeds with algorithms that internally use these seeds (in any order, note) by modifying them with constant but unique salts of their own. MurmurHash is fast enough for use in games (for me).

The other half of this Gist contains a standard form (because the custom bound and mode is pointless with a simple general-purpose map function, and the curvature cannot be varied anyway) of the "Gaussianesque" Raised Cosine Distribution, which is conveniently finite and enough for my example use. It maps uniform random numbers generated by the MurmurHash prng to the

@5310
5310 / ._krita-cheatbook.md
Last active September 7, 2017 13:04
Some convenient Krita tips tricks and workflows. #cheatsheet

Some convenient Krita tips tricks and workflows. May also contain non-Krita specific stuff, but as Krita is my main raster graphics software now, that is to be expected.

@5310
5310 / powerline-newline.theme.bash
Last active April 30, 2018 05:37
Powerline Newline – This is a simple edit of the Powerline theme for Bash It which adds some whitespace and linebreak for the prompt #dotfile
#!/usr/bin/env bash
THEME_PROMPT_SEPARATOR=""
THEME_PROMPT_TERMINAL=" » "
SHELL_SSH_CHAR=" "
SHELL_THEME_PROMPT_COLOR=30
SHELL_THEME_PROMPT_COLOR_SUDO=202
VIRTUALENV_CHAR="ⓔ "
@5310
5310 / powerline-naked-newline.theme.bash
Last active April 30, 2018 05:37
Powerline Naked Newline – This is a simple edit of the Powerline Naked theme for Bash It which adds some whitespace and linebreak for the prompt #dotfile
#!/usr/bin/env bash
THEME_PROMPT_SEPARATOR=""
THEME_PROMPT_SEPARATOR="›" # tty-safe
THEME_PROMPT_TERMINAL=" » "
SHELL_SSH_CHAR=" "
SHELL_SSH_CHAR="[ssh] " # tty-safe
SHELL_THEME_PROMPT_COLOR=32
SHELL_SSH_THEME_PROMPT_COLOR=208
@5310
5310 / ._userstyles-fira-code
Last active September 23, 2021 09:39
Fira Code, and sexy ligatures! #theme #userstyle
Userstyles to the monospace fonts on certain sites and the Firefox Devtools, etc., to Fira Code.
I don't write userstyles very often, so these may not be particularly effecient or sensible. But at least they work. Corrections welcome!
Stylish of Firefox (at least) allows importing userstyles from arbitrary urls. It doesn't auto-update though, but mays till be easier than pasting by hand? :shrug:
@5310
5310 / ._ramda-higher-order-fp-notes.md
Last active October 9, 2021 13:21
Higher-order functional programming notes with Ramda.js #cheatsheet

This document contains my notes about learning higher-order functional programming with Ramda.js and sometimes Sanctuary and any worthwhile implementations I've written in the process.

Use the Ramtuary REPL for tests.

Warning: Journeyman errors ahead!

@5310
5310 / keybase.md
Created March 17, 2016 07:49
#archive