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
wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz | |
tar -xvf gotty_linux_amd64.tar.gz | |
rm gotty_linux_amd64.tar.gz |
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
sudo apt-get update | |
sudo apt-get dist-upgrade | |
sudo apt-get install -y libssl-dev libreadline-dev zlib1g-dev libpq-dev build-essential | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
cd ~/.rbenv && src/configure && make -C src | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
mkdir -p "$(rbenv root)"/plugins | |
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build |
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/env bash | |
set -e | |
# X-Code | |
xcode-select --install | |
# Homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# rbenv |
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
def cow(): | |
"""See: http://en.wikipedia.org/wiki/Cattle""" | |
return { | |
'sound': 'moo', | |
'legs': 4, | |
'covering': 'hair' | |
} | |
def horse(): | |
"""See: http://en.wikipedia.org/wiki/Horse""" |
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
""" | |
The FooBar Card Game! | |
The game is simple: | |
1. Start a deck of cards | |
2. Shuffle the deck | |
3. Every player has a "hand" - a list of cards they are holding | |
4. Deal all cards from the deck as evenly as possible to all players | |
5. Score the cards - the player with the highest score WINS!" |
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
> text = 'some text' | |
=> "some text" | |
> hash_options = {rant_id:1,date:11/04/2014,top:text,number:12} | |
=> {:rant_id=>1, :date=>0, :top=>"some text", :number=>12} | |
NOTE that 'date' gets set to zero, because it's being interpreted as, "11 divided by 04 divided by 2014" | |
Also this: | |
> hash_options = rant_id:1,date:11/04/2014,top:text,number:12 |
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
source "https://rubygems.org" | |
gem 'curb' |
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 Order < ActiveRecord::Base | |
... | |
validates :customer_id, | |
:company_id, | |
:credit_card_id, | |
:tip, | |
:delivery_location, | |
presence: true |
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
# Contains a list of rolls that a bowling player throws, and from that can tell | |
# you the score of the game in progress or finished, the visual score (with 'X' | |
# and '/', etc.), and the score of any frame within the game. | |
# | |
# Examples: | |
# | |
# > g = Game.new | |
# => [] | |
# | |
# > g.roll(3) |
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
[lines containing credentials and VPN server IP address excluded] | |
remotename PPTP | |
require-mppe-128 | |
require-mschap-v2 | |
refuse-eap | |
refuse-pap | |
refuse-chap | |
refuse-mschap | |
noauth |
NewerOlder