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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#!/bin/bash | |
# Load RVM function | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" | |
######################################################################## | |
# Matthew's Git Bash Prompt | |
######################################################################## | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" |
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 checkboxUtil(){ | |
var input | |
, init; | |
this.init = function(seletor){ | |
input = $("form input:checkbox"); | |
var self = this; | |
input.live('click', function () { | |
var elemento = $(seletor); |
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
class TaxCode | |
GENERATORS = { | |
:us => lambda { |id| "US-#{id}" }, | |
:br => lambda { |id| "#{id + 9}-BRA" } | |
} | |
def self.generate(code, id) | |
gen = GENERATORS[code] || raise ArgumentError, "No generator for country #{code}" | |
gen.call(id) | |
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
// node.js exercise | |
function privateSay(message) { | |
console.log("private: ", message); | |
}; | |
function say(message) { | |
console.log("public: ", message); | |
}; | |
function User(name) { |
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
#params = Parameter.new "registration", "0000000000000000" | |
#transaction = Transaction.create! params, connection | |
module Integration | |
class Transaction | |
attr_reader :data | |
def initialize(data) | |
@data = data | |
end |