Skip to content

Instantly share code, notes, and snippets.

View judoole's full-sized avatar

Ole Christian Langfjæran judoole

View GitHub Profile
@judoole
judoole / RemoteObjectLogger.java
Created August 15, 2012 08:04
Logging to Java-server Flex with AMF
@Service
@RemotingDestination
public class RemoteObjectLogger {
private static final String PRE_FLEX = "[FLEX] ";
protected final Log logger = LogFactory.getLog(getClass());
@RemotingInclude
public void log(String level, String message) {
if ("INFO".equals(level)) logger.info(PRE_FLEX + message);
else if ("DEBUG".equals(level)) logger.debug(PRE_FLEX + message);
@judoole
judoole / smoketest.sh
Created July 30, 2012 11:24
Smoketest shell script via curl
#!/bin/bash
if [ -z "$1" ]
then
echo "usage: smoketest.sh <url>"
exit 1
fi
status=`curl --silent --head $1 | head -1 | cut -f 2 -d' '`
@judoole
judoole / groovybddJUnitShit.java
Created October 7, 2011 13:24
GroovyBDDJUnitShit
@Test
public void skal_hente_alle_tenant_profiler() {
Gitt.at_tenant_profile_eksisterer(new TenantProfile(1, "Single"))
Gitt.at_tenant_profile_eksisterer([id:2, description:"Dubletter"])
Gitt.at_tenant_profile_eksisterer(new TenantProfile(id:3, description:"Tribletter"))
Naar.jeg_henter_informasjon_om_soknadslista()
Saa.skal_antallet_tenant_profiler_vaere(3)
}
_git_branches()
{
local cur
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
CURRENT=`git branch | grep '^*' | awk '{print $2}'`
local versions=$(git branch | grep -v $CURRENT)
COMPREPLY=($(compgen -W "${versions}" $cur))
}
complete -F _git_branches ship
require 'rubygems'
require 'spec'
require 'funfx/browser/firewatir'
BROWSER = FireWatir::Firefox.new
DEMO_APP = "location_of_application.html"
Before do
BROWSER.goto(DEMO_APP)