Skip to content

Instantly share code, notes, and snippets.

@elenawalom
elenawalom / day1.md
Last active December 18, 2015 14:49
Elen's Blog Thing

First, check to see if the folder that you want to create already exists using 'ls'.

ls

pushd pwd mkdir clear (cmd+k) cat

@elenawalom
elenawalom / gist:5807121
Created June 18, 2013 16:49
delete-me.md
This is a block of text
#!This is a block of code
This is a github highlighted codeblock
#

tl;dr: Ruby Arrays,

Objectives:MVC & Testing , Arrays & Functions ,Networking & HTTP

Ruby "Strings" vs. [Arrays]

    array: an Object with ordered storage container
```Ruby names = ["Travis", "Megan", "Tod", "Bryan"] #literal array- what you see is what you get, also json (JS object notation)

#Homework for June 18, 2013

##Calculator 1 Create a command line calculator. It should have a basic and advanced mode.

basic calculator (+, -, *, /) advanced calculator (exponents, square root)

For a basic calculator, press 1.

#Homework for June 18, 2013

##Calculator 1 Create a command line calculator. It should have a basic and advanced mode.

basic calculator (+, -, *, /) advanced calculator (exponents, square root)

For a basic calculator, press 1.

@elenawalom
elenawalom / Day 4 Notes
Created June 20, 2013 16:34
day4notes.md
9:15 Homework
10:00 Arrays
10:30 Break
10:40 Loops
12:15 Lunch
1:15 Hashes
2:45 Break
3:00 Lab
@elenawalom
elenawalom / Day 4 Notes
Last active December 18, 2015 18:18
day4notes.md
9:15 Homework
10:00 Arrays
10:30 Break
10:40 Loops
12:15 Lunch
1:15 Hashes
2:45 Break
3:00 Lab
@elenawalom
elenawalom / day4notes
Created June 20, 2013 16:55
Day 4 Notes
Array, hash or string
In documentation, you're likely to see a has listed as hash. Arrays will often be called a. Keys will often be listed as k.
m + n
@elenawalom
elenawalom / day4notes
Created June 20, 2013 16:55
Day 4 Notes
Array, hash or string
In documentation, you're likely to see a has listed as hash. Arrays will often be called a. Keys will often be listed as k.
m + n

The first thing that really surprised me today was the flexibility of Ruby's shovel operator, <<. A student in the class had tried the following:

a = [0]
a << a

What do you think a is now? I was sure it would be [0, [0]]. But lo and behold, Ruby sparkles;

a = [0]
a &lt;&lt; a