⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
# === MIDI-Notes to solresol-colours in RubyProcessing. Example for the use of JRmidi, very basic Midi-Implementation for JRuby, especially for use with ruby-processing === | |
# --- ruby-processing see: http://wiki.github.com/jashkenas/ruby-processing / solresol is a universal language, where words can be put out as musical notes, colours or other --- | |
# --- solresol see: http://en.wikipedia.org/wiki/Solresol --- | |
# Notes have to come as MIDI-note-events from MIDI-in, and are so we can hear them redirected to a synth as well | |
# ! ==> adopt your MIDI-ports below !!!! | |
MIDI_PORT_IN = 0 # your MIDI-input where notes will be mapped to coulors | |
MIDI_PORT_OUT = 11 # select this port so, that is redirected to MIDI-in by hardware, with JACK, ableton live or something (ports are numbered from 0 to n, no difference if in or out) | |
MIDI_OUT_SYNTH = 9 # the OS-System's synth, port number may differ on your system |
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
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
Cycle array of URLs and process with phantom.js (http://www.phantomjs.org/) | |
Adds Array.prototype.forEachWebPage() iterator. | |
EXAMPLE: | |
Save screenshots. Command line: | |
phantomjs phantom_js_url_cycle.js ./screenshots | |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
[ |
- Add Heroku to your Gemfile and
bundle install
. - Create your Heroku app. This will only work with their (currently-beta)
'cedar' stack, so you have to
heroku create --stack=cedar
. - Create a Procfile for your bot. This tells Heroku how to run your worker. In
our case, the bot is bot.rb, so the only line in the Procfile is
cinch: bundle exec ./bot.rb
- Commit and push to Heroku.
- You do not want a Web worker running, so
heroku scale web=0 cinch=1
. This also sets up your deployments to restart the bot.
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
$gutter: 10px; | |
$grid-unit: 60px; | |
%clearfix { | |
*zoom: 1; | |
&:after { | |
content: "\0020"; | |
display: block; | |
height: 0; | |
clear: both; |
What zoom level is equivalent to a given altitude? In other words, if I’m looking at a map at ZL n, how high off the ground would I be to make out the same features?
This is from a question from Eric Fischer; my algebra and arithmetic are extremely rusty, so please check everything! Major assumptions:
-
We’re at the equator.
-
We’re looking straight down (which you can’t realistically do out a plane window, for example).
-
We have 20/20 vision (which is not as good as median corrected vision).
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
npm () { | |
if [ "$1" = "publish" ]; then | |
dependency-check . && $(which npm) "$@" | |
else | |
$(which npm) "$@" | |
fi | |
} |
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
/**package | |
{"name":"just-a-gist-package-nbd-whatevs","version":"1.2.3", | |
"description":"showoff", | |
"repository":"https://gist.github.com/2e776d98951973c8b857.git"} | |
**/ | |
module.exports = "just a gist pkg nbd whatevs" |
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
(function() { | |
function hashchange() { | |
if (!location.hash) { | |
return; | |
} | |
// Don't do anything if the current target exists. | |
if (document.querySelector(":target")) { | |
return; | |
} | |
var name = "user-content-" + decodeURIComponent(location.hash.slice(1)); |
OlderNewer