- Cheat Sheet: https://github.com/a8m/go-lang-cheat-sheet
- Language spec: https://golang.org/ref/spec
- Effective Go: http://golang.org/doc/effective_go.html
- Code Generation: http://blog.golang.org/generate
This file contains hidden or 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
source "https://rubygems.org" | |
gem "guard-rake" |
This file contains hidden or 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 TicTacToeApp | |
NIL_GAME = [ | |
[nil, nil, nil], | |
[nil, nil, nil], | |
[nil, nil, nil] | |
] | |
def initialize | |
@game = NIL_GAME |
This file contains hidden or 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
gem 'dotenv-rails' | |
group :deployment do | |
gem 'capistrano', '~>2.15' | |
gem 'chef' | |
end |
Comparison of a simple, idiomatic ruby program to a similar go program.
To run the ruby program: ruby mammals.rb
To run the go program: go run mammals.go
This file contains hidden or 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
source 'https://rubygems.org' | |
ruby '2.0.0' | |
gem 'rails', '4.0.1' | |
gem 'pg' | |
gem 'sass-rails', '~> 4.0.0' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.0.0' | |
gem 'jquery-rails' |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.33.10" | |
config.ssh.forward_agent = true |
For those unfortunate times when you need to use duct tape to support a slick user experience on really old browsers.
frame = $('iframe').get(0)
doc = if frame.contentWindow
frame.contentWindow.document
else
frame.contentDocument