Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block eethann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
eethann /
Last active Jan 22, 2019 — forked from fmartingr/
Add check for empty ID, to avoid unhandled error where no ID specified
task rofi rc.verbose=nothing > $TMPFILE
TASK=`rofi -dmenu -p "Task: " -i -input $TMPFILE`
TASK_ID=`echo $TASK | cut -f1 -d' '`
View modal-digits.sketch.clj
;; # Explorations for notating note sequences through numbers in different bases.
;; This sketch explores an API to represent a note via a number of a fixed
;; number of digits in the base of the number of notes in the mode.
;; Examples: 7r030 for C3, 7r072 for E7 (if major mode)
;; This approach has the benefit of equivalence between addition and transposition:
;; `(+ 7r013 7r010) => 7r023` and `(+ 7r011 7r006) => 7r020`
View sequence.clj
;; TODO need to refactor this to put the entire let into the macro and use gensym form to escape
(defmacro apply-by-next-n-bar
"Schedule a function by n bars in the future"
[m bar-period & rest]
(let [
next-bar-num (metro-next-periodic-bar m bar-period)
`(apply-by-bar ~m ~next-bar-num ~@rest)
# Adapted PHP CodeSniffer pre-commit hook for git
# @author Ethan Winn <>
# @author Soenke Ruempler <>
# @author Sebastian Kaspari <>
# See the original project README:
# Below is a quick example of how CoffeeScript can be used to easily template JSON
# CoffeeScript has a few notable features for this role:
# 1. It has existential accessors, so you safely invoke nested properties w/o checking for their existence explicitly (`myObj.someOptionalProp?.someOtherOptProp?.val)
# 2. Using the "do" constrution you can execute anonymous functions that return objects in place, allowing fairly straightforward conditional json properties and other pre-processing.
# 3. Using multi-line object definitions and the underscore extend method, it's fairly literate to intermingle code with basic json values.
# 4. It's object notation is nice.
eethann / Vagrantfile
Created Oct 29, 2012
Vagrant/Knife issue background materials
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby : do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at
# Every Vagrant virtual environment requires a box to build off of. = "MyCentOS_base"
eethann / branch.js
Created Oct 14, 2012
Mongoose Tree Schema
View branch.js
// An excerpt from a Mongoose model.js file for use with Express:
// Sub-document to store parent ref along with it's value (a form of caching)
var Parent = new Schema({
id: ObjectId
, text: String
// Main tree-node element schema
var Branch = new Schema({
View eethann-mixins.scss
/* mixin for background images */
/* from */
/* may also use compass `replace-text-with-dimensions` */
@mixin knockout($_img) {
background:url($_img) no-repeat;
eethann / _.objMapFunctions.js
Created Aug 23, 2012
Underscore mixin with common iterator functions adapted to work with objects and maintain key/val pairs.
View _.objMapFunctions.js
// ### _.objMap
// for objects, keeps key/value associations
objMap: function (input, mapper, context) {
return _.reduce(input, function (obj, v, k) {
obj[k] =, v, k, input);
return obj;
}, {}, context);
// ### _.objFilter
eethann / gist:3343372
Created Aug 13, 2012
emacs init.el for a Node.js REPL via js-comint
View gist:3343372
(require 'js-comint)
(setq inferior-js-program-command "node") ;; not "node-repl"
;; Use your favorited js mode here:
(add-hook 'js3-mode-hook '(lambda ()
(local-set-key "\C-x\C-e"
(local-set-key "\C-\M-x"
(local-set-key "\C-cb"
You can’t perform that action at this time.