This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
NewerOlder