Skip to content

Instantly share code, notes, and snippets.

View zackchandler's full-sized avatar

Zack Chandler zackchandler

  • Airbnb
  • San Francisco Bay Area
View GitHub Profile
<?xml version="1.0"?>
<ReceivePaymentQueryRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE" retCount="INTTYPE" iteratorRemainingCount="INTTYPE" iteratorID="UUIDTYPE">
<ReceivePaymentRet>
<!-- optional, may repeat -->
<TxnID>IDTYPE</TxnID>
<!-- optional -->
<TimeCreated>DATETIMETYPE</TimeCreated>
<!-- optional -->
<TimeModified>DATETIMETYPE</TimeModified>
<!-- optional -->
execute 'custom-install' do
command '/data/myapp/custom_install.sh'
end
SIZES = Hash.new(0) # return zero for any unknown size
SIZES[:small] = 1
SIZES[:medium] = 2
SIZES[:large] = 3
class Plane
attr_accessor :type, :size
attr_reader :priority
def initialize(options={})
~/dev $ git clone http://github.com/ry/node.git
Initialized empty Git repository in /Users/zackchandler/dev/node/.git/
got 75f0cf471af3c029290d4bf55c34d1fc470ef600
walk 75f0cf471af3c029290d4bf55c34d1fc470ef600
Getting alternates list for http://github.com/ry/node.git
Getting pack list for http://github.com/ry/node.git
Getting index for pack a95bae93307c7b102d13cf6c0f110e29ecde36aa
Getting index for pack 3d8b7812c7467dcf06fbd126680512baa076c00f
Getting index for pack 6bbcda776e7940e5d997eb83e59acf1bc521bb7d
Getting index for pack b21dcb403ea73e8d045a00276e6b736280a9773b
dyld: lazy symbol binding failed: Symbol not found: _STR2CSTR
Referenced from: /Users/zackchandler/.rvm/gems/ruby-1.9.2-p0@rails3app/gems/sqlite3-ruby-1.2.4/lib/sqlite3_api.bundle
Expected in: flat namespace
require 'timeout'
def block_until_instance_is_sshable!(timeout=120)
start = Time.now
while ((Time.now - start) < timeout) do
begin
Timeout::timeout(5) {
# INSERT CODE HERE TO TRY TO SSH
return true
}
@zackchandler
zackchandler / run_automation.sh
Created October 31, 2012 18:03
Trying to tweak AutomationExample to run on device...
# ...
./unix_instruments \
-w 3b497a50faa1e345a73924e159c2703308ea5871 \
-D automation_results/trace \
-t UIAutomationTemplate.tracetemplate \
$BUILD_DIR/AutomationExample.app \
-e UIARESULTSPATH automation_results \
-e UIASCRIPT automation_script.js
@zackchandler
zackchandler / shopify_app_gem_monkey_patch.rb
Created April 20, 2014 03:41
shopify_app_gem_monkey_patch.rb
module ShopifyApp::LoginProtection
def shopify_session
if shop_session
begin
# session[:shopify] set in LoginController#show
ShopifyAPI::Base.activate_session(shop_session)
yield
ensure
ShopifyAPI::Base.clear_session