Skip to content

Instantly share code, notes, and snippets.

View Lenbok's full-sized avatar

Len Trigg Lenbok

  • Hamiltron, City of the Future
View GitHub Profile
@Lenbok
Lenbok / gist:7bfaf2ba590c05acfef3
Created July 8, 2014 22:59
Traffic-light / tinderbox style indicator columns in jenkins build history table
// Requires the groovy postbuild plugin. Supports several types of checkers
// Set debug to true if running in the jenkins groovy script console for testing, and update job name in the getJob call
// Set debug to false when added as groovy postbuild action
def debug = false
def job = debug ? Jenkins.getInstance().getJob("genopipe") : null
def build = debug ? job.getLastBuild() : manager.build
build.actions.each { action ->
if (debug) {
println(action.class.simpleName)
@Lenbok
Lenbok / na12878-trio.ped
Created March 8, 2017 21:04
Example ped file for NA12878 trio.
#PED format pedigree
#
#fam-id/ind-id/pat-id/mat-id: 0=unknown
#sex: 1=male; 2=female; 0=unknown
#phenotype: -9=missing, 0=missing; 1=unaffected; 2=affected
#
#fam-id ind-id pat-id mat-id sex phen
1 NA12878 NA12891 NA12892 2 0
1 NA12891 0 0 1 0
1 NA12892 0 0 2 0
@Lenbok
Lenbok / NA12878-trio.vcf
Created March 8, 2017 21:08
Example VCF specification of trio pedigree
##fileformat=VCFv4.1
##fileDate=20170309
##SAMPLE=<ID=NA12878,Sex=FEMALE>
##SAMPLE=<ID=NA12891,Sex=MALE>
##SAMPLE=<ID=NA12892,Sex=FEMALE>
##PEDIGREE=<Child=NA12878,Mother=NA12892,Father=NA12891>
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA12878 NA12891 NA12892
@Lenbok
Lenbok / keymap.c
Last active February 23, 2019 06:45
Example for qmk_firmware to turn rgb underglow off after a period of inactivity
#ifdef RGBLIGHT_ENABLE
#define IDLE_TIMEOUT 600000 // Blank underglow after 600 secs of inactivity
extern rgblight_config_t rgblight_config;
static uint32_t idle_timer;
static bool idle_timeout_enabled;
void keyboard_post_init_user(void) {
idle_timer = timer_read32();
idle_timeout_enabled = rgblight_config.enable ? true : false;
xprintf("idle_timeout init: idle_timeout_enabled = %u\n", idle_timeout_enabled);
}