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 / .gitignore
Created February 15, 2012 21:30
campfire transcript export
exports
@ntalbott
ntalbott / .gitignore
Created February 16, 2012 19:06
Downloads all of your Basecamp files for archiving
exports
@ntalbott
ntalbott / osxvpnfix
Created August 1, 2012 15:45
Extends the connection timeout for a particular VPN
#!/usr/bin/env ruby
def usage(error=nil)
puts "Usage: sudo osxvpnfix </var/run/racoon/ip.conf> [lifetime]"
puts "Error: #{error}"
exit 1
end
usage("Must be run as root.") unless(`whoami`.strip == "root")
@ntalbott
ntalbott / dnsimpleupdate
Created August 25, 2012 19:33
A DNSimple DDNS updater for DD-WRT
#!/bin/sh
EMAIL=
API_TOKEN=
DOMAIN_ID=
RECORD_ID=
IP=$( nvram get wan_ipaddr )
OUTPUT='-s -o /dev/null'
usage()
@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 ===
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 / 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
@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 / 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)
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