Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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:
  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 / fizzbuzz.js
Created January 11, 2012 07:51
OKCoder examples
// fizzbuzz.js
// Author: Triptych
// Study on fizzbuzz
// Note: You can run this code in your scratchpad. Just copy & paste.
//
// ignore the next line; it's for nerds.
if (!console && print) var console = {log:print};
// Correct "fizzbuzz" implementation.
@djtriptych
djtriptych / fizzbuzz.js
Created January 12, 2012 06:59
FizzBuzz implementations with no if/else statements.
// Do 'fizzbuzz' for numbers from 1 to n, no if/else
var fizzbuzz = function (n) {
var i = 0;
while (i++ < n)
console.log(i, !(i%15)&&'fizzbuzz'||!(i%5)&&'buzz'||!(i%3)&&'fizz'||i);
};
// Do fizzbuzz recursively (no loop structures)
var fizzbuzz_r = function (n) {
@djtriptych
djtriptych / build.sh
Created January 16, 2012 04:02
Tools I Use
We couldn’t find that file to show.
@djtriptych
djtriptych / dfw.sh
Created February 21, 2012 21:59
Download full DFW interview.
#!/usr/bin/env bash
# Part 1
cclive http://www.youtube.com/watch?v=N5IDAnB_rns
# Part 2
cclive http://www.youtube.com/watch?v=AlUmT_biDwI
# Part 3
cclive https://www.youtube.com/watch?v=LPIKae5qRwM
@djtriptych
djtriptych / splice.xml
Created March 29, 2012 22:00 — forked from anonymous/splice.xml
Splicer job
<job>
<!-- The source URL for the PDF -->
<source href="http://1ticket.com/viewpdf2.asp?bypassid=%7BA0ECAFB4-B1DF-4DE7-BB96-DABA1C91BDCC%7D" />
<!-- The callback URL to call when the job is complete -->
<option name="callback" value="http://1ticket.com/callback.asp" />
<!-- When true ignore case when searching for matches -->
<option name="ignorecase" value="true" />
<!-- When false, allow substring matches -->
<option name="exact" value="false" />
<!-- A list of zero or more splices -->