I hereby claim:
- I am joshmcarthur on github.
- I am sudojosh (https://keybase.io/sudojosh) on keybase.
- I have a public key whose fingerprint is F836 E081 B5FC 98B7 4731 9535 8185 E264 85E5 3C23
To claim this, I am signing this object:
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
I hereby claim:
To claim this, I am signing this object:
" --- snip --- | |
" Relative Numbering | |
" ======= | |
:au FocusLost * :set number | |
:au FocusGained * :set relativenumber | |
autocmd InsertEnter * :set number | |
autocmd InsertLeave * :set relativenumber | |
" --- snip --- |
jQuery.fn.tableflip = function() { | |
console.log("╯°□°)╯︵ ┻━┻"); | |
return this; | |
} |
# Like rspec --format doc, (which minitest doesn't have) | |
# | |
# usage: minidoc test/integration/robs_cool_potatoes_test.rb | |
minidoc() { | |
rscript=' | |
red = "\e[0;31m" | |
purple = "\e[0;35m" | |
green = "\e[0;32m" | |
blue = "\e[0;34m" | |
none = "\e[0m" |
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | |
begin | |
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | |
rvm_lib_path = File.join(rvm_path, 'lib') | |
$LOAD_PATH.unshift rvm_lib_path | |
require 'rvm' | |
RVM.use_from_path! File.dirname(File.dirname(__FILE__)) | |
rescue LoadError | |
# RVM is unavailable at this point. | |
raise "RVM ruby lib is currently unavailable." |
default_run_options[:pty] = true | |
set :deploy_via, :copy | |
set :copy_cache, true | |
set :copy_exclude, [".git", "config/database.yml", "config/deploy.rb", ".rvmrc"] |
def process_gateway_return | |
#Find the gateway payment method from the parameters we have received back from the gateway provider | |
gateway = PaymentMethod.find_by_id_and_type(ExternalGateway.parse_custom_data(params)["payment_method_id"], "ExternalGateway") | |
# Populate the @order variable and the payment_made variable with the variables returned from the process_response method on the gateway method | |
# This method returns an array, which is how these two variables get populated. | |
@order, payment_made = gateway.process_response(params) | |
# Only do the next bit if the order has been found, and the gateway tells us that the payment has been made successfully |
# run this script on a fresh Ubuntu server installation as root | |
# copy public ssh key to server's authorized_keys keychain for simple ssh logins | |
mkdir -p ~/.ssh | |
echo -e '<your ssh public key here>' > ~/.ssh/authorized_keys | |
# setup .gemrc | |
echo -e '--- | |
:verbose: true |
## Note: This goes inside your spec_helper.rb file - if using Spork, inside the Spork.prefork block | |
OmniAuth.config.test_mode = true | |
OmniAuth.config.add_mock(:twitter, { | |
:uid => '123456789' | |
}) | |
OmniAuth.config.add_mock(:facebook, { | |
:uid => '123456789' | |
}) |