My Recent Pastes (71 and counting)
All Pasties (over 71 and counting)
Below are summaries of the 15 most recent pasties by Erik Kastner.
July 18, 2008
3:22PM EDT
by Erik Kastner
View more (34 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby require 'open-uri' require 'osx/cocoa' include OSX |
July 17, 2008
11:14AM EDT
by Erik Kastner
View more (75 lines)
1 2 3 4 5 |
sub float_conv_old {
my $hex_str = shift(@_);
$_ = $hex_str;
|
July 01, 2008
7:46PM EDT
by Erik Kastner
View more (55 lines)
1 2 3 4 5 |
require 'digest/md5' module DVDFingerprint extend self |
June 20, 2008
10:05PM EDT
by Erik Kastner
View more (29 lines)
1 2 3 4 5 |
<?php // PHP Weirdness. class Base extends PDO { public function __construct() { |
May 10, 2008
7:49PM EDT
by Erik Kastner
1 2 3 4 5 |
$("#badging_player").autocomplete("<%= find_camper_url %>", { onItemSelect: function(item) { $("#badging_player").focus(); } }); |
May 07, 2008
12:33PM EDT
by Erik Kastner
View more (15 lines)
1 2 3 4 5 |
Comments are Hard ================= * Technical * SPAM - The hardest. |
April 22, 2008
1:01AM EDT
by Erik Kastner
1 2 3 |
# One line ERB evaulation # use like: ruby -rerb -e "<this string>" < vendor/plugins/restful_authentication/generators/authenticated/templates/authenticated_system.rb > lib/authenticated_system.rb puts ERB.new(STDIN.read).result(proc{ file_name='player'; controller_singular_name='session'; class_name='Player'; proc{}}.call) |
April 13, 2008
7:24PM EDT
by Erik Kastner
View more (116 lines)
1 2 3 4 5 |
## Twitter bot in ruby using xmpp4r-simple (Jabber). ## Erik Kastner <kastner@gmail.com> ## twitter_bot.rb #!/usr/bin/env ruby |
April 09, 2008
9:50PM EDT
by Erik Kastner
1 2 3 4 5 |
## "one line" twitter bot ## Erik Kastner 2008-04-09 %w|rubygems xmpp4r-simple|.each {|r| require r} j = Jabber::Simple.new("user@gmail.com", "password"); loop { j.received_messages { |msg| puts msg.body } } |
April 09, 2008
9:49PM EDT
by Erik Kastner
1 2 3 4 5 |
## "one line" twitter bot ## Erik Kastner 2008-04-09 %w|rubygems xmpp4r-simple|.each {|r| require r} j = Jabber::Simple.new("user@gmail.com", "password"); loop { j.received_messages { |msg| puts msg.body } } |
April 01, 2008
5:05PM EDT
by Erik Kastner
View more (43 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby # Erik Kastner - git-r-up.rb # daemon to watch for changes in a directory and sync them to a directory under source control (like rails + git) # also adds and commits files to git (just git init in the FETCH_ROOT) |
March 27, 2008
1:13AM EDT
by Erik Kastner
View more (149 lines)
1 2 3 4 5 |
COLORS = { "AliceBlue" => "F0F8FF", "AntiqueWhite" => "FAEBD7", "Aqua" => "00FFFF", "Aquamarine" => "7FFFD4", |
March 26, 2008
11:49AM EDT
by Erik Kastner
View more (33 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby # Erik Kastner - git-r-up.rb # daemon to watch for changes in a directory and sync them to a directory under source control (like rails + git) # also adds and commits files to git (just git init in the FETCH_ROOT) |
March 18, 2008
7:51PM EDT
by Erik Kastner
View more (58 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby # */15 * * * * cd /path/to/script_dir/ && ruby twitter-retwitter.rb > /dev/null 2>&1 require 'net/http' |
February 29, 2008
3:02PM EDT
by Erik Kastner
View more (15 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby # Erik Kastner -- eznews speed downloader. Make sure u have axel (http://freshmeat.net/projects/axel/) # You also need to have two envrionment variables set (EZNEWS_USER and EZNEWS_PASS) # I just toss them in .eznews_creds and source it from .bash_profile |
Pastie