Skip to content

Instantly share code, notes, and snippets.

@MrJadaml
MrJadaml / form_tag_hell
Last active August 29, 2015 14:11
Form_Tag hell
# ------------------------------------> users_controller.rb <--------------------------------------------
class UsersController < ApplicationController
before_action :logged_in_user, only: [:create, :destroy]
def edit
set_user
end
require './game.rb'
describe Game do
let(:game) { Game.new }
context 'when starting a new game' do
it 'sets score to zero' do
expect(game.score).to eq(0)
end
it 'starts with no players' do
require './game.rb'
describe Game do
it 'sets score to zero when starting a new game' do
game = Game.new
expect(game.score).to eq(0)
end
it 'starts with no players when starting a new game' do
game = Game.new
@MrJadaml
MrJadaml / resume.md
Last active August 29, 2015 14:26
HTML Exercise

hi

gQuery

A gSchool version of jQuery

  • Create a gQuery.js file to your boxes lab application and add the following code to that file:
(function() {
@MrJadaml
MrJadaml / box-model-lesson.html
Created February 9, 2016 15:50
Have students help you build a visual box model model - (sage and scribe activity)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Box Model Model</title>
<style>
body {
padding-top: 80px;
}
### Javascript
Javascript for Cats http://jsforcats.com/
### Node
NodeSchool http://nodeschool.io/
The Art of Node https://github.com/maxogden/art-of-node#the-art-of-node
Free Code Camp https://www.freecodecamp.com/
https://psdtowp.net/learn-javascript.html?utm_source=javascriptweekly&utm_medium=email
1. \dt
2. \du
3. SELECT * FROM owners;
4. SELECT name FROM owners;
5. SELECT age FROM owners ORDER BY age ASC;
6. SELECT * FROM owners WHERE name = 'Donald';
7. SELECT * FROM owners WHERE age > 30;
8. SELECT * FROM owners WHERE name LIKE 'E%';
9. INSERT INTO owners (name, age) VALUES ('John',33);
10. INSERT INTO owners (name, age) VALUES ('Jane',43);
WARN engine mdns-js@0.4.0: wanted: {"node":"^0.10.3 || ^0.12.0"} (current: {"node":"4.2.6","npm":"2.14.12"})
-
> usb@1.1.2 install /Users/Jadam/.nvm/versions/node/v4.2.6/lib/node_modules/t2-cli/node_modules/usb
> node-pre-gyp install --fallback-to-build
[usb] Success: "/Users/Jadam/.nvm/versions/node/v4.2.6/lib/node_modules/t2-cli/node_modules/usb/src/binding/usb_bindings.node" is installed via remote
/Users/Jadam/.nvm/versions/node/v4.2.6/bin/t2 -> /Users/Jadam/.nvm/versions/node/v4.2.6/lib/node_modules/t2-cli/bin/tessel-2.js
> t2-cli@0.0.19 postinstall /Users/Jadam/.nvm/versions/node/v4.2.6/lib/node_modules/t2-cli
> t2 install-drivers || true
(function() {
'use strict';
const server = 'https://galvanize-todos.herokuapp.com/is-persons';
const app = angular.module('todoApp');
app.controller('PeopleCtrl', PeopleCtrl);
app.controller('PersonCtrl', PersonCtrl);
app.controller('TodoListCtrl', TodoListCtrl);