Skip to content

Instantly share code, notes, and snippets.

View stelcheck's full-sized avatar

Marc Trudel stelcheck

View GitHub Profile
@stelcheck
stelcheck / gist:9086085
Created February 19, 2014 04:29
VERR_VM_FATAL_WAIT_ERROR on OSX
VirtualBox VM 4.3.2 r90405 darwin.amd64 (Nov 1 2013 15:42:35) release log
00:00:00.059041 Log opened 2014-02-16T01:17:02.356778000Z
00:00:00.059041 Build Type: release
00:00:00.059041 OS Product: Darwin
00:00:00.059041 OS Release: 13.0.0
00:00:00.059041 OS Version: Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64
00:00:00.059881 DMI Product Name: MacBookPro8,1
00:00:00.059949 DMI Product Version: 1.0
00:00:00.059957 Host RAM: 8192MB total, 5071MB available
00:00:00.059959 Executable: /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless
@stelcheck
stelcheck / first
Last active August 29, 2015 13:56
npm publish fail
mt@kodachi:~/node-graylog2 (node-graylog2.git::master)$ npm publish
Now using NPM under Node.js v0.6.11
npm http PUT https://registry.npmjs.org/graylog2
npm http 201 https://registry.npmjs.org/graylog2
npm http GET https://registry.npmjs.org/graylog2
npm http 200 https://registry.npmjs.org/graylog2
npm http PUT https://registry.npmjs.org/graylog2/0.1.2/-tag/latest
npm http 201 https://registry.npmjs.org/graylog2/0.1.2/-tag/latest
npm http GET https://registry.npmjs.org/graylog2
npm http 200 https://registry.npmjs.org/graylog2
testing gist cli
@stelcheck
stelcheck / compile.sh
Last active August 29, 2015 14:04
MAGE test
g++ -g -Wall -std=c++0x -DHTTP_CONNECTOR -I ./src -I ./vendor/libjson-rpc-cpp/src -L ./vendor/libjson-rpc-cpp/build/out -L ./build -ljsonrpc -lmage -ldl /usr/lib/libcurl.dylib examples/test.cpp -o examples/test
@stelcheck
stelcheck / keybase.md
Created September 23, 2014 07:21
keybase.md

Keybase proof

I hereby claim:

  • I am stelcheck on github.
  • I am stelcheck (https://keybase.io/stelcheck) on keybase.
  • I have a public key whose fingerprint is 3F52 E937 81F2 D063 98A7 4B81 CDDD DB5F 58B9 642D

To claim this, I am signing this object:

@stelcheck
stelcheck / .bash_profile
Last active August 29, 2015 14:15
Tweet updates in your terminal
TWEET_FEED="/tmp/tweets"
TWEET_FEED_PIDFILE="/tmp/tweets.pid"
checkTweetsFetcher () {
TWEET_FEED_PID="$(cat ${TWEET_FEED_PIDFILE} 2> /dev/null)"
if
! kill -0 "${TWEET_FEED_PID}" 2> /dev/null
then
echo -n "Starting tweet feed check... " | green | bold
var ByteBuffer = require('bytebuffer');
var flatbuffers = require('./flatbuffers').flatbuffers;
var schema = require('./schema_generated.js').MyGame;
var count = 100000;
var builder = new flatbuffers.Builder();
var name = builder.createString('Holtzinger');
schema.Monster.startMonster(builder);
schema.Monster.addPos(builder, schema.Vec3.createVec3(builder, 1, 2, 3))
var mySecret = "All your base";
var found = false;
while (!found) {
var b = new Buffer(1000);
var str = b.toString('utf8')
if (str.indexOf(mySecret) > -1) {
found = true;
console.log('Found:', str);
}
@stelcheck
stelcheck / 01-runner.js
Last active April 18, 2021 03:54
REPL example for electron
'use strict'
const net = require('net')
const chalk = require('chalk')
const path = require('path')
const cp = require('child_process')
const rimraf = require('rimraf')
function getPath() {
@stelcheck
stelcheck / example.js
Last active September 7, 2016 11:34
CIDR from netmask
function hammingWeight(i) {
i = i - ((i >> 1) & 0x55555555);
i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
return ((i + (i >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
}
function netmaskToCIDR(netmask) {
let chunks = netmask.split('.')
if (chunks.length != 4) {
return false;