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 | |
# gem search, by hayden jones | |
# License: whatever | |
# usage: ./searchgems eventmachine | |
# prints all gems that contain eventmachine in the name | |
# if a lot of people use this, maybe somebody will fix rubygems so that gem search | |
# searches from cache instead of over the wire | |
puts `gem search ""`.split("\n").select { |line| line.include?(ARGV[0]) }.sort |
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 | |
# addwords.rb | |
# you know those posts that are like | |
# A+T+T+I+T+U+D+E= 100, or whatever? | |
# this program does that | |
# you need a file to pass to initialize | |
# that has one word per line | |
# most distros have a dict somewhere, just use that |
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 Cry | |
def initialize(pool) | |
@data = pool.split("") | |
end | |
def take(num) | |
res = "" |
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/ruby | |
# free 4 u 2 use | |
# hayden jones | |
# this can take any number of files as arguments | |
# eg: ./accwords junk.txt junk2.txt junk3.txt | |
# and accumulates each letter | |
# a = 1, b = 2 ... z = 26 | |
# it prints out the final result |
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 lua | |
-- hayden jones | |
-- MIT/X11 | |
-- junk.lua | |
-- just what it sounds like | |
junk = {} | |
function junk.randstream(str) |