char *toto = "toto"
free(toto);
View stripe.kt
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
public override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { | |
super.onActivityResult(requestCode, resultCode, data) | |
if (resultCode != Activity.RESULT_CANCELED) { | |
if (data != null) { | |
stripe.onPaymentResult(requestCode, data, callback = | |
object : ApiResultCallback<PaymentIntentResult> { | |
override fun onError(e: Exception) { | |
// show error popup |
View adbmonitorapp.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
APPLICATION_ID=$1 | |
while [ 1 ]; | |
do processid=`adb -d shell ps |egrep $APPLICATION_ID|sed -e 's/^[^ ]* *\([0-9]*\) .*$/\1/'` | |
echo -n "$processid." | |
sleep 1 | |
done |
View mp42gif.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
inputfile=$1 | |
ffmpeg -y -i $inputfile -vf fps=10,scale=320:-1:flags=lanczos,palettegen /tmp/palette.png | |
ffmpeg -i $inputfile -i /tmp/palette.png -filter_complex "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" /tmp/temp.gif | |
convert /tmp/temp.gif -alpha Opaque +level-colors Black -flatten /tmp/black.png | |
convert /tmp/temp.gif -delay 50 /tmp/black.png /tmp/output.gif |
View gist:fe04c21359007b98002f2a260e7ad992
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
adb -d exec-out run-as com.example.app cat databases/db.db > /tmp/db.db |
View force-native-crash.md
View mp4 to animated gif
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
ffmpeg -y -i input.mp4 -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -i input.mp4 -i palette.png -filter_complex "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif |
View remove-unused-resources.sh
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
remove_unused_resources() { | |
TAG=$1 # Just for logging | |
RESOURCE_PATH=$2 | |
EXTENSION=$3 | |
echo | |
echo $TAG | |
for file in $RESOURCE_PATH*/*.$EXTENSION | |
do | |
# strip the extension |