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
# -*- coding: ${1:utf-8} -*- | |
$0 |
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
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 [email protected]: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; |
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
sudo apt-get install build-essential wget libreadline5-dev libncurses5-dev zlib1g-dev libsqlite3-dev libssl-dev autoconf |
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
require 'rubygems' | |
require 'twibot' | |
i = 0 | |
`ps -A | grep apache`.each_line do |l| | |
unless l.include?('grep') | |
i += 1 | |
end | |
end |
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
# 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 %> |
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
function defineFunction(name, func) { | |
eval(name + " = " + String(func) + ";"); | |
} | |
defineFunction("hello", function(){ return 'world' }); | |
hello(); |
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
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: | |
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
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'"); |
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
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 |