Skip to content

Instantly share code, notes, and snippets.

View vgaidarji's full-sized avatar
🚀
:shipit:

Veaceslav Gaidarji vgaidarji

🚀
:shipit:
View GitHub Profile
@vgaidarji
vgaidarji / build.prop
Created April 26, 2017 18:19 — forked from CHEF-KOCH/build.prop
Android Build.prop tweaks <- FOR ALL AOSP ROMS (4.0.x - 5.0.x) ->
# Begin build properties
# EOL UNIX
# 0.0 644 /system/build.prop
#
# Note: Some changes are Device and OS/ROM independent!
# Note2: Some settings are between
# performance and security <- I prefer last one
#
ro.build.id= -----
ro.build.display.id= -----
@vgaidarji
vgaidarji / sdkmanager-accept-licenses.sh
Created May 31, 2017 16:39
Update Android sdkmanager licenses automatically
#!/bin/bash
/usr/bin/expect -c '
set timeout -1;
spawn '"${ANDROID_HOME}"'/tools/bin/sdkmanager --licenses;
expect {
"y/N" { exp_send "y\r" ; exp_continue }
eof
}
'
@vgaidarji
vgaidarji / Android XML decompressor
Created March 11, 2014 14:42
Decompile application and parse AndroidManifest.xml to string
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
class AndroidXMLDecompress {
// decompressXML -- Parse the 'compressed' binary form of Android XML docs
// such as for AndroidManifest.xml in .apk files
@vgaidarji
vgaidarji / AndroidStudio as git difftool, mergetool
Last active March 13, 2020 09:23
Use AndroidStudio as git difftool/mergetool on MacOS (place this inside your ~/.gitconfig).
[merge]
tool = studio
[mergetool "studio"]
prompt = false
cmd = /Applications/Android\\ Studio.app/Contents/MacOS/studio merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
tool = studio
[difftool "studio"]
prompt = false
⁣     🚿 ̄\
     😓   |
    ⁣/|\💧 |
| 💧/ \   |
 ̄ ̄ ̄ ̄ ̄ ̄ ̄
@vgaidarji
vgaidarji / theme-son-of-obsidian.css
Created February 12, 2017 18:00
Son of Obsidian rouge theme
pre.highlight,
.highlight pre { background-color: #272822; }
.highlight .hll { background-color: #22282A }
.highlight .c { color: #99AA8A } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #93C763 } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #F1F2F3 } /* Name */
.highlight .o { color: #E8E2B7 } /* Operator */
.highlight .p { color: #F1F2F3 } /* Punctuation */
@vgaidarji
vgaidarji / update-git-user-in-sub-dirs.sh
Last active June 26, 2018 12:23
Update Git user name in sub-directories
#!/usr/bin/env sh
USER_NAME="Veaceslav Gaidarji"
USER_EMAIL="veaceslav.gaidarji@gmail.com"
echo "Using config: \n user.name=$USER_NAME, \n user.email=$USER_EMAIL\n"
for dir in */;
do
cd $dir
@vgaidarji
vgaidarji / collapsed-markdown-section
Created June 12, 2018 13:24
Collapsed markdown section
<details><summary>Collapsed section</summary><p>
```
```
</p></details>
@vgaidarji
vgaidarji / show-git-remote-ages.sh
Created May 19, 2017 09:01
Script which lists remote branches by age and includes some related information to identify last author and any branch names.
#!/bin/sh
exec git branch -r | cut -d' ' -f3 | xargs git show --pretty='%Cgreen%ai %Creset%h %an %d' -s | sed '/^$/d' | sort | uniq
@vgaidarji
vgaidarji / checkstyle.gradle
Created October 10, 2016 12:59 — forked from kboyarshinov/checkstyle.gradle
Code quality gradle scripts for Android
/**
* Checkstyle tasks
* Usage:
* - place this file under root dir of your project at /gradle directory
* - apply script from your gradle file:
* apply from : "{rootDir}/gradle/checkstyle.gradle"
*
* To configure checkstyle use configs at:
* "{rootDir}/config/checkstyle/checkstyle.xml" - for main projects
* "{rootDir}/config/checkstyle/checkstyle-test.xml" - for tests