This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once("FatZebra.class.php"); | |
define("FATZEBRA_USERNAME", "TEST"); | |
define("FATZEBRA_TOKEN", "TEST"); | |
define("FATZEBRA_GATEWAY", "gateway.sandbox.fatzebra.com.au"); // Live: gateway.fatzebra.com.au | |
define("FATZEBRA_TEST_MODE", true); | |
$gateway = new FatZebra\Gateway(FATZEBRA_USERNAME, FATZEBRA_TOKEN, FATZEBRA_TEST_MODE, FATZEBRA_GATEWAY); // The last option can be omitted to use the live gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: I realize this is trivial, but this is a pattern I use a lot (name from first/last) so I was | |
# curious as to which method was quicker, and if perhaps I've been doing it wrong...? Run on 1.9.3 | |
require 'benchmark' | |
first_name = "john" | |
last_name = "smith" | |
i = 1000000 | |
# Reopen string to add the blank? method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/gateway/money_monkey.rb | |
class Gateway::MoneyMonkey < Gateway | |
preference :login, :string | |
preference :token, :string | |
def provider_class | |
ActiveMerchant::Billing::MoneyMonkeyGateway | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
require 'json' | |
WHEEL_URL = "http://roulette.engineyard.com" | |
LUCKY_NUMBER = 13 #or not so lucky | |
PAYOUT_FACTOR = 35 | |
def spin_the_wheel(bet) | |
spin = HTTParty.get(WHEEL_URL) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Broc-MBP.local]: Broc:~/.bin [git:master!] | |
→ cd /tmp | |
[Broc-MBP.local]: Broc:/tmp | |
→ git clone http://github.com/jnunemaker/mongomapper.git | |
Initialized empty Git repository in /private/tmp/mongomapper/.git/ | |
mviremote: Counting objects: 6667, done. | |
remote: Compressing objects: 100% (2387/2387), done. | |
Receiving objects: 27% (1801/6667), 316.00 KiB | 97 KiB/s | |
remote: Total 6667 (delta 4737), reused 6014 (delta 4193) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = { | |
featureTimeoutHandle: -1, | |
setupUserDialog: function() { | |
jQuery(".user_placeholder").load("/members/current.js?r=" + location.href); | |
jQuery("a#signin_link").live("click", function(e) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
jQuery("#login_dialog").fadeIn(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Fabtabulous! Simple tabs using Prototype | |
* http://tetlaw.id.au/view/blog/fabtabulous-simple-tabs-using-prototype/ | |
* Andrew Tetlaw | |
* version 1.1 2006-05-06 | |
* http://creativecommons.org/licenses/by-sa/2.5/ | |
* | |
* Note: getInitialTab() method modified for Swellnet | |
*/ | |
var Fabtabs = Class.create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.fabtabs = function() { | |
var target = $(this); | |
this.fabtab.init(target); | |
return this; | |
}; | |
// Some local storage.. | |
$.fn.fabtab = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
access_key_id: YOUR-KEY-ID | |
secret_access_key: YOUR-SECRET-KEY | |
test: | |
access_key_id: | |
secret_access_key: | |
production: | |
access_key_id: YOUR-KEY-ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'active_support' | |
require 'active_support/core_ext' | |
require 'ohm' | |
require 'mongo_mapper' | |
require 'benchmark' | |
require 'dm-core' | |
require 'model1' | |
require 'model2' | |
require 'model3' |