Skip to content

Instantly share code, notes, and snippets.

View juliangruber's full-sized avatar

Julian Gruber juliangruber

View GitHub Profile
@juliangruber
juliangruber / gist:4143091
Created November 25, 2012 10:56
channel based network

Channel based network

This is about creating (social) networks without authorities or business censoring and storing all data in one locations.

Everybody has his own content and joins several channels. Channels are like chatrooms, in a way that everyone joined gets every update by everyone else and nothing persists. Channels can have restrictions, like:

  • an IRC style channel only allows for text
  • a twitter style channel allows 140 chars of text, links, pictures and videos
  • a facebook style channel allows text, links, pictures, albums, videos etc.
  • a creative channel allows canvas drawings with descriptions only
# bdunbar{0DD1D6364FD3AA0699A8B132} 1353965070602
This is nifty, I guess
# bdunbar{0DD1D6364FD3AA0699A8B132} 1353965130786
Just realized my instance of crytter is on a host that will never be exposed to 5000 from the internet
# julian{0DD1D6364FD3AA0699A8B132} 1353966289167
i see your messages
# julian{0DD1D6364FD3AA0699A8B132} 1353966310930
where is your host?
# devgeeks{C3ED27E7E1AA22E8C4D2CBC4} 1353976134845
So, do you just replicate one server and the chain is complete?
@juliangruber
juliangruber / gist:4216300
Created December 5, 2012 15:10
testling error
/usr/local/bin/testling -> /usr/local/lib/node_modules/testling/bin/cmd.js
> testling@0.2.5 install /usr/local/lib/node_modules/testling
> browserify node_modules/schoolbus/proxy.js -o static/proxy.js
/usr/local/lib/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/index.js:74
throw err0;
^
Error: EACCES, permission denied '/home/julian/.config/browserify'
@juliangruber
juliangruber / gist:4708298
Created February 4, 2013 17:52
level-light and pouchdb
var levelup
try {
levelup = require('levelup')
} catch (err) {
// level-light would only do the minimal work to provide the levelUp API 1:1
levelup = require('level-light')
}
db = levelup("somewhere")
@juliangruber
juliangruber / gist:5038979
Created February 26, 2013 14:53
log the number of open connections to mongodb to statsd
# log the number of open connections to mongodb to statsd
mongostat --noheaders --all 1 |
awk '{if (NR!=1) {print "mongodb01.connections:" $19 "|g"}}' |
nc -w 1 -u STATSD_HOSTNAME 8125
var chunks = [];
req.on('data', function (chunk) { chunks.push(chunk) });
req.on('end', function () {
var body = Buffer.concat(chunks);
});
@juliangruber
juliangruber / gist:5064274
Created March 1, 2013 12:19
hacky crash report
Process: Hacky [47231]
Path: /Applications/Hacky.app/Contents/MacOS/Hacky
Identifier: com.eliasklughammer.hackernews
Version: 1.1 (1.1)
App Item ID: 584949645
App External ID: 14000462
Code Type: X86-64 (Native)
Parent Process: launchd [134]
User ID: 501
@juliangruber
juliangruber / gist:5071867
Last active December 14, 2015 10:28
horst api

horst

Usage

Create a server that listens for hosts:

var horst = require('horst');
var hub = horst();
@juliangruber
juliangruber / gist:5072914
Last active December 14, 2015 10:38
possible leveldb podcast topics
  • quick overview of leveldb
  • Why are LevelDB and Node.js such a good match?
  • production use of levelup
  • cool modules that have been written
  • plugin approach / core & userland
  • levelDOWN & levelUP
  • levelJS
  • rvagg's approach to contributions
  • Why are random reads and writes so fast and why is that important?
  • What is an SST?
@juliangruber
juliangruber / gist:5081139
Created March 4, 2013 09:47
functional arguments fun
function indexOfFirstNumericArg (/* args... */) {
return [].slice.call(arguments)
.map(Number) // throw out strings
.map(Boolean) // convert truthy arguments to true
.indexOf(true) // find first position that is true
}
console.log(indexOfFirstNumericArg(null, 1337, 2, 'foo')); // => 1
function firstNumericArg (/* args... */) {