Skip to content

Instantly share code, notes, and snippets.

View kevinpelgrims's full-sized avatar

Kevin Pelgrims kevinpelgrims

View GitHub Profile
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
@kevinpelgrims
kevinpelgrims / sha1_compare.md
Created September 18, 2017 09:32
Compare certificate fingerprints (Android)

Compare certificate fingerprints of APK with local keystore

  1. Unpack APK and get certificate fingerprints

unzip app-release.apk -d app-release/

keytool -printcert -file app-release/META-INF/CERT.RSA (the file might have a different name, but there is only one .RSA file)

  1. Get local keystore certificate fingerprints
@kevinpelgrims
kevinpelgrims / export_funnelweb_jekyll
Last active August 29, 2015 14:13
LINQPad export script from Funnelweb to Jekyll
<Query Kind="Program">
</Query>
void Main()
{
var posts = Entries.Select(entry =>
new {
FileName = FormatFileName(entry.Name, entry.LatestRevisionFormat),
Content = FormatFileContent(entry.Title, entry.Published, FormatTags(entry.TagsCommaSeparated), entry.Body)
}
@kevinpelgrims
kevinpelgrims / MainActivity.java
Last active January 12, 2023 04:52
ActionBar tab badge
actionBar.addTab(actionBar.newTab()
.setCustomView(TabUtils.renderTabView(NotificationsActivity.this, R.string.tab_invitations, R.drawable.tab_orange, numberOfNotifications))
.setTabListener(tabListener));