Skip to content

Instantly share code, notes, and snippets.

Ari Russo arirusso

Block or report user

Report or block arirusso

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
@arirusso
arirusso / open_ableton_project.scpt
Created Jun 13, 2015
Open Ableton Live project from CLI
View open_ableton_project.scpt
--- osascript open_ableton_project.scpt [project name]
on run argv
tell application "Finder"
--- get current directory
set parentpath to POSIX path of (parent of (path to me) as text)
end tell
tell application "Ableton Live 9 Suite"
open (POSIX path of parentpath) & "assets/ableton/" & item 1 of argv & " Project/" & item 1 of argv & ".als"
end tell
@arirusso
arirusso / jupiter-6_omni_off.rb
Created Apr 10, 2011
Switch off MIDI omni mode on a Roland Jupiter-6
View jupiter-6_omni_off.rb
require 'unimidi'
UniMIDI::Output.open(1) do |output|
output.puts(0xB0, 0x7C, 0)
output.puts(0xB0, 0x7F, 0)
end
@arirusso
arirusso / midi.yml
Created Apr 22, 2011
MIDI constants (YAML)
View midi.yml
controller:
Bank Select: 0
Modulation Wheel: 1
Breath Controller: 2
Foot Controller: 4
Portamento Time: 5
Data Entry MSB: 6
Channel Volume: 7
Balance: 8
@arirusso
arirusso / midi_notes_to_yaml.rb
Created Apr 30, 2011
generate MIDI note names/numbers in YAML format
View midi_notes_to_yaml.rb
# generate MIDI note names/numbers in YAML format
octaves = (0..10)
range = (0..127)
naturals = [
{ :name => "C", :val => 0 },
{ :name => "D", :val => 2 },
{ :name => "E", :val => 4 },
{ :name => "F", :val => 5 },
@arirusso
arirusso / sysctl.conf
Created Dec 14, 2011
tuned /etc/sysctl.conf
View sysctl.conf
kern.sysv.shmmax=1938751488
kern.sysv.shmmin=1
kern.sysv.shmmni=256
kern.sysv.shmseg=64
kern.sysv.shmall=1938751488
@arirusso
arirusso / postgresql.conf
Created Dec 14, 2011
tuned /usr/local/var/postgres/postgresql.conf
View postgresql.conf
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
@arirusso
arirusso / saturation1.rb
Created Mar 28, 2012
ruby-processing: video capture w/ saturation filter
View saturation1.rb
#!/usr/bin/env ruby
# only show pixels that pass a certain threshold of color saturation
class SaturationFilter < Processing::App
load_library :video
include_package "processing.video"
def setup
@arirusso
arirusso / capture-to-file.rb
Created Mar 28, 2012
ruby-processing: video capture to a file
View capture-to-file.rb
#!/usr/bin/env ruby
# this is a test of ruby-processing (https://github.com/jashkenas/ruby-processing) where
# captured video is written to a QuickTime file
# use "rp5 unpack library" at a command line to install the video library if you haven't
# tested with Ruby 1.9.2 on OSX with built in web cam
class VideoCaptureToFileTest < Processing::App
@arirusso
arirusso / vidsampler.rb
Created Apr 23, 2012 — forked from marcel/gist:2100703
vidsampler – extract audio samples from online video
View vidsampler.rb
#!/usr/bin/env ruby
#
# vidsampler – extract audio samples from online video
#
# for OSX only
#
# Usage:
#
# ruby vidsampler.rb [youtube url] [minute:second] [duration]
#
@arirusso
arirusso / expression_timer.rb
Created Apr 30, 2012
Ruby methods for protecting against timing attacks
View expression_timer.rb
#!/usr/bin/env ruby
#
# Ruby methods for protecting against timing attacks
#
module ExpressionTimer
# a shortcut to ExpressionTimer.send that passes in the object for which this module
# was included
#
You can’t perform that action at this time.