Skip to content

Instantly share code, notes, and snippets.

View rboyd's full-sized avatar

Robert Boyd rboyd

  • Bentonville, AR
View GitHub Profile
diff --git a/lib/rvm/shell/shell_wrapper.sh b/lib/rvm/shell/shell_wrapper.sh
index dd7fb06..6e90d47 100644
--- a/lib/rvm/shell/shell_wrapper.sh
+++ b/lib/rvm/shell/shell_wrapper.sh
@@ -2,12 +2,10 @@
__rvm_show_command_epilog() {
local last_command_result="$?"
echo "---------------RVM-RESULTS-START---------------"
- echo "---"
- echo " exit_status: \"$last_command_result\""
@rboyd
rboyd / MailchimpDeliveryMethod
Created June 22, 2011 15:01 — forked from ippy04/MailchimpDeliveryMethod
Delivery Method for Mailchimp STS and Amazon SES using Uakari
class MailchimpDeliveryMethod
attr_accessor :settings
def initialize(values = {})
self.settings = {:track_opens => true,
:track_clicks => true
}.merge!(values)
end
def deliver!(mail)
@rboyd
rboyd / gist:1230525
Created September 20, 2011 21:53
urban airship tags json
{
"tags": [
"CDT",
"language_en",
"iPad",
"country_US"
]
}
@rboyd
rboyd / gist:1301682
Created October 20, 2011 17:06
themeforest experience
So, on 10/13 I bought this theme on themeforest:
http://themeforest.net/item/sparkling-landing-page-32-variations/204623?ref=An1ken
I bought it because I wanted to customize the iPhone screen and app icon tags for our new app launch. The theme clearly states that layered PSD is included, but when I open the PSD all of the iPhone related work is flattened into one layer, so it's pretty much useless for my purposes. All I want is either a refund (and the language on the template page to be clarified) or the resources on multiple layers so I can do the work I intended.
So I left a comment for the theme creator:
@rboyd
rboyd / ios_detect.coffee
Created November 1, 2011 21:27
Detect iPhone user agent, offer app download, and javascript redirect to iTunes App Store
OFFER = 'We have an app available in the App Store! Download now?'
ITUNES_URL = '<Your iTunes URL Here>'
createCookie = (name,value,days) ->
if days
date = new Date()
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 365))
expires = '; expires=' + date.toGMTString()
else
expires = ''
@rboyd
rboyd / builder_ex.rb
Created November 12, 2011 21:30
builder example for ibtkm
require 'builder'
builder = Builder::XmlMarkup.new
xml = builder.transaction time: Time.now, merchant_code: 179001795 do |transaction|
transaction.price '$27.50'
transaction.billing do |billing|
billing.name 'John Doe'
billing.address1 '123 Any St'
billing.country 'Mongolia'
end
@rboyd
rboyd / gem_uninstall_all.sh
Created November 21, 2011 06:51
uninstall all gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
@rboyd
rboyd / gist:2836977
Created May 30, 2012 15:22
sublime text run spec through rvm
http://upstre.am/blog/2011/07/sublime-text-2-with-rvm-on-osx/
It's even easier as rvm already ships with a wrapper located in ~/.rvm/bin/rvm-auto-ruby. So you just need to edit the Ruby.sublime-build to this:
{ "cmd": ["~/.rvm/bin/rvm-auto-ruby", "$file"], "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector": "source.ruby"}
@rboyd
rboyd / namecheap.rb
Created August 8, 2012 05:04
namecheap api via httparty
require 'yaml'
require 'httparty'
settings = YAML::load_file(File.dirname(File.expand_path(__FILE__)) + '/namecheap.yml')
username = settings['namecheap']['user']
api_key = settings['namecheap']['api_key']
request_string = "https://api.namecheap.com/xml.response"
@rboyd
rboyd / .vimrc.after
Created August 14, 2012 01:51
.vimrc.after
map \rs :RunSpec<cr>
map \rsl :RunSpecLine<cr>
map \t :CommandT<cr>
set hidden
let g:RspecBin="bundle exec rspec"
inoremap <c-p> <esc>ka
inoremap <c-n> <esc>ja
inoremap <c-b> <esc>ha
inoremap <c-f> <esc>la
inoremap <c-a> <esc>0i