This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package xah-fly-keys | |
:diminish (xah-fly-keys . "∑") | |
:init | |
(setq xah-fly-use-control-key nil) | |
(defun xfk-command-mode-on () | |
(global-hl-line-mode 1) | |
(set-cursor-color "deep pink") | |
(setq cursor-type 'box) | |
) | |
(defun xfk-insert-mode-on () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run psql command to get to this | |
# Replace APP_NAME with application name | |
grant all privileges on database APP_NAME_dev to postgres; | |
grant all privileges on database APP_NAME_test to postgres; |
These instructions are mainly for my own personal reference and should not be considered a supported feature of Sonic Pi. For experimentation only. Assumes OSX 10.10
- Setup a virtual midi channel on OSX
This is sometimes referred to as a "loopback" device and it should allow the various software applications to communicate.
- Open
/Applications/Utilities/Audio\ MIDI\ Setup.app/
and go to "Window > Show MIDI studio".
These instructions are mainly for my own personal reference and should not be considered a supported feature of Sonic Pi. For experimentation only. Assumes OSX 10.10
- Setup a virtual midi channel on OSX
This is sometimes referred to as a "loopback" device and it should allow the various software applications to communicate.
- Open
/Applications/Utilities/Audio\ MIDI\ Setup.app/
and go to "Window > Show MIDI studio".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Taken from http://stackoverflow.com/questions/5867534/how-to-save-canvas-data-to-file/5971674#5971674 | |
*/ | |
var fs = require('fs'); | |
// string generated by canvas.toDataURL() | |
var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0" | |
+ "NAAAAKElEQVQ4jWNgYGD4Twzu6FhFFGYYNXDUwGFpIAk2E4dHDRw1cDgaCAASFOffhEIO" | |
+ "3gAAAABJRU5ErkJggg=="; | |
// strip off the data: url prefix to get just the base64-encoded bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DUBSTEP | |
# Combines ideas from my other gists | |
current_bpm = 140.0 | |
use_bpm current_bpm | |
# WOBBLE BASS | |
define :wob do | |
use_synth :dsaw | |
lowcut = note(:E1) # ~ 40Hz | |
highcut = note(:G8) # ~ 3000Hz |