Skip to content

Instantly share code, notes, and snippets.

View Spone's full-sized avatar
🚴

Hans Lemuet Spone

🚴
View GitHub Profile
@Spone
Spone / simple-git-branching-model.md
Created November 27, 2015 14:58 — forked from jbenet/simple-git-branching-model.md
a simple git branching model

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@Spone
Spone / gist:55972369fa5b6ed2ba51
Created January 2, 2015 22:37 — forked from mingcheng/gist:5472680
Android/Java equivalent of MD5 function in PHP
public static String md5(String string) {
byte[] hash;
try {
hash = MessageDigest.getInstance("MD5").digest(string.getBytes("UTF-8"));
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("Huh, MD5 should be supported?", e);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Huh, UTF-8 should be supported?", e);
}
@Spone
Spone / gist:fd33f04cf8b8857e5549
Last active August 29, 2015 14:12 — forked from tistaharahap/gist:1202974
HMAC-SHA1 Utility for Android
public static String sha1(String s, String keyString) throws
UnsupportedEncodingException, NoSuchAlgorithmException,
InvalidKeyException {
SecretKeySpec key = new SecretKeySpec((keyString).getBytes("UTF-8"), "HmacSHA1");
Mac mac = Mac.getInstance("HmacSHA1");
mac.init(key);
byte[] bytes = mac.doFinal(s.getBytes("UTF-8"));