Skip to content

Instantly share code, notes, and snippets.

View saimonmoore's full-sized avatar

Saimon Moore saimonmoore

View GitHub Profile
@saimonmoore
saimonmoore / git.rake
Created September 3, 2008 09:30 — forked from defunkt/gist:4169
# by bryan helmkamp with slight modification by chris wanstrath
# and a bit of refactoring by saimon moore
# from http://www.brynary.com/2008/8/3/our-git-deployment-workflow
module GitCommands
extend self
def diff_staging
execute('git fetch')
puts `git diff origin/production origin/staging`
#
# 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:
//extend MooTools.lang to add support for pluralization..
(function(){
$extend(MooTools.lang, {
pluralise: function(key, delta) {
return this.get('Translations', 'pluralise', [key, delta]).substitute({delta: delta});
}
});
})();
MooTools.lang.set('en-US', 'Translations', {
var
PARALLEL_CONNECTS = 10,
http = require('http'),
sys = require('sys'),
connectionCount = 0,
messageCount = 0;
lastMessages = 0;
function addClient() {
/* Ismael Celis 2010
Simplified WebSocket events dispatcher (no channels, no users)
var socket = new ServerEventsDispatcher();
// bind to server events
socket.bind('some_event', function(data){
alert(data.name + ' says: ' + data.message)
});
@saimonmoore
saimonmoore / Gemfile
Created March 26, 2010 12:12 — forked from lifo/Gemfile
CRAMP Websocket example
gem 'cramp'
gem 'erubis', '2.6.5'
gem 'usher', "0.6.0"
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#

Terms of Service

Last revised on [DATE]

The Gist

[COMPANY] operates the [SERVICE] service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.

For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

Privacy Policy

Last revised on [DATE]

The Gist

[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.

We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.