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
$(function() { | |
"use strict"; | |
function log() { | |
window.console && console.log.apply(console, arguments); | |
} | |
var thing = $("#victim"); | |
var fns = { | |
// rotatable = c = (l | r | s); if r = s then nil -> movable else rotate(c) -> rotatable |
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
def _open name, mode | |
fn = "/tmp/.marshal.store.#{ name.to_s.gsub(/[^\w]/, '') }" | |
File.open(fn, mode) | |
end | |
# burry some_data => :significant_name | |
def b opts | |
data, name = opts.first | |
name = name.chr if name.is_a? Fixnum # in case of b stuff => ?a for 1.8.7 | |
(f = _open(name, 'w')).write((m = Marshal.dump(data))) |
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
importize = (mixin, module) -> | |
$.extend($.extend({}, mixin), module) |
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 ruby | |
$, = ' ' | |
class Digits | |
RAW = [ | |
" 111 ", | |
"4 2", | |
"4 2", | |
" 333 ", |
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
r() { | |
if [ -z "$1" ]; then | |
rails | |
return | |
fi | |
case "$1" in | |
start) | |
shift | |
rails s -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
#!/bin/zsh | |
surl="http://www.reddit.com/r/jazz/search?q=%s&restrict_sr=on&sort=relevance&t=all" | |
url="http://www.reddit.com/r/jazz/" | |
find() { | |
curl -s $1 | ack -o "https?://(www.)?youtu[^'\"&]+" | |
} | |
parse() { |
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 ruby | |
require 'rubygems' | |
require 'pry' | |
require 'nokogiri' | |
require 'mini_magick' | |
require 'digest' | |
W = 412 | |
H = 600 |
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
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <assert.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
#define SHMLEN sizeof(int) * 2 | |
#define TIMES 30 |
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 ruby | |
require 'matrix' | |
module Drawing | |
ZOOM = 0.5 | |
SCALE = 40 | |
def clear | |
@@clear ||= %x{clear} |
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 ruby | |
# encoding: utf-8 | |
require 'nokogiri' | |
require 'pry' | |
def wrap(title, content) | |
<<-TEMPLATE | |
<!DOCTYPE html> | |
<html> |