This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# saran = clear wrap. get it? | |
def saran(f): | |
def g(*args, **kwargs): | |
d = f(*args, **kwargs) | |
try: | |
_clear = d.pop('clear') | |
except KeyError: | |
return d | |
d['clear'] = _clear | |
return d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
db - Save and load data models in Redis. | |
~~ | |
""" | |
# TODO: Key object to manage separating class name from key name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
}; |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Scrape site recursively from starting point (don't follow links back towards root). | |
wget <url> -r |
OlderNewer