Skip to content

Instantly share code, notes, and snippets.

Marcus Besjes marcusbesjes

  • Besjes Digital
  • Amsterdam
Block or report user

Report or block marcusbesjes

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 hub.js
var Hub = module.exports = function(options) {
this.options = options;
this.view.init(this);
};
require('./view');
require('./log');
View index.js
module.exports = function makeStuff(n, uid) {
if (!uid) uid = 0;
var results = {
rooms: {},
clients: {},
users: {}
}
var room, client, user;
@marcusbesjes
marcusbesjes / full log
Created Oct 17, 2014
server logs on reconnect loop
View full log
Data":{"NL":{"en":{"terms":{"0":{"text":true}}}}},"_v":{"ip-172-30-0-100":1413559158510.004}},{"mtvData":{"NL":{"en":{"about":{"0":{"title":true}}}}},"_v":{"ip-172-30-0-100":1413559158510.004}},{"mtvData":{"NL":{"en":{"about":{"0":{"img":true}}}}},"_v":{"ip-172-30-0-100":1413559158510.004}},{"mtvData":{"NL":{"en":{"about":{"0":{"text":true}}}}},"_v":{"ip-172-30-0-100":1413559158510.004}},{"mtvData":{"NL":{"en":{"faq":true}}}},{"mtvData":{"NL":{"en":{"shows":{"*":[[{"condition":{"title":{"$contains":""}},"sort":"title"},{"$":{"img":true,"title":true,"number":true,"seasonCount":true,"episodeCount":true,"subtitle":true,"duration":true,"description":true}}]]}}}},"_v":{"ip-172-30-0-100":1413559158510.004}}]}" +0ms
engine:socket packet +1ms
engine handling "GET" http request "/primus/?_primuscb=1413562666531-0&EIO=3&transport=polling&t=1413571208159-57&b64=1&sid=xL9wxwYa93CT3D6GAAAk" +26ms
engine setting new request for existing client +1ms
engine:polling setting request +0ms
engine handling "POST" http r
@marcusbesjes
marcusbesjes / gist:0a390c60c3bde8360c64
Created Jul 3, 2015
for var key in obj - keys out of order
View gist:0a390c60c3bde8360c64
var obj1 = {}
define(obj1, 'firstkey', {
get: function() {
return 'firstkey value'
},
enumerable: true
})
var Obj2 = function() {}
View gist:4112fdaa9b1c758d0469
var pattern = {
'*': {
'*': {
'otherfile': true
},
'master': {
'packagef.json': true
}
}
}
View helloWorld.js
var packagejson = {
"dependencies": {
"vjs": "git+ssh://git@github.com/vigour-io/vjs#develop"
}
}
var Observable = require('vjs/lib/observable')
var list = new Observable()
@marcusbesjes
marcusbesjes / nika_npm.js
Last active Jan 15, 2016
very nice npm trickery
View nika_npm.js
'use strict'
var cp = require('child_process')
var fs = require('fs')
var installOthersSetting = true
const GLOBAL_MODULES = __dirname + '/hacked_node_modules'
var mySetup = {
vjs: 'feature/consolidate',
@marcusbesjes
marcusbesjes / dump 1
Created Jul 11, 2017
adm-scraper-408-logs
View dump 1
{
"startedScraper": "04/07/2017 @ 14:57:04",
"startedCycle": "11/07/2017 @ 07:46:10",
"successfulCycle": "11/07/2017 @ 07:46:10",
"cycleCount": 8030,
"paused": false,
"phase": [
"scraping",
"11/07/2017 @ 07:46:10"
],
You can’t perform that action at this time.