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
//use this comment in terminal in project directory | |
git filter-branch --force --index-filter \ | |
'git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA' \ | |
--prune-empty --tag-name-filter cat -- --all | |
git push origin --force --all | |
//or |
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
PackageInfo info = null; | |
try { | |
info = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = null; | |
try { | |
md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
if (!Base64.encodeToString(md.digest(), Base64.DEFAULT).equals("sha sign key")) { |
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
protoc --go_out=plugins=grpc:. path/name.proto |
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
// The MediaRecorder formula is compatible with various Android versions and high-quality audio recorder, | |
// Tested on Android 21 to 28 | |
mediaRecorder = MediaRecorder().apply { | |
setAudioSource(MediaRecorder.AudioSource.MIC) | |
setOutputFormat(MediaRecorder.OutputFormat.MPEG_4) | |
setAudioEncoder(MediaRecorder.AudioEncoder.HE_AAC) | |
setOutputFile(filePath) | |
setAudioEncodingBitRate(320000) |