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
# Create a new list | |
# Add an item with a quantity to the list | |
# Remove an item from the list | |
# Update quantities for items in your list | |
# Print the list (Consider how to make it look nice!) | |
# DEFINE 'create_list' which takes no arguments: | |
# create/return a new, empty, hash | |
# | |
# DEFINE 'add', which takes three arguments, item (a string) and quantity (an integer), and list (a hash): |
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 separate_comma(num) | |
string = num.to_s #turn integer into string | |
z = -4 | |
while z > -(string.length+1) | |
string.insert(z, ",") | |
z -= 4 | |
end | |
string |
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 Action | |
def self.doing_things | |
puts "HI" | |
end | |
def do_a_thing | |
puts "hi" | |
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
alias ..='cd ..' | |
# alias go_jenkins=‘launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist’ | |
# alias stop_jenkins=‘launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist’ | |
alias getcurl='python ~/Documents/scripts/curl_extractor.py' | |
alias getbash='subl ~/.bash_profile' | |
alias startHub='java -jar ~/Work/selenium/selenium-server-standalone-2.44.0.jar -role hub' | |
alias be='bundle exec' | |
alias scheme='/Applications/mit-scheme.app/Contents/Resources/mit-scheme' |
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 python | |
import sys, os, re | |
import subprocess | |
diff = subprocess.check_output(['git', 'diff', 'HEAD']) | |
def check_for_text(text, diff): | |
exp = re.compile(text) | |
match = exp.search(diff) |
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
desc 'CONSOLE-ATION' | |
task "db:console" do | |
require 'irb' | |
ARGV.clear | |
IRB.start | |
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
desc 'Fuck it. Try again.' | |
task "db:yolo" => [:"db:drop", :"db:create", :"db:migrate"] do | |
puts "YOLO MOFOS" | |
end |