Skip to content

Instantly share code, notes, and snippets.

View jleedev's full-sized avatar
🧙‍♀️

Josh Lee jleedev

🧙‍♀️
View GitHub Profile
@jleedev
jleedev / gist:994429
Created May 27, 2011 00:46 — forked from kognate/gist:994423
tumbledry
class TumbleDRYer
def initialize filename
@hash = Hash.new 0
@links = Hash.new 0
previous = nil
open(filename).read.scan /\w+|\W+/ do |word|
unless previous.nil?
@links[[previous,word]] += 1
end
@hash[word] += 1
@jleedev
jleedev / say
Created April 8, 2011 20:19 — forked from tensorpudding/say
#!/bin/sh
# A very simplified version of OSX's say, using festival
# Usage: say [words]
if [ $# = 0 ]
then
echo "Usage: `basename $0` [words]"
exit 1
fi
@jleedev
jleedev / wallrotate.rb
Created February 9, 2010 08:39 — forked from tensorpudding/wallrotate.rb
Wallpaper rotation script
#!/usr/bin/env ruby
srand
command = ["/usr/bin/feh","--bg-scale"]
dir = ARGV[0] || "/home/michael/wall/default/"
choice = Dir[dir + "*.{jpg,png,jpeg}"].choice
system *([command] + [choice]) unless choice.empty?