Skip to content

Instantly share code, notes, and snippets.

View jesperronn's full-sized avatar

Jesper Rønn-Jensen jesperronn

View GitHub Profile
@jesperronn
jesperronn / laesmere.js
Created December 9, 2012 21:32
"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.
// ==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 http://www.dr.dk/*
// @match http://dr.dk/*
// @copyright 2012+, Jesper Rønn-Jensen
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// ==/UserScript==
@jesperronn
jesperronn / idea.sh
Last active October 13, 2015 16:28
IDEA vmoptions
#Line below added by jesper in idea.sh
IDEA_JDK="/opt/tools/jdk1.7.0_09"
#end line add
@jesperronn
jesperronn / Gemfile
Created November 28, 2012 11:21
HS code scraper
source 'https://rubygems.org'
gem "nokogiri"
#!/bin/bash
#Save this as a .scpt file and put it in ~/Library/Workflows/Applications/Folder\ Actions folder.
#Next, right click the /Volumes folder and select Services -> Folder Action Setup and attach the script you just created
#AutoMagic!
#see http://www.jbmurphy.com/2011/07/15/os-x-running-a-script-when-a-usb-drive-is-inserted/
FOLDER=~/Library/Workflows/Applications/Folder\ Actions/
@jesperronn
jesperronn / #cargo.js
Last active October 12, 2015 16:58
Bookmarklets Work 2012 Put each snippet into "bookmarklet builder" (google it) and add the bookmark to your browser
javascript:
(function(){
$('input[name$=equipmentNumber]').val("12345");
$('input[name$=packageCount]').val("82");
$('input[name$=".cargo.packageKind"]').val("very kind packages");
$('textarea[name$=cargoDescription]').val("description of the cargo");
$('div.commoditySelector').select2('data',{id:"002802",text:"Paper, paperboard, packing material"});
}
)()
@jesperronn
jesperronn / MappingUtil.java
Created November 8, 2012 09:26
(java) Mapping utitlity to up/downcast or map to objects with similar fields
package utils;
import com.google.gson.Gson;
public class MappingUtil {
static Gson gson = new Gson();
/**
* Object down/up casting via json
@jesperronn
jesperronn / instructions.txt
Created October 16, 2012 11:36 — forked from natritmeyer/instructions.txt
Cucumber formatter to list all tags
To list all tags scattered across your feature files...
1) add the following "list_tags.rb" file to your features/support directory
2) cucumber -d -f Cucumber::Formatter::ListTags
The output now has both tags and number of occurrences:
@backend-required 4
@issues 1
@localstub 1
@jesperronn
jesperronn / sublime-cucumber.sh
Created October 4, 2012 07:18
sublime text install Cucumber syntax
cd ~/.config/sublime-text-2/Packages/
git clone https://github.com/npverni/cucumber-sublime2-bundle.git
#restart sublime text
@jesperronn
jesperronn / deploy.log
Created September 13, 2012 14:27
Weblogic prefer local classes fail on weblogic deploy
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:50.578s
[INFO] Finished at: Thu Sep 13 16:19:22 CEST 2012
[INFO] Final Memory: 128M/223M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "DesktopBuild" could not be activated because it does not exist.
[WARNING] The requested profile "LocalNoZips" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (default) on project play-pilot: An Ant BuildException has occured: weblogic.Deployer$DeployerException: weblogic.deploy.api.tools.deployer.DeployerException: Task 25 failed: [Deployer:149026]deploy application play-frontend on devWlfAdmin.
@jesperronn
jesperronn / gist:3149173
Created July 20, 2012 06:59
Firefox profiles --working with cookies
echo ' select * from moz_cookies;' | sqlite3 cookies.sqlite
echo ' delete from moz_cookies where name like "__utm%";' | sqlite3 cookies.sqlite
#multiple cookies from multiple folders:
echo ' select * from moz_cookies;' | sqlite3