Skip to content

Instantly share code, notes, and snippets.

// Converting to/from roman numerals (1-4999)
const map = {
1: 'I',
5: 'V',
10: 'X',
50: 'L',
100: 'C',
500: 'D',
1000: 'M',
@djtriptych
djtriptych / PTK.md
Last active January 31, 2023 19:05
ptk notes

PTK

TOC

  • Tech Overview

    • Publishing pipeline. What happens when you click "publish"
  • Requirements to publish.

@djtriptych
djtriptych / setup.bash
Last active July 26, 2018 20:33
JS Playground
# Basic directory structure
mkdir -p dist src
# Install and use the latest node 10.x.x
nvm install 10
nvm use 10
# Create package.json
node init -y
@djtriptych
djtriptych / entities.json
Last active March 29, 2017 22:24
Parsing HTML entities
[
{
"category": "Cc",
"entities": [
"Tab"
],
"set": "mmlextra",
"title": "CHARACTER TABULATION",
"dec": "#9",
"hex": "#x00009",
  1. The Blessing Song — Gary Bartz
  2. Come in to Knowledge — Ramp
  3. Africano — Earth Wind & Fire
  4. My People… Hold On — Eddie Kendricks
  5. King Heroin — James Brown
  6. Lord Help Me — Donny Hathaway
  7. Blessed — The Emotions
  8. See the Light — Earth Wind & Fire
  9. When There is No Sun — Sun Ra
  10. Visions (Inner Visions Live) — Stevie Wonder
@djtriptych
djtriptych / out.json
Last active August 29, 2015 14:22
vim-pull-requests
[{"url":"https://api.github.com/repos/AltSchool/ops-ui/pulls/102","id":37511076,"html_url":"https://github.com/AltSchool/ops-ui/pull/102","diff_url":"https://github.com/AltSchool/ops-ui/pull/102.diff","patch_url":"https://github.com/AltSchool/ops-ui/pull/102.patch","issue_url":"https://api.github.com/repos/AltSchool/ops-ui/issues/102","number":102,"state":"open","locked":false,"title":"Feature/exports","user":{"login":"djtriptych","id":1135131,"avatar_url":"https://avatars.githubusercontent.com/u/1135131?v=3","gravatar_id":"","url":"https://api.github.com/users/djtriptych","html_url":"https://github.com/djtriptych","followers_url":"https://api.github.com/users/djtriptych/followers","following_url":"https://api.github.com/users/djtriptych/following{/other_user}","gists_url":"https://api.github.com/users/djtriptych/gists{/gist_id}","starred_url":"https://api.github.com/users/djtriptych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djtriptych/subscriptions","organizations_url":"https:
@djtriptych
djtriptych / gist:18ded299d1bc5287b64b
Created January 18, 2015 03:24
Stupid Bash Tricks.
# Scrape site recursively from starting point (don't follow links back towards root).
wget <url> -r
@djtriptych
djtriptych / README.md
Last active August 29, 2015 14:11 — forked from mbostock/.block

On hover, these arcs extend outward slightly and darken. Increasing the outer radius of the hovered arc temporarily exaggerates its area, but is useful for emphasis.

Note that the padding between adjacent arcs remains constant when arcs extend or contract. This is achieved by specifying an explicit arc.padRadius that is the same for all arcs, rather than relying on the default behavior which depends on the arc’s inner and outer radii.

@djtriptych
djtriptych / autocurry
Last active August 29, 2015 14:10
Javascript autocurry
var autocurry = function (f) {
return function () {
var args = Array.prototype.slice.call(arguments, 0);
return args.length < f.length ?
autocurry(args.reduce(function (g, arg) {return g.bind(null, arg)}, f)) :
f.apply(null, args);
}
};
@djtriptych
djtriptych / rdb.py
Created April 29, 2013 16:30
Simple Redis-backed ORM
#!/usr/bin/env python
"""
db - Save and load data models in Redis.
~~
"""
# TODO: Key object to manage separating class name from key name.