Skip to content

Instantly share code, notes, and snippets.

View rijnhard's full-sized avatar

Rijnhard Hessel rijnhard

View GitHub Profile
@rijnhard
rijnhard / jetbrains.txt
Created March 9, 2022 12:10
IntelliJ run Scratch Buffer with babel-node
Node Interpreter: /{project_root}/node_modules/.bin/babel-node
Node Parameters: --config-file "/{project_root}/.babelrc" --ignore "/{project_root}/node_modules"
Working Directory: /{project_root}
Environment Variables: NODE_PATH="/{project_root}/node_modules"
JavaScript File: {path to any file no matter location}
@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 / ext_calls.sql
Last active May 23, 2019 10:03
[finding calls for extensions] #freepbx
SET NAMES 'UTF8';
SET CHARACTER SET 'UTF8';
SET @EXT = 7443;
SET @EXTV = concat('vmu', @EXT);
SET @CHANNEL = concat('%/', @EXT, '-%');
SELECT * FROM asteriskcdrdb.cdr
where (
dstchannel LIKE @CHANNEL
@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){
@rijnhard
rijnhard / bitbucket_server_quay_hook_debug.sh
Last active May 23, 2019 10:04
[webhook for Quay] #bitbucket #docker
#!/bin/bash
#first parameter needs to be webhook endpoint
#the credentials to check the Bitbucket rest API need to be inserted into the Curls.
(
LAST_COMMIT=
BRANCH_NAME=
@rijnhard
rijnhard / docker
Last active June 28, 2020 07:55
[Consul + Registrator] #docker
#sysvinit /etc/default/docker
#append '--bip=172.17.42.1/24 --dns=172.17.42.1' to DOCKER_OPTS
DOCKER_OPTS="-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock --bip 172.17.42.1/24 --dns 172.17.42.1 --dns 8.8.8.8 --dns 8.8.4.4 --dns-search service.consul"
@rijnhard
rijnhard / macro
Last active May 23, 2019 10:06
[Confluence Apiary embed] #confluence #api #documentation
## Macro title: Apiary
## Macro has a body: Y
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Rijnhard Hessel
## Date created: 10/02/2016
## This is an example macro
## @param Subdomain:title=Subdomain|type=string|required=true|desc=Apiary subdomain to load