Skip to content

Instantly share code, notes, and snippets.

View ChaosSteffen's full-sized avatar

Steffen Schröder ChaosSteffen

View GitHub Profile
@ChaosSteffen
ChaosSteffen / gist:9176854
Last active August 29, 2015 13:56
Install postgis
brew install postgis
createdb -U steffen -E utf8 gis
psql -d gis -U steffen -f /usr/local/share/postgis/postgis.sql
psql -d gis -U steffen -f /usr/local/share/postgis/spatial_ref_sys.sql
brew install osm2pgsql --with-protobuf-c=$HOMEBREW_PREFIX/opt/protobuf-c
osm2pgsql -U steffen -H localhost -d gis district_of_columbia.osm
@ChaosSteffen
ChaosSteffen / framework.js
Created October 12, 2012 09:43
Small home-brew test-framework for the UI Automation Instrument
var target = UIATarget.localTarget();
var assert;
function should(text, testCase) {
if (testCase) {
UIALogger.logStart("It should " + text);
} else {
UIALogger.logStart("Pending: It should " + text);
UIALogger.logIssue("Test is set to 'pending'");
Copyright (c) 2011 Steffen Schröder, http://schroeder-blog.de/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
function defineFunction(name, func) {
eval(name + " = " + String(func) + ";");
}
defineFunction("hello", function(){ return 'world' });
hello();
# view
<%= render(:partial => “test_in_wrapper”, :collection => ["hello", "world"]) %>
# wrapper partial
some text before yield
<%= render(:partial => “test”, :locals => {:test => test_in_wrapper}) %>
some text after yield
# partial
<%= test %>
require 'rubygems'
require 'twibot'
i = 0
`ps -A | grep apache`.each_line do |l|
unless l.include?('grep')
i += 1
end
end
sudo apt-get install build-essential wget libreadline5-dev libncurses5-dev zlib1g-dev libsqlite3-dev libssl-dev autoconf
rootserver > mkdir /var/repo
rootserver > cd /var/repo
rootserver > git clone git://github.com/Santino/groovy-hudson.git
rootserver > cd groovy-hudson
rootserver > git remote add mirror git@gitorious.org:groovy-hudson/groovy-hudson.git
rootserver > crontab -e
*/1 * * * * git --git-dir=/var/repo/groovy-hudson/.git/ pull origin master; git --git-dir=/var/repo/groovy-hudson/.git/ push mirror master;
# -*- coding: ${1:utf-8} -*-
$0