Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
# db/migrate/20101004063749_create_photos.rb | |
class CreatePhotos < ActiveRecord::Migration | |
def self.up | |
create_table :photos do |t| | |
t.string :name, :null => false | |
t.binary :data, :null => false | |
t.string :filename | |
t.string :mime_type | |
t.timestamps |
{ | |
// The command to execute for the terminal, leave blank for the OS default | |
// On OS X the terminal can be set to iTerm.sh to execute iTerm | |
"terminal": "C:\\Windows\\System32\\cmd.exe", | |
// A list of default parameters to pass to the terminal, this can be | |
// overridden by passing the "parameters" key with a list value to the args | |
// dict when calling the "open_terminal" or "open_terminal_project_folder" | |
// commands | |
"parameters": ["/c sh --login -i"] |
# There are 3 levels of git config; project, global and system. | |
# project: Project configs are only available for the current project and stored in .git/config in the project's directory. | |
# global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. | |
# system: System configs are available for all the users/projects and stored in /etc/gitconfig. | |
# Create a project specific config, you have to execute this under the project's directory. | |
$ git config user.name "John Doe" | |
# Create a global config |
I was curious about making retro gaming sounds using Sonic Pi. A couple of months and a lot of Googling later, here's the original Mario Bros theme as it was heard on the NES console.
I'm (just about) old enough to remember rushing home from school to play this game at Philip Boucher's house, sitting cross-legged in front of the TV till my feet got pins and needles. Working out how to recreate it for Sonic Pi was a lot of fun!
(ns tuesday.song | |
(:require [overtone.live :refer :all] | |
[leipzig.melody :refer :all] | |
[leipzig.scale :as scale] | |
[leipzig.live :as live] | |
[leipzig.chord :as chord] | |
[leipzig.temperament :as temperament])) | |
; Instruments | |
(definst bass [freq 110 volume 1.0] |
change: path variable added for sonic-pi-cli binary sonic_pi so program can be configured to work on a Mac as well as a Pi
The jukebox.rb program, downloaded from the next file, should be run in an xterminal window in the gui, with Sonic Pi also loaded and running. Requires installation of sonic-pi-cli from https://github.com/Widdershin/sonic-pi-cli
Install this with:
cd ~
git clone https://github.com/Widdershin/sonic-pi-cli.git
in_thread do | |
loop do | |
sample :drum_bass_hard, amp: 2 | |
sleep 2 | |
end | |
end | |
in_thread do | |
loop do | |
sleep 1 |
theNotes = [:a2, :a3, :e3, :a4, :g4, :e4] | |
define :foo do |samp, n| | |
sample samp, | |
rate: pitch_ratio(note(n) - note(:a3)), | |
sustain: 0.05, | |
release: 0.1, | |
amp:3 | |
end |
def note_range_demo(low_note, high_note, options={}) | |
low_note = Note.resolve_midi_note(low_note) | |
high_note = Note.resolve_midi_note(high_note) | |
potential_note_range = Range.new(low_note, high_note) | |
if options[:pitches] | |
pitch_classes = options[:pitches].map {|x| Note.resolve_note_name(x) } | |
note_pool = potential_note_range.select {|n| |