Skip to content

Instantly share code, notes, and snippets.

for d in `find . -maxdepth 1 -type d`; do cd $d; if [ -d .git/svn/trunk ] ; then echo $d && git svn rebase; fi; cd -; done
@jabley
jabley / sort.scala
Created November 4, 2009 16:14 — forked from Lytol/selection_sort.scala
sort.scala
// Inmperative version
//
def selectionSort(list: Array[Int]): Unit {
def swap(list: Array[Int], i: Int, j: Int) {
var tmp = list(i)
list(i) = list(j)
list(j) = tmp
}
var i = 0
svn: OPTIONS of 'https://svn.terracotta.org/repo/ehcache/ehcache-core': authorization failed: Could not authenticate to server: rejected Basic challenge (https://svn.terracotta.org)
jabley@miq-jabley:~/work/eclipse/git$ svn checkout http://svn.terracotta.org/repo/ehcache/ehcache-core ehcache-core
svn: OPTIONS of 'http://svn.terracotta.org/repo/ehcache/ehcache-core': 200 OK (http://svn.terracotta.org)
jabley@miq-jabley:~/work/eclipse/git$
@jabley
jabley / gears-linux-x86-r3410.patch
Created November 11, 2009 20:06
Patch to Google Gears to build on Linux x86
Index: gears/localserver/common/localserver_db.cc
===================================================================
--- gears/localserver/common/localserver_db.cc (revision 3410)
+++ gears/localserver/common/localserver_db.cc (working copy)
@@ -26,6 +26,7 @@
#include "gears/localserver/common/localserver_db.h"
#include <stdlib.h>
+#include <stdio.h>
#include <time.h>
@jabley
jabley / gist:248153
Created December 3, 2009 13:30
ehcache trunk DiskStore patch for improved concurrency
Index: src/main/java/net/sf/ehcache/store/DiskStore.java
===================================================================
--- src/main/java/net/sf/ehcache/store/DiskStore.java (revision 1470)
+++ src/main/java/net/sf/ehcache/store/DiskStore.java (working copy)
@@ -46,6 +46,7 @@
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.Element;
import net.sf.ehcache.Status;
+import net.sf.ehcache.concurrent.ConcurrencyUtil;
import net.sf.ehcache.config.CacheConfiguration;
@jabley
jabley / gist:248157
Created December 3, 2009 13:32
ehcache 1.6.2 DiskStore patch for improved concurrency
Index: src/main/java/net/sf/ehcache/store/DiskStore.java
===================================================================
--- src/main/java/net/sf/ehcache/store/DiskStore.java (revision 1486)
+++ src/main/java/net/sf/ehcache/store/DiskStore.java (working copy)
@@ -21,6 +21,7 @@
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.Element;
import net.sf.ehcache.Status;
+import net.sf.ehcache.concurrent.ConcurrencyUtil;
import net.sf.ehcache.config.CacheConfiguration;
/* Use this to cause a function to fire no more than once every 'ms' milliseconds.
For example, an expensive mousemove handler:
$('body').mouseover(ratelimit(function(ev) {
// ...
}, 250));
*/
function ratelimit(fn, ms) {
var last = (new Date()).getTime();
/**
Node.js script to serve a file locally, letting you set appropriate Content-Type
TODO : parameterise
*/
var sys = require('sys'),
fs = require('fs'),
http = require('http');
http.createServer(function (request, response) {
rvm install rubinius
Installing pre-requisites
Extracting rubinius-1.0.0-.tar.gz ...
mv: rename /Users/jabley/.rvm/src/rubinius-1.0.0 to /Users/jabley/.rvm/src/rubinius: No such file or directory
/Users/jabley/.rvm/scripts/manage: line 304: cd: /Users/jabley/.rvm/src/rubinius: No such file or directory
chmod: ./configure: No such file or directory
Configuring rbx
Error running './configure --prefix=/Users/jabley/.rvm/rubies/rubinius ', please check /Users/jabley/.rvm/log/rubinius/configure*.log
There has been an error while running './configure --prefix=/Users/jabley/.rvm/rubies/rubinius '. Aborting the installation.
clojure:~ jabley$ rvm use 1.8.7
Using ruby 1.8.7 p249
clojure:~ jabley$ irb
ruby-1.8.7-p249 > require 'digest'
=> true
ruby-1.8.7-p249 > Digest::MD5.digest('hello', 'stuff', 'another one')
ArgumentError: wrong number of arguments (2 for 0)
from (irb):2:in `initialize'
from (irb):2:in `digest'
from (irb):2