This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
[#<Product id: 1, title: "Apple", content: "This is my apple", status: nil, created_at: "2012-01-28 18:10:22", updated_at: "2012-01-28 18:10:22">, #<Product id: 2, title: "Banana", content: "This is my banana", status: nil, created_at: "2012-01-28 18:10:40", updated_at: "2012-01-28 18:10:40">, #<Product id: 3, title: "Pineapple", content: "This is my pineapple", status: nil, created_at: "2012-01-29 12:45:19", updated_at: "2012-01-29 12:45:40">] |
rake routes | |
root / poems#index | |
new_user_session GET /users/sign_in(.:format) devise/sessions#new | |
user_session POST /users/sign_in(.:format) devise/sessions#create | |
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy | |
user_password POST /users/password(.:format) devise/passwords#create | |
new_user_password GET /users/password/new(.:format) devise/passwords#new | |
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit | |
PUT /users/password(.:format) devise/passwords#update | |
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel |
Ext.define("Reditor.view.SourceProperties", { | |
extend: 'Ext.grid.property.Grid', | |
xtype: 'sourceproperties', | |
title: 'Source Properties', | |
closable: false, | |
sourceConfig: { | |
'type': { | |
editor: Ext.create('Ext.form.field.ComboBox', { editable: false }), | |
store: 'DocTypes', | |
queryMode: 'local' |
/* | |
* Handle file upload | |
*/ | |
exports.upload = function(req, res){ | |
// req.body is the raw image buffer. | |
// or maybe even req is the image buffer, dunno | |
console.log('upload'); | |
console.log(res.body); |
// to capture ALL events use: | |
Ext.util.Observable.prototype.fireEvent = Ext.Function.createInterceptor(Ext.util.Observable.prototype.fireEvent, function(evt) { | |
var a=arguments; | |
console.log(this,' fired event ',evt,' with args ',Array.prototype.slice.call(a,1,a.length)); | |
return true; | |
}); | |
// to capture events for a particular component: | |
Ext.util.Observable.capture( | |
Ext.getCmp('my-comp'), |
node_modules | |
# folders used for testing | |
css | |
img | |
images | |
test |
// benchmark/object-stream-throughput.js | |
// | |
// Shows performance of pipe()ing new streams in object mode | |
// through Transform streams. | |
var OBJECTS_PER_B = 12 / 1024; // I get 12 of my objects per KB of input XML | |
var SOURCE_WRITE_SIZE = 64*1024; | |
var common = require('./common'); | |
var net = require('net'); |
{ "@context": { | |
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", | |
"rdfs": "http://www.w3.org/2000/01/rdf-schema#", | |
"owl": "http://www.w3.org/2002/07/owl#", | |
"express": "http://example.com/express#", | |
"defines": { | |
"@reverse": "rdfs:isDefinedBy" | |
}, | |
"propertyOf": { | |
"@id": "rdfs:domain", |
curl -XDELETE 'localhost:9200/jsonld' | |
curl -XPOST 'localhost:9200/jsonld' | |
curl -XPUT 'localhost:9200/jsonld/doc/1' -d ' | |
{ | |
"@context": | |
{ | |
"dc": "http://purl.org/dc/elements/1.1/", |