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
| export BUNDLER_EDITOR='/Applications/RubyMine.app/Contents/MacOS/rubymine' | |
| defaults write NSGlobalDomain KeyRepeat -int 0 | |
| RUBYMINE_VM_OPTIONS="/Users/dgreenbe77/.rubymine_vm_options" | |
| #ALIASES YO | |
| #Files | |
| alias zsh="vim ~/.zshrc" |
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
| require 'pry' | |
| require 'csv' | |
| def get_item_information | |
| hash_array = [] | |
| CSV.foreach('products.csv', headers: true) do |row| | |
| hash_array << row.to_hash | |
| end | |
| return hash_array | |
| end |
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
| require 'pry' | |
| require 'csv' | |
| def get_item_information | |
| hash_array = [] | |
| CSV.foreach('products.csv', headers: true) do |row| | |
| hash_array << row.to_hash | |
| end | |
| return hash_array | |
| end |
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
| require 'pry' | |
| dictionary = File.open('dictionary.txt') | |
| dictionary_array = dictionary.readlines | |
| dictionary_array.shuffle! | |
| counter = 7 | |
| word = dictionary_array.pop.split(//).delete_if { |letter| letter == "\n" }.join | |
| split_word = word.split(//) | |
| split_word_copy = word.split(//) |
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
| require 'pry' | |
| def sort_from_biggest_to_smallest(sorted_statistics, unsorted_statistics) | |
| unsorted = unsorted_statistics | |
| popped_number = unsorted_statistics.pop | |
| sorted = sorted_statistics | |
| remaining_unsorted_objects = [] | |
| if unsorted.empty? | |
| return sorted |
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
| favorite_movies = [ | |
| { title: 'The Big Lebowski', year_released: 1998, director: 'Joel Coen', imdb_rating: 8.2 }, | |
| { title: 'The Shining', year_released: 1980, director: 'Stanley Kubrick', imdb_rating: 8.5 }, | |
| { title: 'Troll 2', year_released: 1990, directory: 'Claudio Fragasso', imdb_rating: 2.5 } | |
| ] | |
| favorite_movies.each do |movie| | |
| puts "#{movie[:year_released]}: #{movie[:title]}" | |
| end |
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
| characters = { | |
| "Tyrion Lannister" => "House Lannister", | |
| "Jon Snow" => "Night's Watch", | |
| "Hodor" => "House Stark", | |
| "Stannis Baratheon" => "House Baratheon", | |
| "Theon Greyjoy" => "House Greyjoy" | |
| } | |
| puts "Enter character name:" | |
| character_name = gets.chomp |
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
| commit fda290c9c66e54b7ef9ea827342ade43b05dabef | |
| Author: Eric Kelly <[email protected]> | |
| Date: Mon Apr 29 06:21:42 2013 -0400 | |
| Update readme description & formatting instructions | |
| commit a33a560fcae8f70adb768d5e662e2b3c1714ed11 | |
| Merge: 2ed573b 37f75d5 | |
| Author: Eric Kelly <[email protected]> | |
| Date: Mon Apr 29 01:45:45 2013 -0700 |
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
| require 'pry' | |
| #Command line: Prompt user to input one teammember name at a time, until they are done. | |
| def input_name | |
| print "Enter a name. Type 'done' when finished. " | |
| name= gets.chomp | |
| if !/[a-zA-Z]/.match(name) | |
| puts "Invalid" | |
| name = input_name |
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
| require 'pry' | |
| #Command line: Prompt user to input one teammember name at a time, until they are done. | |
| name_array = [] | |
| loop do | |
| print "Enter a name. Type 'done' when finished. " | |
| name = gets.chomp | |
| break if name=='done' | |
| name_array << name |
NewerOlder