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
package main | |
import ( | |
"bufio" | |
"code.google.com/p/go.net/websocket" | |
"github.com/kr/pty" | |
"io" | |
"flag" | |
"fmt" | |
"log" |
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 'cfoundry' | |
require 'json' | |
endpoint = 'https://api.run.pivotal.io' | |
app_name = 'my_app' | |
client = CFoundry::Client.get endpoint | |
client.login :username=> ENV['cf_user'], :password => ENV['cf_pass'] |
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
source 'https://rubygems.org' | |
gem 'rack' |
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 'json' | |
require 'uri' | |
require 'bundler' | |
require 'fog' | |
Bundler.require | |
Excon.defaults[:ssl_verify_peer] = false |
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 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'net/http' | |
require 'uri' | |
require 'fileutils' | |
server_range = (13..20) |
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 'rbvmomi' | |
vcenter_host = ARGV[0] | |
username = ARGV[1] | |
password = ARGV[2] | |
dc_name = ARGV[3] | |
rp_name = ARGV[4] |
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 'rubygems' | |
require 'open-uri' | |
require 'hpricot' | |
doc = Hpricot(open('http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2010-winter')) | |
(doc/"a").each do |x| |
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 'rubygems' | |
require 'open-uri' | |
require 'hpricot' | |
doc = Hpricot(open("http://www.timeanddate.com/worldclock/astronomy.html?n=136&month=12&year=2010&obj=sun&afl=-11&day=1")) | |
sunrise_rows = (doc/"table.spad tr") |
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 'rubygems' | |
require 'open-uri' | |
require 'hpricot' | |
dependencies = [:wget, :curl] | |
dependencies.each { |program| !`which #{program.to_s}`.empty? || STDERR.puts( "Requires #{program}") } | |
index_doc = Hpricot(open("http://confreaks.net/events/scotlandruby2011")) |
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
$(document).ready -> | |
$("#fb-root").append "<script type=\"text/javascript\" src=\"#{document.location.protocol}//connect.facebook.net/en_GB/all.js\" async=\"true\"></script>" | |
window.fbAsyncInit = () -> | |
FB.init | |
appId: '172659579460514' | |
status: true | |
cookie: true | |
xfbml: true |
OlderNewer