This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String imageName = "BGS"; | |
Bitmap sourceBitmap = ((BitmapDrawable) mMediaView.getDrawable()).getBitmap(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch -f --env-filter ' | |
export GIT_AUTHOR_EMAIL="newEmail@domain.com"; | |
export GIT_COMMITTER_EMAIL="newEmail@domain.com"; | |
export GIT_AUTHOR_NAME="John Doe"; | |
export GIT_COMMITTER_NAME="John Doe"; | |
' yourIncludedHash^..HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --env-filter ' | |
if [ "$GIT_AUTHOR_EMAIL" = "oldEmail@domain.com" ]; | |
then | |
export GIT_AUTHOR_EMAIL="newEmail@domain.com"; | |
fi | |
if [ "$GIT_COMMITTER_EMAIL" = "oldEmail@domain.com" ]; | |
then | |
export GIT_COMMITTER_EMAIL="newEmail@domain.com"; | |
fi | |
if [ "$GIT_AUTHOR_NAME" = "John\ DoeA" ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os, commands, sys, re | |
from optparse import OptionParser | |
parser = OptionParser() | |
parser.add_option("-f", "--filename", | |
action="store", type="string", dest="filename", help="audio book input file, .m4a file for example") | |
parser.add_option("-o", "--outdir", | |
action="store", type="string", dest="outdir", help="where to put .mp3 files for each section, if not provided current directory will be used") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install with brew | |
brew install git | |
# Completion, in this snippet git version installed was 2.3.6 | |
edit ~/.bash_profile | |
... | |
source /usr/local/Cellar/git/2.3.6/etc/bash_completion.d/git-prompt.sh | |
source /usr/local/Cellar/git/2.3.6/etc/bash_completion.d/git-completion.bash | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cat > ~/.gradle/gradle.properties <<- EOM | |
org.gradle.daemon=true | |
org.gradle.parallel=true | |
org.gradle.jvmargs=-Xmx768m | |
EOM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
pushd ~/Library/Calendars | |
#echo "select * from ZMESSAGE;" | sqlite3 -header "Calendar Cache" | |
echo "DELETE FROM ZMESSAGE;" | sqlite3 -header "Calendar Cache" | |
popd ~/Library/Calendars | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sample.util.text; | |
import android.text.Editable; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class LowerCasingTextWatcher implements android.text.TextWatcher { | |
/** | |
* Optimize me |