Skip to content

Instantly share code, notes, and snippets.

Dave Yarwood daveyarwood

Block or report user

Report or block daveyarwood

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
@daveyarwood
daveyarwood / debugging-alda-up-issues.md
Created Apr 13, 2019
Debugging `alda up` issues (hanging waiting on workers, etc.)
View debugging-alda-up-issues.md
  1. Start a server in the foreground:
$ ALDA_DISABLE_SUPERVISOR=yes alda -v -p 27714 -w 0 server

You should see output like the following:

19-04-13 00:32:31 moondog INFO [alda.server:243] - Binding frontend socket on port 27714...
View keybase.md

Keybase proof

I hereby claim:

  • I am daveyarwood on github.
  • I am daveyarwood (https://keybase.io/daveyarwood) on keybase.
  • I have a public key ASB6ddX1Ndj1kkDK0O_jMhphWldMoERIjUmxh0uz6Bch0go

To claim this, I am signing this object:

@daveyarwood
daveyarwood / .bashrc
Created May 10, 2018
Taskwarrior "task ready count" in Bash prompt
View .bashrc
tasks_ready() {
which task >/dev/null || return
tasks_ready=$(task ready 2>/dev/null | grep -E '[0-9]+ tasks?')
if [[ -n "$tasks_ready" ]]; then
echo " ($tasks_ready ready)"
fi
}
PS1='\u@\h:\w$(tasks_ready) \$ '
@daveyarwood
daveyarwood / random-bongos.alda
Created Apr 24, 2017
randomly generated bongos
View random-bongos.alda
(defn random-bongos
[ticks vol-min vol-max]
[(octave 4)
(set-duration 0.25) ; 16th notes
(let [notes (-> #{[:c] [:c :sharp] [:d] [:d :sharp] [:e]}
(->> (map #(note (apply pitch %))))
(conj (pause)))
rand-note #(rand-nth notes)
rand-vol #(vol (+ vol-min (rand-int (- vol-max vol-min))))
tick #(vector (rand-vol) (rand-note))]
View madlib.rb
#!/usr/bin/env ruby
template = <<~HEREDOC
{{plural noun}} are {{color}},
{{plural noun}} are {{color}},
{{food}} is {{adjective}},
and so are you.
HEREDOC
def prompt(type)
View hideKanbanBoardNoise.js
var expectedOrgName = 'AdzerkBC';
var expectedBoardName = 'The Sprint Board';
function getOrgName() {
return $('.board-header-btn-org-name .board-header-btn-text').text();
}
function getBoardName() {
return $('.board-header-btn-name .board-header-btn-text').text();
}
@daveyarwood
daveyarwood / alda-repl-session
Created Nov 14, 2016
alda voice continuation example
View alda-repl-session
$ alda repl
Nov 14, 2016 8:12:00 AM com.jsyn.engine.SynthesisEngine start
INFO: Pure Java JSyn from www.softsynth.com, rate = 44100, RT, V16.7.3 (build 457, 2014-12-25)
Preparing MIDI system... done.
█████╗ ██╗ ██████╗ █████╗
██╔══██╗██║ ██╔══██╗██╔══██╗
███████║██║ ██║ ██║███████║
██╔══██║██║ ██║ ██║██╔══██║
██║ ██║███████╗██████╔╝██║ ██║
@daveyarwood
daveyarwood / clapping_music.alda
Created Aug 20, 2016
Steve Reich's "Clapping Music" in Alda
View clapping_music.alda
# Clapping Music (1972)
# for two performers
#
# Steve Reich
#
# sheet music:
# https://sites.ualberta.ca/~michaelf/SEM-O/SEM-O_2014/Steve's%20piece/clapping_reich.jpg
(def clap (alda-code "o2 d+8"))
@daveyarwood
daveyarwood / radiohead-chords.alda
Created Aug 6, 2016
An exercise in randomly generated "Radiohead chord" sequences
View radiohead-chords.alda
# Ben Levin's "Radiohead Chord Generator" video:
# https://www.youtube.com/watch?v=iYU_2hfFPM0
# Rules:
#
# From a MAJOR chord (e.g. C), you can:
# - move to the parallel minor (Cm)
# - move down to the relative minor (Am)
# - move up 1/2 step to a minor chord (Dbm)
View gist:28f135b0241f29826fd6
$ boot -d clj-image2ascii repl
boot.user=> (require '[clj-image2ascii.core :refer :all])
nil
boot.user=> (convert-image
#_=> (get-image-by-url (java.net.URL. "http://evansheline.com/wp-content/uploads/2011/06/cute-cat.jpg (40KB) "))
#_=> 60 false)
{:width 60, :height 58, :color? false, :image <long-ass string here>}
You can’t perform that action at this time.