Skip to content

Instantly share code, notes, and snippets.


Jesper Rønn-Jensen jesperronn

View GitHub Profile
jesperronn /
Last active Aug 29, 2015
Color command prompt (git aware)
export PS1='$(tput dim)\t $(tput setaf 5)[\w]$(tput setaf 2)$(__git_ps1 "(%s)")$(tput sgr0)\$ '
View git-grafts-example
# grafts define parents for commits see
# save this file as .git/info/grafts
# format:
# <commit sha1> <parent sha1> [<parent sha1>]*
# each entry terminated by a newline
jesperronn / gist:9344831
Last active Aug 29, 2015
IntelliJ Jasmine tab triggers. Here are my definitions so that you can type ”it” and “desc” in your javascript test file.
View gist:9344831
Abbreviation: desc
Description: jasmine describe()
Applicable in: Javascript
Expand with: Default (Tab)
Template text:
describe('$SYSTEM_UNDER_TEST$', function() {
beforeEach(function() {
//First top level needs configure:
jesperronn /
Created Jan 21, 2014
Duplicate java class finder Finds java classes with same name and counts occurrences
# Find all java classes in tree. (including auto-generated classes in 'target' folders:
find . -name "*.java" | xargs egrep -o "class [A-Z]\w+" | awk '{print $2}' | sort | uniq -c | sort -n | grep -v 1
# Use git (faster).
#Ignores any auto-generated classes since they are typically inside ignored 'target' folders
git grep --extended-regexp --no-index "class [A-Z]\w+" | egrep -o "class [A-Z]\w+" | awk '{print $2}' | sort | uniq -c | sort -n | grep -v 1
jesperronn / releasenotes
Last active Jan 3, 2016
releasenotes script (with git)
View releasenotes
# release notes script
# takes two git tags and prints any changes between them
# usage:
# ./ [from] [to] [releasename]
# with [from] and [to] being git tags
jesperronn /
Created Sep 13, 2013
EJB annotations and their probable replacement
@Webservice(name="", serviceName="")
package javax.jws;
public @interface WebService {}
maven pom:
jesperronn /
Last active Dec 14, 2015
Java Generic collection objects, where you can dot them
import java.util.*;
* <p/>
* Superclass for handling a collection of objects. He super class contains
jesperronn /
Created Feb 26, 2013
isDefined() unix method to determined if a variable exists
function isDefined() {
declare -p $varname >/dev/null 2>&1;
if [ "$?" -eq 0 ]; then
echo Defined;
jesperronn / laesmere.js
Created Dec 9, 2012
"Læs også"-links flyttet til bund af artikel. Jeg var så træt af at der står "LÆS OGSÅ: ..." efter hvert andet afsnit på DRs websider.
View laesmere.js
// ==UserScript==
// @name 'Læs også'-- men senere
// @namespace jespersscripts
// @version 0.1
// @description "Læs også"-links flyttet til bund af artikel. Jeg var så træt af at der står "LÆS OGSÅ: ..." efter hvert andet afsnit på DRs websider.
// @match*
// @match*
// @copyright 2012+, Jesper Rønn-Jensen
// @require
// ==/UserScript==
jesperronn /
Last active Oct 13, 2015
IDEA vmoptions
#Line below added by jesper in
#end line add
You can’t perform that action at this time.