Obtain signing certificate fingerprint (SHA1):
keytool -list -v -keystore [KEY_STORE_NAME]
Parse versionCode from android apk file:
aapt dump badging [APK_NAME]
Create a keystore from command line:
keytool -genkey -v -keystore sign.keystore -alias [ALIAS_NAME] -keyalg RSA -keysize 2048 -validity 36500
Verify apk signature:
jarsigner -verify -verbose -certs [APK_NAME]
Update SDK on the command line:
android list sdk --all
android update sdk -u -a -t [INDEXES_SEPARATED_BY_COMMA]
Decompile APK:
apktool d [APK_NAME]
More info for the apktool here.
Find out a library method count: http://www.methodscount.com/
Fix LFS issue:
git lfs migrate import --no-rewrite "filePath1" "filePath2" ...
git lfs uninstall
git reset --hard
git lfs install
git lfs pull
Cache the git credentials on windows:
git config --global credential.helper wincred
Add execution permission to a file:
git update-index --chmod=+x [FILE_NAME]
Remove all local changes in the master branch:
git fetch --all
git reset --hard origin/master
Reset the last commit
git reset HEAD~1
Git force push
git push --force
Reset or revert a specific file to a specific revision using Git
git checkout [COMMIT-HASH] [PATH/TO/FILE]
Online POJO creator from a JSON: http://www.jsonschema2pojo.org/
Redirect the command line output:
echo Hello World >output.txt
echo Hello again! >>output.txt
Get directory size:
du -sh
Activate a profile:
mvn clean install -P
Revert to old changes:
svn merge -r HEAD:[REVISION_NUMBER] .
Merge branch in to local workspace:
svn merge [BRANCH_URL] .
Give permissions to a script file, so it can be executed:
svn propset svn:executable ON [FILE_NAME]
Revert file:
svn revert [FILE_NAME]
Test the secure connections to a server:
openssl s_client -connect [URL]:443 (optionally: -servername [servername])
See the SSL and TLS connection handshaking, security negotiate, public keys and transfer of digital certificates and key information to the client:
openssl s_client -state -nbio -connect [URL]:443
See the SSL and TLS connection handshaking, security negotiate, public keys and transfer of digital certificates and key information to the client:
openssl s_client -connect [URL]:443 -CAfile [CA_FILE_NAME]
Inspect the .p12 file
openssl pkcs12 -in [P12_FILE_NAME] -info
To convert der to pem with openSSL:
openssl x509 -inform der -in certificate.cer -out certificate.pem
To inspect a PEM certificate:
openssl x509 -in certificate.pem -text -noout
To convert pkcs8 to pkcs1 use https://decoder.link/rsa_converter
Usefull links:
http://www.cyberciti.biz/tips/debugging-ssl-communications-from-unix-shell-prompt.html
http://stackoverflow.com/questions/7587851/openssl-unable-to-verify-the-first-certificate-for-experian-
https://www.youtube.com/watch?v=iQsKdtjwtYI
Mastering Markdown
Markdown Cheatsheet
Connect remoatly to a redis instance on CF:
Get the redis host using an app it is boud to:
cf env [APP_NAME]
Open ssh tunel:
cf ssh [APP_NAME] -L 12345:[HOST]:6379 -N -T
In a new tab connect using the redis cil:
redis-cli -p 12345
Update dependencies:
ncu -u