Skip to content

Instantly share code, notes, and snippets.

View zapatify's full-sized avatar

Zapata zapatify

  • Atlanta, GA
View GitHub Profile
@zapatify
zapatify / RVMCheatSheet.md
Last active April 25, 2019 21:14
RVM Cheatsheet
$ rvm 2.1.1
$ rvm gemset create teddy
Gemset 'teddy' created.
$ rvm 2.1.1
$ rvm gemset create teddy rosie
Gemset 'teddy' created.
Gemset 'rosie' created.
export MYSQL_PATH=/usr/local/Cellar/mysql/5.7.17
export PATH=$PATH:$MYSQL_PATH/bin
export PYTHON_PATH=/usr/local/Cellar/python/3.6.4_4
export PATH=$PATH:$PYTHON_PATH/bin
export PS1="$ "
alias ll="ls -halt"
alias l="ls"

Ruby Exercise: Student Registration

We need your help. We need you to help us create a student registration application

Acceptance Criteria:

• Developers should have access to the source code, and be able to collaborate with the code (read: create a GitHub repo)

• Users should have the ability to input Vehicle details (year, make, model) into the application, and list them.

Git Cheatsheet

Configure

$ git config --global user.name "[name]"
--Sets the name you want attached to your commit transactions
$ git config --global user.email "[email address]"
--Sets the email you want attached to your commit transactions
$ git config --global color.ui auto
--Enables helpful colorization of command line output

Rails Exercise

We need food!

We want pizza!!

The class needs your help. We need to pick what we want to eat on the last day of class. In an effort to follow the democratic process, we are going to let the people vote on what we will eat. Majority vote wins.

Your mission, should you accept it, is to build a voting application so that given a set of choices, a user is allowed to vote on a selection.

Rails Registration Module

We need your help. We need you to help us create a student registration application

What we need

A web application where a user (for now) can

  • CRUD new students
  • CRUD new courses
  • Assign students to courses
class Model < ActiveRecord::Base
self.table_name = 'existing_table_name'
self.primary_key = 'table_id'
end

Ruby Exercises

Updated: Feb 1, 2017

Problems are arranged easiest to hardest. Ruby I (easiest) to Ruby IV (hardest)'

Problem 1 (Ruby I)

Given the array,

words = ["cool","Ruby","programming"]

Using concatenation, output the following:

vehicle_year vehicle_make vehicle_model vehicle_vin
1981 DELOREAN DMC-12 SCEDT26T7BD006661
1982 MERCEDES-BENZ 380SL WDBBA45A2CB015234
1982 FERRARI 308 ZFFAA02A2C0040027
1982 PONTIAC FIREBIRD 1G2AS87H6CN521776
1982 MERCEDES-BENZ 380SL WDBBA45A7CB018159
1982 TOYOTA LAND CRUISER JT3FJ60G9C0027357
1982 AMC EAGLE 1ACCK3654CK161597
1983 LAND ROVER DEFENDER SALLDHAG7AA200495
1983 PORSCHE 911 WP0AA0914DS122237