Skip to content

Instantly share code, notes, and snippets.

View joelip's full-sized avatar

Joe Lipper joelip

View GitHub Profile
This file has been truncated, but you can view the full file.
/*!
* jQuery JavaScript Library v1.10.2
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
@joelip
joelip / raffle.js.coffee
Created July 26, 2013 08:15
raffle.js.coffee file before editing it to deal with $resource. From initial Angularjs practice.
@RaffleCtrl = ($scope) -> # using @ before Raffle makes this visible to angularjs
# pass in scope (object used to interact with a view)
# you can set variables and functions on it
$scope.entries = [
{name: "Larry"}
{name: "Brian"}
{name: "Jennifer"}
]
$scope.addEntry = ->
       posts GET    /posts(.:format)          posts#index
             POST   /posts(.:format)          posts#create
    new_post GET    /posts/new(.:format)      posts#new
   edit_post GET    /posts/:id/edit(.:format) posts#edit
        post GET    /posts/:id(.:format)      posts#show
             PUT    /posts/:id(.:format)      posts#update
             DELETE /posts/:id(.:format)      posts#destroy
   posts_new GET    /posts/new(.:format)      posts#new
  posts_edit GET    /posts/edit(.:format)     posts#edit

posts_update GET /posts/update(.:format) posts#update

(copy something from somewhere, then do)

Author name email password bio website twitter Post author_id title

Author
name
email
password
bio
website
twitter
Post
author_id
title
Started DELETE "/posts/6" for 127.0.0.1 at 2013-05-20 13:26:50 -0700
Processing by PostsController#destroy as HTML
Parameters: {"authenticity_token"=>"5qGz0MtZrQK/a7BpEOmZ2/oSuZoWqcArliNZlix5Yqw=", "id"=>"6"}
Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? ORDER BY posts.created_at DESC LIMIT 1 [["id", "6"]]
(0.0ms) begin transaction
SQL (0.2ms) DELETE FROM "posts" WHERE "posts"."id" = ? [["id", 6]]
(0.8ms) commit transaction
** selecting post from DB and deleting it (also limits the deleted posts to just the selected post)

Blog Application RESTful resources

User Model

GET       /users          READ all users
POST      /users          CREATE new user
GET       /users/new      view for CREATE
GET       /users/:id      READ a single user

PUT /users/:id/edit view for UPDATE

@joelip
joelip / dabblet.css
Created October 29, 2012 19:46
DR Prototype Markup: Home Page/Account Page v2
/* DR Prototype Markup: Home Page/Account Page v2 */
Colors:
Slight off white: rgb(251,251,251)
Darkest black: rgb(51,52,53)
Greyish black: rgb(81,81,82)
Light purple grey: rgb(193,188,199)
very subtle purple grey: rgb(167,166,168)
dark purple grey: rgb(64,62,68)
pastel dark purple: rgb(128,116,143)
@joelip
joelip / dabblet.css
Created October 25, 2012 07:08
DR Prototype Markup: Home Page/Account Page v2
/* DR Prototype Markup: Home Page/Account Page v2 */
/* colors
Expensive Black Wool: rgb(15,10,6);
Pearl Baloon: rgb(249,244,240);
Paler Flesh: rgb(255,246,238);
Boredom: rgb(221,209,200);
Designer Beige: rgb(196,189,182);
*/
/* border reference
border: [size px] [line type (solid etc)] [color];