Skip to content

Instantly share code, notes, and snippets.

# reset vpn
appleconnect vpn -a disconnect
appleconnect cleanup
killall -KILL AppleConnect
killall -KILL AppleConnectAgent
// -- -- -- -- on one machine -- -- -- -- --
var syncedObjectStore = new SyncedObjectStore(duplexStream)
var objA = new syncedObjectStore.Object()
var objB = new syncedObjectStore.Object()
var objC = new syncedObjectStore.Object()
objA.b = objB
objB.c = objC
@kumavis
kumavis / gist:8250221
Last active January 2, 2016 04:19
abstract of node-warrior build process
- make a build dir (empty it if its present)
- dump some static files into a certain place e.g. images
- compile some ejs into an html file
- compile some sass into a css file
- compile some ember templates into a js file (minify if prod)
- browserify the app entry-point into a js file (with browserify debug flag if a dev build) (minify if prod)
- (when a dev build) rerun a build process if a related file changed
@kumavis
kumavis / gist:8202447
Last active September 8, 2022 07:50
dynamically creating a secure iframe
//
// Update: Resolved. TL;DR: chrome dev tools troll.
// Outputting iframe object to console resulted in enumeration of properties, throwing the SecurityError
// Note: However, accessing iframe.contentDocument does throw a SecurityError so iframe.contentDocument.write is not possible.
//
//
// Problem
//
@kumavis
kumavis / index.js
Created November 24, 2013 20:44
requirebin sketch
esprima = require('esprima')
estraverse = require('estraverse')
hoist = require('ast-hoist')
treeify = require('treeify').asTree
code = "x(); function x(){}"
ast = esprima.parse(code)
console.log('--------')
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@kumavis
kumavis / index.js
Created October 17, 2013 19:45
requirebin sketch
var WTChannel = require('walkietalkie')
var team = WTChannel()
var shaggy = team.WalkieTalkie()
var scooby = team.WalkieTalkie()
var daphne = team.WalkieTalkie()
var fred = team.WalkieTalkie()
var velma = team.WalkieTalkie()
@kumavis
kumavis / gist:6890315
Created October 8, 2013 19:38
its javascript
((+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![
@kumavis
kumavis / gist:6512154
Created September 10, 2013 16:46
voxel js codegun - stairs
// hello world
var pos
for (var i=0;i<10;i++)
{
pos = hitBlock.slice()
pos[0] += i
for (var g=0;g<i;g++)
{