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
# Programming exercise 5.1: Assignment of Variables | |
# AKA: Give names to objects | |
###################################################################### | |
# Tutorial: http://ruby-for-beginners.rubymonstas.org/variables.html # | |
###################################################################### | |
# we can assign a variable with the equal sign = | |
a = "I am a String, and I am assigned to the variable 'a'" | |
# the right side gets 'assigned' to the variable on the left | |
b = "I am another String, and I am assigned to the variable 'b'" |
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
####################################################################### | |
# Programming challenge 1: Christmas Tree # | |
# To solve this challenge you need to know how to iterate over arrays # | |
# Also, you need to know how to print with 'puts' or 'print' # | |
# And finally basic arithmetic operations like 1 * 2 or 1 + 2 # | |
####################################################################### | |
# TODO: Paint a christmas tree on the command line which is 'lines' long | |
# TODO: This is how the christmas tree looks like for 20 lines | |
# |
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 <(curl -L https://gist.githubusercontent.com/roschaefer/961e9dbb75ee80a3574b/raw/1e9410f517fdf35a8b2a0d249749d701c39f0183/setup_rorganize_on_cloud9.sh) | |
mkdir ~/workspace/ruby/ -p | |
cd ~/workspace/ruby/ | |
git clone https://github.com/rubycorns/rorganize.it.git | |
cd rorganize.it/ | |
cp config/secrets.yml.sample config/secrets.yml | |
gem install bundle | |
bundle install | |
bundle exec rake db:migrate | |
bundle exec rails s -b $IP -p $PORT |