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
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
#!/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
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
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
$(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
#!/bin/bash | |
while sleep 0.5; do vim --startuptime "$@" >(./startup-info) +qall; done | |
# usage: ./collect-times | |
# Running this will collect startup times in `times' directory. | |
# It will run it multiple times so that the averages start converging. | |
# Whenever you remove a plugin, it gets stored as a different version, | |
# which will be shown at 'watch ./watcher'. |
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 | |
# self(44aa 78ea 455d), /03.09.2013./ | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
import Control.Monad.Loops | |
import System.Random | |
specifify :: Int -> Int | |
specifify i = i `mod` 100 | |
use :: (Int, StdGen) -> IO StdGen | |
use (i, g) = (putStrLn $ "New rand int: " ++ show (specifify i)) >> return g | |
main = getStdGen >>= iterateM_ (use . random) |
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
/* | |
Code is taken from scrot, and is currently having some | |
redundant code in it. | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to | |
deal in the Software without restriction, including without limitation the | |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
sell copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |