Skip to content

Instantly share code, notes, and snippets.

@oren
oren / index.js
Created December 4, 2014 08:21
requirebin sketch
var Chartist = require("chartist")
/* Add a basic data series with six labels and values */
var data = {
labels: ['1', '2', '3', '4', '5', '6'],
series: [
{
data: [1, 2, 3, 5, 8, 13]
}
]
@oren
oren / _README.md
Last active August 29, 2015 14:09 — forked from morganrallen/_README.md

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@oren
oren / css
Last active August 29, 2015 14:02
css
body {
color: red;
color: blue;
}
@oren
oren / keybase.md
Last active August 29, 2015 13:57

Keybase proof

I hereby claim:

  • I am oren on github.
  • I am oren (https://keybase.io/oren) on keybase.
  • I have a public key whose fingerprint is 411A 3267 0515 3D9A D33F 10DD 73BF 6EA3 1BE4 B582

To claim this, I am signing this object:

@oren
oren / auth
Created November 3, 2013 18:40
auth
var http = require('http');
http.createServer(function (req, res) {
if (!authorized(req, res, ['admin'])) {
res.statusCode = 401;
res.end("You don't have permissions");
}
res.statusCode = 200;
res.end('Welcome back!');
@oren
oren / gist:6980348
Created October 14, 2013 19:02
testling issue
on iMac:
$ browserify test.js | testling
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
diff --git a/tests/models/listing_test.js b/tests/models/listing_test.js
index 14c3d14..c04b7a6 100644
--- a/tests/models/listing_test.js
+++ b/tests/models/listing_test.js
@@ -10,6 +10,7 @@ var dict = {
'Name': 'CPK',
'HeadingText': 'Restaurants',
'PrimaryCollection': 'food',
+ 'Personalization.TotalNotes': '10'
};
// The server's main routes function
//
// Supports the following end-points:
// POST /push
// POST /register
// POST /register.php
// GET /health
// GET /health.txt
function router(config, req, res) {
@oren
oren / simulator.js
Created July 17, 2012 04:55
functional test
// Elphi System Simulator in Node.js
// TODO: check failure case
// 0) request times
// 0) server hangs
// 0) HTTP request timeouts where we never get a response
// 1) no api
// 2) no proxy on
// 3) plugs unresponsive
goal:
-----
return an array of names that start with j and sorted by id
["josh", "jordan"]
arr = [{name: 'jordan',id: 3}, {name: 'josh',id: 1}, {name: 'rob',id: 5}]
1)
arr.select!{ |a| a[:name][/\Aj/] }