Skip to content

Instantly share code, notes, and snippets.

View rhalff's full-sized avatar

Robbert Halff rhalff

  • Robbert Halff
  • Netherlands
View GitHub Profile
@rhalff
rhalff / about.md
Created November 8, 2011 13:51 — forked from binzhang/about.md
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">]
@rhalff
rhalff / routes
Created August 5, 2012 20:28
routes
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",
@rhalff
rhalff / jsonld.sh
Created November 28, 2013 23:42 — forked from jprante/jsonld.sh
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/",