Skip to content

Instantly share code, notes, and snippets.

Elijah Insua tmpvar

Block or report user

Report or block tmpvar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6198731
# booting into arch livecd (thumbdrive)
grab the arch linux iso - https://www.archlinux.org/download/
open terminal
```bash
cd /path/to/downloads
diskutil list
View j.json
{
"package": {
"properties": {
"author": {
"type": "string"
},
"created": {
"type": "date",
"format": "dateOptionalTime"
},
@tmpvar
tmpvar / output
Created Jun 12, 2012 — forked from nym/gist:2918959
Script tag not loading
View output
var jsdom = require('jsdom');
jsdom.defaultDocumentFeatures = {
FetchExternalResources : ['script'],
ProcessExternalResources : ['script'],
MutationEvents : '2.0',
QuerySelector : false
};
var htmlDoc = '<html lang="en-US">' +
View gist:1033715
//TO USE JUST save it and FIRE node <filename.js>
//AT THE BOTTOM THERE ARE TWO URL'S. TEST CASE IS FOR URL POINTING TO SUN'S JAVADOC ,A PAGE THAT MAKEE HEAVY //USE OF IFRAMES
// Should process HTML text and dump it on terminal
// Error on terminal with a backtrace
/*
/home/sid/opt/lib/node/.npm/jsdom/0.1.20/package/lib/jsdom/level2/html.js:1400
this._contentDocument = new HTMLDocument();
^
ReferenceError: HTMLDocument is not defined
at Object.contentDocument (/home/sid/opt/lib/node/.npm/jsdom/0.1.20/package/lib/jsdom/level2/html.js:1400:9)
@tmpvar
tmpvar / hookio-IDST.md
Created Jun 12, 2011
hook.io request for comments time
View hookio-IDST.md

What is a hook?

  • A hook is a node.js process

  • A hook can have many outputs ( servers ) and inputs ( client connections ) to other hooks

  • The previous line is NOT a typo

  • outputs =  servers ( who push messages out )

  • inputs   =  clients   ( who take messages in )

  • inputs and outputs are independent channels and are both bi-directional

  • hook inputs ALWAYS re-broadcast to it's outputs immediate inputs ( siblings )

View level3.md

This perhaps deserves a blog post, but whatever.

The challenge: What if you wanted to determine what level my Bulgarian language skills were at? Using this sample document:

{
    "name": {
        "first": "Lloyd",
        "last": "Hilaiel"
    },
    "favoriteColor": "yellow",
@tmpvar
tmpvar / LICENSE.txt
Created May 20, 2011 — forked from 140bytes/LICENSE.txt
hatch - the smallest hash based router you've ever seen
View LICENSE.txt
Copyright (c) 2011 Elijah Insua, http://tmpvar.com
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
View gist:755614
getdom = function () {
var features =
{ FetchExternalResources : []
, ProcessExternalResources : false
}
, window = jsdom.jsdom(this.dataString, null, {features: features}).createWindow()
;
return window
}
@tmpvar
tmpvar / gist:661922
Created Nov 4, 2010 — forked from aflatter/gist:661873
node context issues
View gist:661922
var common = require('../common'),
assert = common.assert;
var Script = process.binding("evals").Script;
var sandbox = Script.createContext({x: "x"});
sandbox.window = sandbox;
//Script.runInContext("window = this;", sandbox);
View gist:639934
var sys = require('sys'),
http = require('http'),
cookie = require('cookie'),
count = 0;
initConnect = function(clientID) {
connectSite = http.createClient(80, 'ws30.sync.skoreit.com');
connectRequest = connectSite.request('POST', '/request.ashx?key=11111111-1111-1111-1111-111111111111&token=' + new Date().getTime(), {
'host': 'ws30.sync.skoreit.com',
'Content-type': 'text/json; charset=utf-8',
You can’t perform that action at this time.