Skip to content

Instantly share code, notes, and snippets.

@MPMoughan MPMoughan/ forked from tlicata/
Last active Aug 29, 2015

What would you like to do?

##Command Line Basics

What are the terminal commands to:

  • Create a new folder called "Blah"
mkdir Blah
  • Move into the newly created "Blah" folder
cd Blah
  • Create a "hello.rb" file
touch hello.rb
  • Open the "hello.rb" file in Sublime Text
opeb hello.rb
  • Move back one directory
cd ..

##HTML and CSS

  • Without looking it up, create the basic HTML template structure with Doctype, head, title, and body
<!DOCTYPE html>



  • Write the HTML to add a link to
<a href=">Google</a>

  • Link to an external sheet at the path "css/styles.css"
<link href="/css/styles.css" rel="stylesheet"> 
  • Why do we want to use external stylesheets and scripts instead of adding them directly into our HTML file?
When you want to add style to multiple pages, so you do not have to re-add the same style to mutltiple pages 
  • What's the difference between a class and an ID? Why do we use them?
id = used once / specifically identifies 
class = used multiple times

Using the following HTML:

<h1>Hello Guys!</h1>
<p>Don't Mess This Quiz Up!!!</p>
  <p>I'm a paragraph!</p>
  <p class="lol">I have a class!</p>
  <p id="wdi">I have an ID!</p>
  • Write CSS to change the color of the <h1>
h1 {
color: blue;
  • Write CSS to give the <p> with the id of 'wdi' a different font size
p.wdi {
font-size: 22px;

.wdi {

  • Write CSS to give the <p> with the class of 'lol' a background color. {
background-color: 000;
  • Write CSS to give the first <p> in the <div> a yellow border.
div {
border color:
  • Name at least two of the different color formats used in CSS


  • What are the different data types in Ruby?
constants, hashes, arrays, strings, numbers, intergers, floats
  • How do you print something to the terminal in Ruby?
Your answer goes here
  • What is an array?
an ordered list of items
  • Create an array with 5 of your favorite foods
food = ["pizza", 
  • Write code to print out the numbers from 1 to 250
Your answer goes here


  • Aside from syntax, how is Javascript different from Ruby?
javascript can run on web browser and server; ruby can only run on server
  • How do you print something to the console in Javascript?
Your answer goes here
  • Using a for loop, write code to print out all the odd numbers between 1 and 100. You will also need to use an if statement.
Your answer goes here


  • What is Git? What is Github?
Git allows for distribution of a master files, that allows many people to work on the same file without compromising or changing the original or master

Github is a repository for Git files and allows users to share their work
  • What is the command to create an empty git repository in terminal?
Your answer goes here
  • What is the difference between git add and git commit?
git add is preparing the documents/files to be added to the folder structure, whereas the 'git commit' is making the commitment to save the files to them

##Optional Bonus

If you finish early, work on this problem:

Using either Ruby or Javascript, write code that will test if a given string is a palindrome. A palindrome is a word that is the same forwards and backwards, like 'mom' or 'racecar' or 'aibohphobia'. You are not allowed to use the built in reverse method or any similar methods.

Your answer goes here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.