Skip to content

Instantly share code, notes, and snippets.

View jthoenes's full-sized avatar
👣

Johannes Thönes jthoenes

👣
View GitHub Profile
@jthoenes
jthoenes / insertion_sort_classical.scala
Created October 22, 2010 22:11
Insertion Sort Implementations in Scala
def insertionSort(unsortedList : List[String]) = {
val F = unsortedList.toArray
for(i <- (2 until F.length)){
val m = F(i)
var j = i;
while(j > 1 && !sorted){
if (F(j-1) >= m) {
F(j) = F(j-1)
j -= 1
}
svn log | ruby -e "puts STDIN.read.split(/\n/).select{|l| l =~ /^r\d+/}.map{|l| l.split('|')[1].strip}.uniq.sort"
@jthoenes
jthoenes / upgrade_dokuwiki.rb
Created January 24, 2010 14:14
Update multiple dokuwiki installations via a ruby script
#! /usr/bin/env ruby
=begin
This script backups and updates all dokuwiki installations on this server
Copyright (c) 2010 by Johannes Thönes <johannes.thoenes@googlemail.com>
Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
=end
# Library Requirements
require 'net/http' # for download of the files
require 'open-uri' # for download of the files
@jthoenes
jthoenes / gist:67736
Created February 20, 2009 22:11 — forked from jseifer/gist:67727
On Feb 20, 2009, at 4:24 PM, "Olusegun A.A" <xxxxxx@gmail.com> wrote:
** CRAIGSLIST ADVISORY --- AVOID SCAMS BY DEALING LOCALLY
** Avoid: wiring money, cross-border deals, work-at-home
** Beware: cashier checks, money orders, escrow, shipping
** More Info: http://www.craigslist.org/about/scams.html
Hello,
Do you still have this item available for sale at the moment? Get back asap.