Skip to content

Instantly share code, notes, and snippets.

The workflow we will follow looks like this:

  1. Planning
  2. Initializing Application
  3. Building the Rails Model
  4. Configure our Dev Environment
  5. Defining Routes
  6. Writing Controllers and their Views (iterate)
  7. Styling Views
  8. Share!
@DrRobotmck
DrRobotmck / seeder for songs
Created March 24, 2014 21:39
Seeder method
def seeder
song_data = {"yeahyeahyeahs"=>[{:title=>"Maps", :album=>"Fever to Tell", :preview_link=>"http://a1748.phobos.apple.com/us/r1000/074/Music/d4/97/e7/mzm.bigdtgoz.aac.p.m4a", :artwork=>"http://a3.mzstatic.com/us/r30/Features/d6/ba/99/dj.homcvzwl.60x60-50.jpg"}, {:title=>"Heads Will Roll", :album=>"It's Blitz! (Deluxe Edition)", :preview_link=>"http://a308.phobos.apple.com/us/r1000/064/Music/9c/a6/3a/mzm.zgjjoqyj.aac.p.m4a", :artwork=>"http://a1.mzstatic.com/us/r30/Music/4c/30/8c/mzi.gcicgujl.60x60-50.jpg"}, {:title=>"Gold Lion", :album=>"Show Your Bones", :preview_link=>"http://a850.phobos.apple.com/us/r1000/105/Music/d0/b6/fe/mzm.qoeoeazp.aac.p.m4a", :artwork=>"http://a5.mzstatic.com/us/r30/Features/73/a1/1a/dj.mwlaurzf.60x60-50.jpg"}, {:title=>"Sacrilege", :album=>"Mosquito (Deluxe Version)", :preview_link=>"http://a1575.phobos.apple.com/us/r1000/103/Music/v4/0a/1b/fb/0a1bfb63-cc3d-1669-4894-c9e35dcfe00e/mzaf_6367038940470066542.aac.m4a", :artwork=>"http://a4.mzstatic.com/us/r30/Music/v4/fc/72/f7/f
@DrRobotmck
DrRobotmck / gist:7655caf289d5b174ced9
Last active August 29, 2015 14:02
Keyboard Shortcuts and Resources
Common Keyboard Shortcuts

Global

  • Command +
    • N - New File or Window
    • S - Save a file
    • O - Open File
    • T - New Tab
    • W - Close Current Tab or Window
  • Q - Quit
{
"1":{
"name":"Bulbasaur",
"attack":49,
"defense":49,
"evolveLevel":16,
"evolveTo":"2",
"type":"grass",
"moves":[
"tackle",
response = '{"data":[{"type":"gif","id":"PTYC8lw49Er9m","url":"http:\/\/giphy.com\/gifs\/PTYC8lw49Er9m","bitly_gif_url":"http:\/\/gph.is\/Z14JOZ","bitly_url":"http:\/\/gph.is\/Z14JOZ","embed_url":"http:\/\/giphy.com\/embed\/PTYC8lw49Er9m","username":"","source":"http:\/\/tomhiddles.tumblr.com\/post\/27846623856","rating":"g","trending_datetime":"1970-01-01 00:00:00","images":{"fixed_height":{"url":"http:\/\/media2.giphy.com\/media\/PTYC8lw49Er9m\/200.gif","width":"162","height":"200","mp4":"http:\/\/media.giphy.com\/media\/PTYC8lw49Er9m\/200.mp4"},"fixed_height_still":{"url":"http:\/\/media3.giphy.com\/media\/PTYC8lw49Er9m\/200_s.gif","width":"162","height":"200"},"fixed_height_downsampled":{"url":"http:\/\/media0.giphy.com\/media\/PTYC8lw49Er9m\/200_d.gif","width":"162","height":"200"},"fixed_width":{"url":"http:\/\/media2.giphy.com\/media\/PTYC8lw49Er9m\/200w.gif","width":"200","height":"247","mp4":"http:\/\/media.giphy.com\/media\/PTYC8lw49Er9m\/200w.mp4"},"fixed_width_still":{"url":"http:\/\/media0.giphy.
@DrRobotmck
DrRobotmck / sample_issue.md
Created March 30, 2015 17:37
Asking For Help

CONTEXT

WHAT USER STORY YOU ARE WORKING ON:

I am working on the user story "User wants to log in."

WHAT YOU ARE TRYING TO DO:

I am trying to have the user update their profile.

@DrRobotmck
DrRobotmck / core_comp_discussion.md
Created April 21, 2015 22:29
Core Competency Discussion Notes

CORE COMPETENCY

  • Awesome idea

CC - Data

  • relational vs non-rel databases can help cover different concepts
  • helping people understand why they might want to choose between tradeoffs b/t sql and nosql
    • cap theorem
  • alternative datastores, should it be under "databases"
@DrRobotmck
DrRobotmck / dupe-checker.js
Last active April 11, 2018 00:13
Duplicate checker
const a = [10,20,30,40];
const b = [10,10,20,30,40];
const c = [10,10,20,20,30,30];
const d = [10,10,20,20,30,30,40,10];
const benchmark = [...a, ...b, ...c, ...d];
/*
Using two for loops