Skip to content

Instantly share code, notes, and snippets.

@benzittlau
benzittlau / Remove From Git By Extension
Created May 4, 2011 21:59
Remove all *.swp files from a git repository
git ls-files | grep '\.swp$' | xargs git rm
@renholm
renholm / GenerateEMVCAPubKeyHash.java
Created March 22, 2017 15:44
Generate the hash for an EMV CA public key
import com.google.common.hash.HashCode;
import com.google.common.hash.Hashing;
import com.google.common.io.BaseEncoding;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class GenerateEMVCAPubKeyHash {
public static void main(String[] args) throws IOException {
byte[] rid = BaseEncoding.base16().decode("");
byte[] caPublicKeyIndex = BaseEncoding.base16().decode("");