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
# | |
# A simple onscreen midi-keyboard using Shoes and Midiator. | |
# No key-up Event. | |
# | |
# Set Keyboard layout here: | |
KEYBOARD_LAYOUT = :de # only :de and :us are supported, by now. See MidiKeymap#map_keys! | |
# | |
# You will need a midi input for this. | |
# On OSX you could use http://notahat.com/midi_patchbay | |
# and http://notahat.com/simplesynth or Garage Band |
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
# | |
# A try to built a simple drummachine using Shoes and Midiator. | |
# Unfortunalty animation seems to be quite processor heavy. Things might get slow.. | |
# Because of that, the beats don't get highlighted on beat. | |
# | |
# You will need a midi input for this. | |
# On OSX you could use http://notahat.com/midi_patchbay | |
# and http://notahat.com/simplesynth or Garage Band | |
# | |
# Usage: |
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
# | |
# Your previous .profile (if any) is saved as .profile.mpsaved | |
# Setting the path for MacPorts. | |
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH | |
# Setting PATH for MacPython 2.5 | |
# The orginal version is saved in .profile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}" | |
export PATH | |
export PATH=/usr/local/graphviz/bin:$PATH |
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
// import fullscreen.*; | |
import processing.video.*; | |
MovieMaker mm; | |
// FullScreen fs; | |
PImage img; | |
PGraphics mask; | |
String[] images; | |
int imgIndex = 0; | |
int xOffset; |
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
# An example for an OpenID consumer using Sinatra | |
require 'rubygems' | |
require 'sinatra' | |
gem 'ruby-openid', '>=2.1.2' | |
require 'openid' | |
require 'openid/store/filesystem' | |
helpers do | |
def openid_consumer |
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
<html> | |
<head> | |
<title>Coding</title> | |
<style type="text/css" media="screen"> | |
html { | |
font-size: 120%; | |
padding: 1em; | |
background-color:#FF6; | |
font-family: Helvetica, sans-serif; | |
} |
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
//######### How to send authenticity_token automatically with every Ajax.Request. | |
//######### This will be obsolete in Rails 3 (as Yehuda mentiones here : https://rails.lighthouseapp.com/projects/8994/tickets/2696-prototypehelper-no-auth-token-param-for-get-requests#ticket-2696-2) | |
//######### Put this in your application.js | |
// Monkeypatches Ajax.Base to include authenticity_token parameter unless its already there | |
(function() { | |
function insert_auth_token (options) { | |
var o = options || {}; | |
if (typeof(o.parameters) == "String" && !o.parameters.include("authenticity_token")) { | |
o.parameters = o.parameters + "&authenticity_token="+AUTH_TOKEN; |
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
# my stupid way to switch between ruby versions for one terminal session | |
# (ruby 1.9 is in /usr/local/bin. 1.8 is in /usr/bin) | |
export ORIGPATH=$PATH | |
alias r19='export PATH=$ORIGPATH' # currently ruby 1.9 is the default on this installation | |
alias r18='export PATH=/usr/bin:$ORIGPATH' |
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
From d22977fdec95113a937f557fdc07b7fe3c6c77c4 Mon Sep 17 00:00:00 2001 | |
From: Andreas Haller <[email protected]> | |
Date: Tue, 22 Sep 2009 15:43:05 +0200 | |
Subject: [PATCH] fixes checking for block parameter on Ruby 1.9 | |
I replaced | |
rb_block_given_p() != Qtrue | |
with | |
!rb_block_given_p() |
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
# geme (aka mategem, vigem..) - open gem source in $EDITOR | |
geme() { | |
_geme_init_gemdir | |
$EDITOR $GEMDIR/gems/`$(which ls) $GEMDIR/gems | grep -x $1.* | sort | tail -1`/ | |
} | |
_geme() { | |
_geme_init_gemdir | |
COMPREPLY=() | |
local curw=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=($(compgen -W '$(ls $GEMDIR/gems)' -- $curw)); |
OlderNewer