This file contains hidden or 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 "relix" | |
| gem "ruby-progressbar" |
This file contains hidden or 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 "httparty" | |
| def usage! | |
| puts "Usage: hipchat-transcript <token> <room id> [date]" | |
| exit! | |
| end | |
| TOKEN = (ARGV[0] || usage!) |
This file contains hidden or 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
| This is a test gist. | |
| Revised. |
This file contains hidden or 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
| h = fs.open("/gfs", "w"); h.write(http.get("https://gist.github.com/ntalbott/4719172/raw/gfs.lua").readAll()); h.close(); |
This file contains hidden or 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
| function select(slot) | |
| assert(slot <= 16) | |
| turtle.select(slot) | |
| return turtle.getItemCount(slot) > 0 | |
| end | |
| function waitFor(slot) | |
| while not select(slot) do | |
| os.sleep(1) | |
| end |
This file contains hidden or 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
| module Kernel | |
| def backtrace | |
| caller | |
| end | |
| end |
This file contains hidden or 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
| if ENV["STITCH"] == "1" | |
| require "rack-proxy" | |
| class Stitcher < Rack::Proxy | |
| EXACT = %w(/ /terms /privacy) | |
| PREFIX = %w(/pricing /about /support /gateways /assets) | |
| def initialize(app) | |
| @app = app | |
| end |
This file contains hidden or 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 'potluck/recipes/smoke' | |
| task :smoke_test do | |
| failed_tests = [] | |
| curl_result = `curl -s -w "%{http_code}" https://id.spreedly.com/signin -o /dev/null` | |
| failed_tests << "Id smoke test FAILURE." unless (curl_result == "200") | |
| curl_result = `curl -s -w "%{http_code}" https://spreedly.com/ -o /dev/null` | |
| failed_tests << "Public smoke test FAILURE." unless (curl_result == "200") |
This file contains hidden or 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 "pathname" | |
| require "fileutils" | |
| require "json" | |
| require "digest/sha1" | |
| require "awesome_print" |
This file contains hidden or 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
| response = store(cc) | |
| token = response.authorization #=> "#{payer_ref}:#{card_ref}" | |
| update(token, {...}) |