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
class FixBorders | |
def go_horse! | |
all_images = load_image_list | |
all_images.each do |image| | |
# download original | |
# convert different sizes | |
# upload to S3 | |
end | |
end |
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 | |
require 'rational' | |
number = ARGV[0].to_i | |
current = 0 | |
phi = 0 | |
while (current < number) | |
if (number.gcd(current) == 1) |
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 | |
if ARGV.length != 2 | |
print "syntax: ./Ord prime number\n" | |
exit | |
end | |
number = ARGV[1].to_f | |
number_print = ARGV[1].to_f | |
prime = ARGV[0].to_f |
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 | |
class String; def ord; self[0]; end; end | |
phrase = "tobeornottobethatisthequestion" | |
keyword = "hamlet" | |
len = keyword.length | |
keyindex = 0 |
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 | |
p = 1373 | |
B = 805 | |
i = 1 | |
brute = 1 | |
target = 397 | |
while (brute != target) | |
brute = B ** i % p |
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 dsTweets = new Ext.data.JsonStore({ | |
fields : [{name: 'text', type: 'string'}], | |
proxy : new Ext.data.ScriptTagProxy({ | |
url : 'http://twitter.com/status/user_timeline/buccolo.json?count=10' | |
}) | |
}); | |
dsTweets.load({ callback: function(){ | |
var tweets = store.query(''); |
NewerOlder