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/local/bin/bash | |
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/ | |
# Updates for making it work on OS X with a homebrew bash and ignoring null errors | |
### | |
# Label definitions | |
### | |
declare -A LABELS |
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 step?(step) | |
@current_step.nil? || current_step + 1 == step | |
end | |
» @object.current_step | |
=> 0 | |
» @object.step?(0) | |
=> true | |
» @object.step?(1) | |
=> 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
Module Module1 | |
Sub Main() | |
Dim intNumber1, intNumber2 as Integer | |
Dim strOperator As String | |
Do | |
strOperator = InputBox("Please choose an operator to use: +, -, *. Or type Q to quit.") | |
If strOperator = "Q" Then Exit | |
intNumber1 = InputBox("Please Enter The Value For The First Number") |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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 CreateMessages < ActiveRecord::Migration | |
def change | |
create_table :messages do |t| | |
t.string :subject | |
t.string :type | |
t.string :message | |
t.timestamps | |
end | |
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
bash -c ' | |
if [ ! -f /usr/local/bin/chef-client ]; then | |
apt-get update | |
apt-get -y upgrade | |
apt-get install -y build-essential wget zlib1g-dev libssl-dev libffi-dev curl bison build-essential autoconf libxml2-dev libreadline6-dev | |
cd /usr/src | |
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p290.tar.bz2 | |
tar xjf ruby-1.9.2-p290.tar.bz2 | |
cd ruby-1.9.2-p290 | |
./configure |
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
initialize: -> | |
@model.bind('change', @render) | |
@model.view = this | |
render: => | |
$(@el).html(@template(@model.toJSON())) | |
@setContent() | |
return this |