Skip to content

Instantly share code, notes, and snippets.

View stefanbirkner's full-sized avatar

Stefan Birkner stefanbirkner

View GitHub Profile
@stefanbirkner
stefanbirkner / bash_cheat_sheet.md
Last active June 21, 2018 18:08
My Bash Cheat Sheet

Show the exit code of the last command:

echo $?

Reuse the last part of the previous command:

new_command !!:$

Remove new line from end of file

##About Rules and Runners

Stefan Birkner

@stefanbirkner

##JUnit – The Basics

public class MyTest {

@Test

@stefanbirkner
stefanbirkner / ReadmeDrivenDevelopment.md
Created May 26, 2014 16:46
Readme Driven Development

Readme Driven Development

Problem

Build software that helps people.

Solution

@stefanbirkner
stefanbirkner / demo_slides2go.md
Created May 22, 2014 20:10
Demo for Slides 2 Go

Demo for Slides 2 Go

Just a nice text.

@stefanbirkner
stefanbirkner / commons_lang.sh
Created January 31, 2014 16:50
Migrate Apache Commons Lang from 2.x to 3.x
fgrep -Rl "commons.lang." . | xargs sed -i 's/apache\.commons\.lang\./apache.commons.lang3./g' $1
@stefanbirkner
stefanbirkner / Eclipse Plugins.md
Created October 11, 2013 07:34
A list of nice Eclipse plugins.
@stefanbirkner
stefanbirkner / mvn_bisect.sh
Created October 10, 2013 10:12
Automatic 'git bisect' with Maven; git bisect run ./mvn_bisect.sh
#!/bin/sh
mvn clean test > /dev/null 2> /dev/null
@stefanbirkner
stefanbirkner / git_snippets.txt
Created October 7, 2013 09:23
A collection of useful Git snippets.
git diff --name-only master <branch> //List of the changed files
@stefanbirkner
stefanbirkner / deleteDuplicates.sql
Created July 1, 2013 10:12
Delete duplicates in a table.
-- replace idfield, duplicatewitness and mytable with appropriate names
delete from mytable where idfield in (select max(idfield) from mytable GROUP BY duplicatewitness HAVING COUNT(*) > 1);
@stefanbirkner
stefanbirkner / install_dev_env.sh
Last active April 21, 2016 07:23
Installation script for a development enviroment on Ubuntu (Tested with 12.10)
#!/bin/bash
add-apt-repository -y ppa:webupd8team/java
echo "deb http://archive.canonical.com/ubuntu/ quantal partner" > /etc/apt/sources.list.d/canonical_partner.list
apt-get -y update
apt-get -y install oracle-java7-installer
apt-get -y install keychain
apt-get -y install git
apt-get -y install nautilus-dropbox