Skip to content

Instantly share code, notes, and snippets.

View ntalbott's full-sized avatar
💻
Writing and Coding

Nathaniel Talbott ntalbott

💻
Writing and Coding
View GitHub Profile
@ntalbott
ntalbott / bootstrap.lua
Last active December 12, 2015 05:08
ComputerCraft Gist Filesystem
h = fs.open("/gfs", "w"); h.write(http.get("https://gist.github.com/ntalbott/4719172/raw/gfs.lua").readAll()); h.close();
@ntalbott
ntalbott / test
Last active December 12, 2015 05:08
Test
This is a test gist.
Revised.
@ntalbott
ntalbott / hipchat-transcript
Created January 25, 2013 15:54
A handy little script to create a text-based transcript from a Hipchat room.
#!/usr/bin/env ruby
require "httparty"
def usage!
puts "Usage: hipchat-transcript <token> <room id> [date]"
exit!
end
TOKEN = (ARGV[0] || usage!)
@ntalbott
ntalbott / Gemfile
Created December 12, 2012 00:42
Example of Relix that indexes the file system. https://github.com/ntalbott/relix
source "https://rubygems.org"
gem "relix"
gem "ruby-progressbar"
The Raleigh.rb mailing list welcomes on-topic job postings that are
targeted specifically to our eclectic audience. Postings from
professional recruiters are held to a VERY high standard of relevancy,
while postings from regular group participants are given wide leeway.
In general: keep it short, keep it relevant, and keep the volume
reasonable. Those violating this policy will be warned once, then
removed from the list.
Finally, please put [JOB] in the subject line of all job postings to help
@ntalbott
ntalbott / capybara_helpers.rb
Created September 8, 2012 23:16
Field enabler for the rack-test Capybara driver
module CapybaraHelpers
def enable_fields(*fields)
fields.each do |field|
page.find_field(field).base.native.remove_attribute("disabled")
end
end
end
World(CapybaraHelpers)
@ntalbott
ntalbott / gist:3628860
Created September 5, 2012 01:22
Filter Starcraft Benchmarks
  1. 50 Workers @ 10 minutes
  2. 3:45 Natural CC started
@ntalbott
ntalbott / spreedly-core-api.txt
Created September 3, 2012 02:31 — forked from calvincorreli/spreedly-core-api.txt
Overview of Spreedly Core API endpoints
OPTIONS https://spreedlycore.com/v1/gateways.xml => list supported gateways
POST https://spreedlycore.com/v1/gateways.xml => add a gateway
GET https://spreedlycore.com/v1/gateways.xml => list all added gateways
PUT https://spreedlycore.com/v1/gateways/token.xml => Update gateway
PUT https://spreedlycore.com/v1/gateways/token/redact.xml => Remove sensitive gateway data
POST https://spreedlycore.com/v1/gateways/token/purchase.xml => purchase - supply a payment method token also
POST https://spreedlycore.com/v1/gateways/token/authorize.xml => authorize - supply a payment method token also
POST https://spreedlycore.com/v1/payment_methods => Capture credit card from form - transparent redirect magic
GET https://spreedlycore.com/v1/payment_methods.xml => list all retained credit cards
curl -u $TOKEN:X \
-H 'Content-Type: application/xml' \
-d '
<invoice>
<title>T-Shirts</title>
<customer-id>44</customer-id>
<email>[email protected]</email>
<return-url>http://example.com/return</return-url>
<line-items>
<line-item>
@ntalbott
ntalbott / gist:3493052
Created August 27, 2012 22:46
Riak error
ntalbott@joshua:~/git/spreedly$ vendor/riak/rel/riak/bin/riak console
Exec: /Users/ntalbott/git/spreedly/vendor/riak/rel/riak/erts-5.8.4/bin/erlexec -boot /Users/ntalbott/git/spreedly/vendor/riak/rel/riak/releases/1.1.1/riak -embedded -config /Users/ntalbott/git/spreedly/vendor/riak/rel/riak/etc/app.config -pa ./lib/basho-patches -args_file /Users/ntalbott/git/spreedly/vendor/riak/rel/riak/etc/vm.args -- console
Root: /Users/ntalbott/git/spreedly/vendor/riak/rel/riak
Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:64] [hipe] [kernel-poll:true]
=INFO REPORT==== 27-Aug-2012::18:39:50 ===
alarm_handler: {set,{{disk_almost_full,"55879602"},[]}}
=INFO REPORT==== 27-Aug-2012::18:39:50 ===