Skip to content

Instantly share code, notes, and snippets.

@sveinungkb
sveinungkb / record-history.sh
Created March 2, 2015 15:24
Simple bash script to compact and add markdown links to any jira issues or git PR references
#!/bin/sh
# Use this script to create markdowned release notes based on a previous point in git history, e.g. for HockeyApp uploads from Jenkins/Team City
# Store current reference with git log --pretty=format:'%H' -n 1 > git-reference and pass as first parameter to this script
# Usage: record-history <git sha in the past>
PREVIOUS=$1
CURRENT=$(git log --pretty=format:'%H' -n 1)
JIRA_BASE='https:\/\/your.jira.com\/browse\/'
@sveinungkb
sveinungkb / AdnroidFieldNamingPolicy.java
Last active April 18, 2020 17:02
GSON Field naming policy taking Android m-prefix into account (e.g. mField and mHomeAddress).
package co.sveinung.utils;
import com.google.gson.FieldNamingStrategy;
import java.lang.reflect.Field;
import java.util.regex.Pattern;
/**
* Created by sveinung on 21.02.15.
*/