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 Commenter | |
constructor: (@author) -> | |
write: (message) -> | |
console.log "#{@author}: #{message}" | |
commenter = new Commenter 'Pablo' | |
commenter.write 'Hello World' |
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 vows = require('vows') | |
, request = require('request') | |
, assert = require('assert') | |
, static = require('../../lib/node-static'); | |
var fileServer = new(static.Server)(__dirname + '/../fixtures', {}); | |
var suite = vows.describe('file-server.js'); | |
var TEST_PORT = 8080; |
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
/* | |
* Legacy code with strong dependency with OrderDAO. | |
*/ | |
public class OrderDAO { | |
public boolean delete(int id) { | |
// ... | |
} | |
} | |
public class OrderService { |
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
# Autocomplete | |
require "irb/completion" | |
require "rubygems" | |
require "pp" | |
# Add all gems installed in the system to the $LOAD_PATH | |
# so they can be used in Rails console with Bundler | |
if defined?(::Bundler) | |
gem_paths = Dir.glob("/usr/local/lib/ruby/gems/1.9.1/gems/**/lib") | |
gem_paths.each do |path| |
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
--- | |
:verbose: true | |
:update_sources: true | |
:backtrace: false | |
:bulk_threshold: 1000 | |
:benchmark: false | |
gem: --no-ri --no-rdoc |
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
# Pry.config.editor = "mate -w" | |
Pry.config.editor = "vim" | |
Pry.config.prompt = proc do |obj, level, _| | |
prompt = "" | |
prompt << "#{Rails.version}@" if defined?(Rails) | |
prompt << "#{RUBY_VERSION}" | |
"#{prompt} (#{obj})> " | |
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
<?xml version='1.0' encoding='utf-8' ?> | |
<Response> | |
<Dial callerId="+5511965056615"> | |
<Number>+5511965056615</Number> | |
</Dial> | |
</Response> |
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 | |
# GTK+ and Firefox for Amazon Linux | |
# Written by Joseph Lawson 2012-06-03 | |
# http://joekiller.com | |
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ | |
# chmod 755 ./gtk-firefox.sh | |
# sudo ./gtk-firefox.sh | |
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
### Environment variables ### | |
export PATH="/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:~:$PATH:." | |
export CDPATH=".:~:~/projects/personal:~/projects/sandbox" | |
export LANG="en_US.UTF-8" | |
export NODE_PATH="/usr/local/lib/node:/usr/local/lib/node_modules" | |
export CLICOLOR=1 | |
export TERM=xterm-256color |
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
# /usr/bin/notify-site-is-down.rb | |
require "rubygems" | |
require "twilio-ruby" | |
account_sid = ENV["TWILIO_ACCOUNT_SID"] | |
auth_token = ENV["TWILIO_AUTH_TOKEN"] | |
@client = Twilio::REST::Client.new account_sid, auth_token |