Skip to content

Instantly share code, notes, and snippets.

View heygambo's full-sized avatar

Christian Gambardella heygambo

View GitHub Profile
@heygambo
heygambo / install_ruby_192.sh
Created September 30, 2011 17:07
This installes ruby 1.9.2 on my MacOS 10.7 Lion
rvm install 1.9.2 -C --enable-shared,--with-readline-dir=/usr/local/Cellar/readline/6.2.1,--build=x86_64-apple-darwin10,--without-tk
@heygambo
heygambo / .profile
Created September 30, 2011 17:55
Gemfile => :git solution
export RUBYOPT='-rpsych'
@heygambo
heygambo / gist:1272102
Created October 8, 2011 10:25
new Rails 3.1 Project
rails new APP_NAME -m https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-mongoid-devise-template.rb -T -O
@heygambo
heygambo / gist:1308585
Created October 24, 2011 08:30
Homebrew Mongodb Upgrade Log
Please report this bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
/usr/local/Library/Homebrew/formula.rb:393:in `canonical_name'
/usr/local/Library/Homebrew/formula.rb:425:in `factory'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7:in `map'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/bin/brew:46:in `require'
/usr/local/bin/brew:46:in `require?'
/usr/local/bin/brew:79
recurly_errors:
approved: "Approved"
approved_fraud_review: "Approved"
declined: "The transaction was declined. Please use a different card or contact your bank."
insufficient_funds: "The transaction was declined due to insufficient funds in your account. Please use a different card or contact your bank."
temporary_hold: "Your card has a temporary hold. Please use a different card or contact your bank."
too_many_attempts: "The transaction was declined. You have exceeded a reasonable number of attempts. Please wait a while before retrying your card, or try a different card."
call_issuer: "Your transaction was declined. Please contact your bank for further details or try another card."
call_issuer_update_cardholder_data: "Please contact support: the payment system experienced an unspecified error with your card issuer."
paypal_primary_declined: "Your primary funding source was declined. Please try again or update your billing information with PayPal."
@heygambo
heygambo / assistly_script embed
Created February 22, 2012 15:53
Fancy Assistly (desk.com) Email Widget Translations
<script>
// requests the language from static page
function receiveMessage(event) {
var formStrings = event.data;
function mapFormStrings() {
function changeStrings() {
$('#interaction_name').siblings('.form_label').text(formStrings.your_name);
@heygambo
heygambo / gist:1888332
Created February 22, 2012 23:25
load on ready
// from
// http://stackoverflow.com/questions/1206937/javascript-domready
var domLoaded = function (callback) {
/* Internet Explorer */
/*@cc_on
@if (@_win32 || @_win64)
document.write('<script id="ieScriptLoad" defer src="//:"><\/script>');
document.getElementById('ieScriptLoad').onreadystatechange = function() {
if (this.readyState == 'complete') {
@heygambo
heygambo / coffeemaker
Created March 6, 2012 07:30 — forked from gsklee/coffeemaker
Carefree CoffeeScript Auto-compiler
#!/bin/bash
#
# --------------------------------------------------------------------------------------
# http://blog.gantrithor.com/post/12535461464/carefree-coffeescript-auto-compiler-part-3
# --------------------------------------------------------------------------------------
DIR_ROOT="$(cd "$(dirname "$0")" && pwd)"
function compile_tree() {
find "$1" -name "*.coffee" -type f | while read PATH_COFFEE; do
@heygambo
heygambo / app.js
Created March 6, 2012 19:58 — forked from flockonus/app.js
An Express app that should integrate to socket.io
/**
* Module dependencies.
*/
var express = require('express');
var app = module.exports = express.createServer();
io = require('socket.io').listen(app),
@heygambo
heygambo / gist:2001453
Created March 8, 2012 15:15
Remove All Gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx