Skip to content

Instantly share code, notes, and snippets.

View rijnhard's full-sized avatar

Rijnhard Hessel rijnhard

View GitHub Profile
@rijnhard
rijnhard / jbtb-open.sh
Last active September 10, 2019 08:48 — forked from aikar/jbtb-open.sh
#!/bin/bash
if [ $# -lt 3 ]; then
echo "$0 <app> <channel> <binpath> [*args]"
exit 1
fi
app=$1
channel=$2
binpath=$3
shift
shift
@rijnhard
rijnhard / bitwiseFlags.js
Last active May 23, 2019 10:05 — forked from keisans/bitwiseFlags.js
[flags in javascript] A javascript flags system based on bitwise function. This function allows for the representation of a flag state in a single base 10 number. This library also includes the ability to parse information about the flags, with functions to check if any (`hasAny`) or all (`hasAllOf`), of a group have been set, as well as their i…
/**
* @class Flags
* @constructor
* @param {Array} newFlags Optional array of flag keys to define when the flags module is instantiated
*/
Flags = function( newFlags ){
this.flags = 0;
this.flagHash = {};
this.keys = 0;
if(newFlags){