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
puts "Hello World!" |
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
require 'rubygems' | |
require 'patron' | |
50.times do | |
Thread.new do | |
print "+ Start\n" | |
session = Patron::Session.new | |
session.timeout = 30000 | |
session.connect_timeout = 30000 |
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
require 'rubygems' | |
require 'id3lib' | |
file=ARGV.join | |
filename=File.basename(file, '.mp3') | |
parts = filename.split('-') | |
artist = parts[1].strip | |
title = parts[2].strip |
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 | |
require 'bundler' | |
Bundler.setup( :utilities ) | |
Bundler.require( :utilities ) | |
class Value | |
include Ripple::Document | |
property :name, String |
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
$ cat /etc/riak/app.config | |
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ts=4 sw=4 et | |
[ | |
%% Riak Core config | |
{riak_core, [ | |
%% Default location of ringstate | |
{ring_state_dir, "/var/lib/riak/ring"}, | |
%% http is a list of IP addresses and TCP ports that the Riak |
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
gem list | grep '(' | awk ' { print $1, $2 } ' | sed 's/[\(\),]//g' | awk -F " " ' { print "gem \""$1"\",","\""$2"\"" } ' >> Gemfile |
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
require 'open-uri' | |
require 'rubygems' | |
require 'nokogiri' | |
doc = Nokogiri::HTML(open('http://git-scm.com/')) | |
latest = if doc.css('#ver').first.content =~ /v([0-9.]+)/ | |
$1 | |
else | |
abort "Borked" | |
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
class Model | |
CONST_A: 1 | |
CONST_B: 2 | |
CONSTS: [@CONST_A, @CONST_B] | |
m = new Model | |
# => Model | |
m.CONST_A | |
# => 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
$ ping -c 10 t.co | |
PING t.co (199.59.148.12) 56(84) bytes of data. | |
64 bytes from r-199-59-148-12.twttr.com (199.59.148.12): icmp_seq=1 ttl=47 time=152 ms | |
64 bytes from r-199-59-148-12.twttr.com (199.59.148.12): icmp_seq=2 ttl=47 time=151 ms | |
64 bytes from r-199-59-148-12.twttr.com (199.59.148.12): icmp_seq=3 ttl=47 time=152 ms | |
64 bytes from r-199-59-148-12.twttr.com (199.59.148.12): icmp_seq=4 ttl=47 time=151 ms | |
64 bytes from r-199-59-148-12.twttr.com (199.59.148.12): icmp_seq=5 ttl=47 time=152 ms | |
64 bytes from r-199-59-148-12.twttr.com (199.59.148.12): icmp_seq=6 ttl=47 time=152 ms | |
64 bytes from r-199-59-148-12.twttr.com (199.59.148.12): icmp_seq=7 ttl=47 time=152 ms | |
64 bytes from r-199-59-148-12.twttr.com (199.59.148.12): icmp_seq=8 ttl=47 time=152 ms |
OlderNewer