Skip to content

Instantly share code, notes, and snippets.

@rbnpi
rbnpi / BachSend1.rb
Last active November 17, 2018 18:39
Experimental program to receive notes from a second machine running SP 2.12beta and play them in synchronism. Requires a processing script to run on each machine as well. Video at https://youtu.be/jc45yr-LUNc
#experimental program one to send notes to
#SP running on a second computer, using OSC sync
use_osc "localhost", 8000
sleep 1 #allow OSC time to setup
use_synth :piano
with_fx :reverb,room: 0.6 do
a1=[]
b1=[]
a1[0]=[:r,:C4,:D4,:E4,:F4,:D4,:E4,:C4,:G4,:C5,:B4,:A4,:B4,:C5,:D5,:G4,:A4,:B4,:C5,:A4,:B4,:G4,:D5,:G5,:F5,:E5,:F5,:G5,:E5,:A5,:G5,:F5,:E5,:G5,:F5,:A5,:G5,:F5,:E5,:D5,:C5,:E5,:D5,:F5,:E5,:D5,:C5,:B4,:A4,:C5,:B4,:D5,:C5,:B4,:A4,:G4,:Fs4,:A4,:G4,:B4,:A4,:D4,:C5,:B4,:C5,:D5,:B4,:A4,:G4,:Fs4,:E4,:G4,:Fs4,:A4,:G4,:B4,:A4,:C5,:B4,:D5,:C5,:E5,:D5,:B4,:C5,:D5,:G5,:B4,:C5,:B4,:A4,:G4,:G4,:r,:r,:G4,:A4,:B4,:C5,:A4,:B4,:G4,:Fs4,:G4,:Fs4,:r,:r,:A4,:B4,:C5,:D5,:B4,:C5,:A4,:B4,:r,:r,:D5,:C5,:B4,:A4,:C5,:B4,:D5,:C5,:r,:r,:E5,:D5,:C5,:B4,:D5,:Cs5,:E5,:D5,:Cs5,:D5,:E5,:F5,:A4,:B4,:Cs5,:D5,:Fs4,:Gs4,:A4,:B4,:C5,:D5,:E4,:Fs4,:Gs4,:A4,:Fs4,:Gs4,:E4,:E5,:D5,:C5,:E5,:D5,:C5,:B4,:D5,:C5,:A5,:Gs5,:B5,:A5,:E5,:F5,:D5,:Gs4,:F5,:E5,:D5,:C5,:D5,:C5,:B4,:A4,:A4,:A5,:G5,:F5,:E5,:G5,:F5,:A5,:G5,:G5,:E5,:F5,:G5,:A5,:F5,:G5,:E5,:F
@krishamoud
krishamoud / app.config
Last active June 3, 2019 11:18
Deploy Meteor onto Elastic Beanstalk
option_settings:
- option_name: AWS_SECRET_KEY
value: -------------------------------------------
- option_name: AWS_ACCESS_KEY_ID
value: ------------------------------
- option_name: PORT
value: 8081
# Node-WebKit CheatSheet
# Download: https://github.com/rogerwang/node-webkit#downloads
# Old Versions: https://github.com/rogerwang/node-webkit/wiki/Downloads-of-old-versions
# Wiki: https://github.com/rogerwang/node-webkit/wiki
# How: https://github.com/rogerwang/node-webkit/wiki/How-node.js-is-integrated-with-chromium
# 1. Run your application.
# https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps
@millermedeiros
millermedeiros / osx_setup.md
Last active May 7, 2024 08:01
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@crosbymichael
crosbymichael / Dockerfile
Last active January 8, 2022 13:47
Docker with supervisor
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y openssh-server supervisor
ADD sshd.conf /etc/supervisor/conf.d/sshd.conf
RUN mkdir -p /var/run/sshd
@mekwall
mekwall / bandwidth.js
Created January 4, 2013 22:50
How to measure bandwidth of a server in Node.js (and some other statistics)
const net = require("net");
var server = net.createServer(function (c) {
var oldWrite = c.write;
c.write = function(d) {
if (!Buffer.isBuffer(d)) {
d = new Buffer(d);
}
oldWrite.call(this, d);
server.bytesSent += d.length;

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@jtescher
jtescher / gist:1487555
Created December 16, 2011 19:31
Capistrano task: Optimize images with pngcrush and jpegoptim
namespace :image_compression do
desc 'Optimize images with pngcrush and jpegoptim'
task :process do
# Check for pngcrush
if (!`which pngcrush`.empty? rescue false) # rescue on environments without `which` (windows)
# Crush all .png files
run "find #{shared_path}/assets/ -type f -name '*.png' -print0 | xargs -0 pngcrush -q -e .crushed"
@kevinold
kevinold / deploy.rb
Created July 26, 2011 20:55 — forked from jeronimo/deploy.rb
Capistrano recipe to sync rails MongoDB and files
set :sync_directories, ["public/system/images"]
set :sync_backups, 3
set :db_file, "mongoid.yml"
set :db_drop, '--drop' # drop database (rewrites everything)
@josiahcarlson
josiahcarlson / redis_simple_chat.py
Created June 24, 2011 22:07
A way of implementing a poll-based chat inside Redis
'''
redis_simple_chat.py
Written June 24, 2011 by Josiah Carlson
Released under the GNU GPL v2
available: http://www.gnu.org/licenses/gpl-2.0.html
Other licenses may be available upon request.