How to complete assignments
- Fork this repository to your GitHub account
- Clone the repo to your local machine
- Set up tracking with this repo as upstream
- Commit changes
- Push to your repository
When should I commit?
If you are stuck, complete a question, or reach a major stopping point!
How to fork a repository
-> Click 'Fork' button on this pages' upper right -> Select your GitHub username
How to clone this repo
$ cd directory/i/want/it/to/live/in $ git clone firstname.lastname@example.org:your_username/cloud-application-engineer-1.git
How to setup tracking
Add sunnycloud as the upstream repo
$ git remote add upstream email@example.com:sunnycloud/cloud-application-engineer-1.git
Grab the latest code from sunnycloud:
$ git fetch upstream
Bring your fork up to date:
$ git rebase upstream/master
To complete assignments:
Navigate to the assignment directory
$ cd cloud-application-engineer-1/assignments/NUM/
Here you'll see the directories broken down by language, depending on the assignemnt:
$ ls -alt drwxr-xr-x 4 kila staff 136 Jun 6 11:23 . -rw-r--r-- 1 kila staff 531 Jun 6 12:47 ps01.txt drwxr-xr-x 2 kila staff 68 Jun 6 11:23 scheme drwxr-xr-x 2 kila staff 68 Jun 6 11:23 ruby drwxr-xr-x 3 kila staff 102 Jun 6 11:23 ..
Problems are found in psNUM.txt
Navigate to the correct directory/sub-directory and...code!
Sanity Check -- are you on the right branch? Are the modified files what you expect?
$ git status
Add all modified or new files in the current directory and below
$ git add .
Commit your changes with a commit message covering your changes
$ git commit -m 'Completed PS01#01'
Push to origin on branch master
$ git push origin master
For rails projects
$ cd rails_project_name
Trust the containing .rvmrc file You may have to install a new version of ruby:
$ rvm install 1.9.2-p180
Refresh current directory so rvm can do its thing
$ cd .
We may be using an already-specified gemset -- this is a sanity check
$ gem list
If not, and only rake is intalled, install bundler
$ gem install bundler --no-ri --no-rdoc
Install gems specified in Gemfile
$ bundle install
How to run a rails project on your local machine
$ rails s
Navigate to http://localhost:3000 !
How to install mit-scheme on ubuntu 10.04
$ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install build-essential m4
Download the correct pre-compiled binary for your operating system from: http://www.gnu.org/software/mit-scheme/
and follow the installation instructions (shown here for unix x86-64): http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-user/Unix-Installation.html
In case the link becomes broken, the steps are:
$ tar xzf mit-scheme-VERSION.tar.gz $ cd mit-scheme-VERSION/src $ ./configure $ make compile-microcode $ make install
Note: you may have to run
$ sudo make install
if you get permission denied errors
then clean up the mess:
$ cd ../.. $ rm -rf mit-scheme-VERSION
How to get mit-scheme to play nice with emacs
Open emacs and in the minibuffer:
M-x customize-group scheme
Scheme Program Name: scheme
Scheme Program Name: mit-scheme
This will insert elisp code into your .emacs file setting this change. We need to reload this file so that emacs is aware of our changes:
M-x load-file RET ~/.emacs RET