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
#!/bin/bash | |
if [ $UID = 0 ] | |
then | |
script=$0 | |
test -f $script || script=$(pwd)/$(basename $0) | |
/usr/bin/sudo -u oc -H $script "$*" | |
exit | |
fi |
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
Feature: Google | |
In order to test a remote site | |
I surf to google | |
And take a look | |
Scenario: Trying Google | |
When I go to the homepage | |
And I fill in "Aslak Hellesoy" for the field named "q" | |
And I press "Google Search" | |
Then I should see "So little to do - so much time" |
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
val chars = "abcdefghijklmnopqrstuvwxyz" | |
val rand = new scala.util.Random(System.currentTimeMillis) | |
def randChar(upperCase:Boolean) = { | |
val ch = chars(rand.nextInt(chars.length - 1)) | |
if (upperCase) ch.toUpperCase else ch | |
} | |
scala> "Ole Christian Rynning".split(" ").map(_.map(ch => randChar(ch.isUpperCase)).mkString).mkString(" ") | |
res0: String = Aee Ochbivgjm Vgxwuuc |
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
package no.rynning; | |
import org.mortbay.jetty.Connector; | |
import org.mortbay.jetty.Server; | |
import org.mortbay.jetty.nio.SelectChannelConnector; | |
import org.mortbay.jetty.webapp.WebAppContext; | |
/** | |
* OC's jettylauncher. DON'T MODIFY OR MOVE PLEASE! | |
*/ |
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 'cucumber' | |
require 'capybara' | |
require 'capybara/cucumber' | |
require 'capybara/session' | |
Before do | |
Capybara.current_driver = :selenium |
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
// this allows culerity to wait until all ajax requests have finished | |
jQuery(function($) { | |
var original_ajax = $.ajax; | |
var count_down = function(callback) { | |
return function() { | |
try { | |
if(callback) { | |
callback.apply(this, arguments); | |
}; | |
} catch(e) { |
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
package no.muda.jetty; | |
import org.constretto.ConstrettoBuilder; | |
import org.constretto.ConstrettoConfiguration; | |
import org.eclipse.jetty.server.Server; | |
import org.eclipse.jetty.server.handler.HandlerList; | |
import org.eclipse.jetty.webapp.WebAppContext; | |
import org.springframework.core.io.DefaultResourceLoader; | |
import java.io.IOException; |
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
# "Understanding Python's closures". | |
# | |
# Tested in Python 3.1.2 | |
# | |
# General points: | |
# | |
# 1. Closured lexical environments are stored | |
# in the property __closure__ of a function | |
# | |
# 2. If a function does not use free variables |
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
Gems: | |
gem 'cucumber' | |
gem 'cucumber-rails' | |
gem 'rspec' | |
gem 'rspec-rails' | |
gem 'capybara' | |
gem 'database_cleaner' | |
gem 'spork' | |
gem 'watchr' |
OlderNewer