Skip to content

Instantly share code, notes, and snippets.

@muppetjones
muppetjones / config.h
Last active April 9, 2024 23:53
QMK Dynamic Layer Lighting
/* (Optional) Define RGB settings in your config.h */
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_ANIMATIONS
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_LIMIT_VAL 150
# define RGBLIGHT_SLEEP
// # define RGBLIGHT_LAYERS // We do NOT need the layers!
#endif
@muppetjones
muppetjones / README.md
Last active August 26, 2023 15:18
QMK Mouse Movement via Encoders

Etch-a-mouse

NOTE: This gist is deprecated. I've moved everything into /users/muppetjones, and I have an open PR on the QMK repo. Eventually, this will probably be merged, and I'll (hopefully) remember to update this note.

@muppetjones
muppetjones / .vimrc
Last active April 9, 2022 15:01
Simple vimrc
syntax enable
filetype plugin indent on
colorscheme delek
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" ================ General Config ====================
@muppetjones
muppetjones / sandbox_sys_exit.py
Created June 13, 2021 17:05
Edge Case for SystemExit
#!/usr/bin/env python3
"""Example SystemExit edge case.
Try:except blocks should always be as explicit as possible about the errors
the catch; however, sometimes you really just need to catch anything. When
this "anything" happens, always catch "Exception" -- never use a bare except.
"But a bare except is the only way to catch everything", you say?
Nope. You just need to be more explicit: SystemExit, KeyboardInterrupt,
@muppetjones
muppetjones / colsize.py
Last active August 27, 2018 19:29
Print length of column names in a file.
#!/usr/bin/env python3
"""Print size of columns.
Usage:
$ python3 colsize.py ./ref_uniprot.csv
id: (1, 6)
ensembl_transcript_id: (0, 15)
feature_type: (4, 35)
feature_desc: (0, 747)
@muppetjones
muppetjones / FastQC_aggregate.sh
Last active August 29, 2015 14:26 — forked from danielecook/FastQC_aggregate.sh
Examine Fastqc reports in aggregate; brings images, statistics, and summaries together. #fastq
#!/bin/bash
# Run this script in project root--expected structure: `./fastqc/<sample>/*.zip`
# This script aggregates images of each type in individual folders
# o looking across data is quick.
zips=`ls fastqc/*/*.zip`
for i in $zips; do
unzip -oq -d "$(dirname "$i")" $i;
done
#!/bin/tcsh
#v3.91
########################################################################
# WHERE ARE ALL THE kSNP SCRIPTS?
# IF YOU INSTALLED kSNP ANYWHERE OTHER THAN /user/local THEN YOU MUST MODIFY THIS TO POINT TO THE DIRECTORY WHERE YOU HAVE INSTALLED kSNP SCRIPTS
set kSNP=/usr/local/kSNP3
#set kSNP=/g/g15/shea/kSNP3_Source
########################################################################
@muppetjones
muppetjones / setup_local_linux.sh
Last active August 29, 2015 14:25
Perform a local install of a variety of useful (e.g., necessary) softwares
#!/bin/bash
# Perform a local install of a variety of useful (e.g., necessary) softwares
#
# Ever had to use a server and found yourself frustrated due to lack of
# root access or simply not being able/allowed to modify the setup?
# Never fear!
#
# This script does the following:
# * Modifies *.vimrc to include line numbers and set tabs to four spaces
# * Install gcc-4.5.4 (and other required)
@muppetjones
muppetjones / slate_rotateApp.js
Last active August 29, 2015 14:10
Slate js Rotating App Focus
// slate_rotateApp.js
// Stephen J. Bush
// This snippet for slate js allows switching between a group of apps with a single keystroke.
// FIXED: Binding failed if an app in the list is not open.
// FIXED: Window object undefined for some apps or if window minimized.
// UPDATE: [12.05.14] Rotate now returns to the last used app in the group before rotating.
// NOTE: This only works when using the key binding as the 'windowFocused' event does not reliably trigger.
// TODO: Rotate between open windows for each app.
/*