Skip to content

Instantly share code, notes, and snippets.

View hongaar's full-sized avatar
🚧
(in development)

Joram van den Boezem hongaar

🚧
(in development)
View GitHub Profile
@hongaar
hongaar / docker-proxy.js
Created January 4, 2019 11:03
docker-proxy
const net = require('net')
const port = process.env['PORT'] || 5000
function log (...args) {
// console.log(...args)
}
function onConnect (socket) {
log('new connection')
@hongaar
hongaar / _service.md
Last active June 22, 2016 07:45 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)

Keybase proof

I hereby claim:

  • I am hongaar on github.
  • I am joram (https://keybase.io/joram) on keybase.
  • I have a public key whose fingerprint is D98D D5EF 631E 9103 26BD 39DF 916A C24E ABBC 6B44

To claim this, I am signing this object:

@hongaar
hongaar / npm-debug-1.log
Created November 7, 2015 14:59
npm install opens a lot of connections and hangs
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli 'install',
npm verb cli 'grunt-contrib-uglify',
npm verb cli '-g',
npm verb cli '-ddd' ]
npm info using npm@3.3.6
npm info using node@v5.0.0
[...]
@hongaar
hongaar / tabswitcher.html
Created July 9, 2015 12:10
Browser Tab Switcher script
<a href="admin" target="admin" class="tabswitcher">admin section</a>
<a href="./" target="site" class="tabswitcher">view site</a>
@hongaar
hongaar / UuidTrait.php
Created September 30, 2014 12:09
Laravel UuidTrait for Eloquent
<?php
use Rhumsaa\Uuid\Uuid;
trait UuidTrait
{
/**
* Boot the Uuid trait for the model.
*
* @return void
@hongaar
hongaar / 2048_pattern_tester.js
Last active August 29, 2015 14:05
2048 kickstart for use on i.e. http://gabrielecirulli.github.io/2048/ (only tested in Chrome)
// Sequence of keys to press
var sequence = "luuluuruuruuluuluuruuruu"; // averaging 4000
var stalledKey = "d";
// How many iterations you want to try?
var iterations = 100;
// Stop trying at minimum score of
var haltat = 5000;