Skip to content

Instantly share code, notes, and snippets.

View screamingmunch's full-sized avatar

Kristine screamingmunch

  • Dictionary.com
  • San Francisco, CA
View GitHub Profile
@screamingmunch
screamingmunch / HTML
Created March 30, 2013 23:06
HTML rails
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body{
margin: 0;
}
h1{
color: navy;
@screamingmunch
screamingmunch / Wk1_Mon(Day1).md
Last active December 18, 2015 14:49
Terminal Commands, Shebang, #!/usr/bin/env ruby, chmod, cat, less

Day 1 of GA WDI program: we spent majority of the class in terminal(shell), getting comfortable with command line prompts. We also played with some Ruby in and Sublime Text. All in all, a good review of all the prep work on command line stuff. Ubuntu isn't as scary as when I first installed it yesterday.

tl;dr: Terminal Commands, Shebang #!/usr/bin/env ruby, chmod a+x demo.rb , Literals, cat, less.

file_name.md --> md stands for markdown file type

Linux:

Ctrl + to zoom in (in apple: Cmd +)

@screamingmunch
screamingmunch / Wk1_Tue(Day2).md
Last active December 18, 2015 15:49
GA Lecture Notes

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)
@screamingmunch
screamingmunch / Wk1_Wed(Day3).md
Last active December 18, 2015 17:09
GA- Ruby Arrays, Loops, Hashs

We spent most lecture today on arrays & hashes. AJ demonstrated creating a hash from a .csv file containing all the teaching staff's names and contact info. We had our first lab today as well, sorting through a json file of search results to manipulate the data and perform searches. I learned that you can create hashes within hashes, and even within arrays. For example: Items[3]["products"]["price"]. To find whether there is a match of a string (or regular expression) to your larger string (or hash/array/.json file), use: array["name"] =~ /Jay/

tl;dr Arrays, Loops, Hashes..

Getting files from Terminal:

j@ubuntu:~$ mkdir Code/wk1d3
@screamingmunch
screamingmunch / camera_json_lab.rb
Created June 20, 2013 03:50
Wk1_Wed(Day3) Lab Assignment
#!/usr/bin/env ruby
require 'open-uri'
require 'json'
#original gist: https://gist.github.com/bridgpal/e032c851cebf6de1a968
url = "https://gist.github.com/bridgpal/e032c851cebf6de1a968/raw/820ef8ca253e9aaf986c010e235ef1141564fedc/products.json"
result = JSON.parse(open(url).read)
items = result["items"] #items array
# 1. Print out the size of items returned
@screamingmunch
screamingmunch / Wk1_Thu(Day4).md
Last active December 18, 2015 18:28
More hashes, Classes & Modules

tl;dr

Useful Tools

*JSONView is a great way to view raw json files. *Evernote for notes

Symbol [for hash keys] functions differently in memory compared to strings. Ruby maintains that memory location directly thus making it more efficient.

Get pictures from flickr

@screamingmunch
screamingmunch / Wk1_Fri(Day5).md
Last active December 18, 2015 19:38
MVC/Testing, Classes, Modules
@screamingmunch
screamingmunch / Wk2_Tues(Day7).md
Last active December 18, 2015 23:19
Networks, Sinatra

Networks:

"The Cloud" - marketing wise, it implies anything that has to do with the internet these days.

but when we're talking about networks, it means the connection of computers from point A to some other computer B.

Firewall- a computer that by default accepts no connections, and accepts a few exceptions

port 80 = HTTP, port 443 = HTTPS (S=secure)

@screamingmunch
screamingmunch / Useful_Tools.md
Last active December 19, 2015 02:28
Useful Tools that we've installed and commands we use regularly..

##JavaScript

tools

  1. Install jshint and Node.js

wget https://raw.github.com/coolaj86/dotfiles/master/.jshintrc

then install node.js from http://nodejs.org/ or

@screamingmunch
screamingmunch / wk2_Tue(Day12).md
Last active December 19, 2015 06:29
jQuery, Code along exercise-memory game, rockpaperscisors HW