Skip to content

Latest commit

 

History

History
154 lines (120 loc) · 3.68 KB

Important commands.md

File metadata and controls

154 lines (120 loc) · 3.68 KB

Android :

  • Export SHA1 key :
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
For Release mode :
``keytool -list -v -keystore {keystore_name} -alias {alias_name}``

Ref: https://stackoverflow.com/questions/15727912/sha-1-fingerprint-of-keystore-certificate

  • List all available tasks for your project in Gradle: gradle tasks

  • Verify that your APK is signed: apksigner verify my-app-release.apk

  • Run the first Android emulator available: ~/Library/Android/sdk/tools/emulator -avd `~/Library/Android/sdk/tools/emulator -list-avds | awk '{print $1}'`

  • Kill adb: adb kill-server.

  • Start adb: adb start-server.

  • Export adb (MAC):

export PATH=~/Library/Android/sdk/tools:$PATH
export PATH=~/Library/Android/sdk/platform-tools:$PATH

iOS :

Cocoapods:

  • Get information on a pod: pod trunk info [pod]

  • Verify your local account: pod trunk me

  • Deleting the pod: pod trunk delete NAME VERSION

  • Push/Update pod to remote repo: pod trunk push PODSPEC

Git:

  • Configure GPG Key:

    1. List agg GPG keys:
    gpg --list-secret-keys --keyid-format LONG
    
    1. List all GPG keys for an email:
    gpg --list-secret-keys --keyid-format LONG [email protected]
    
    1. Export a GPG key:
    gpg --armor --export myKey
    
    1. Add a gpg key to git Repo.:
    git config user.signingkey myKey
    
    1. Add GPG key to an Email and Git name of a single Repo
    git config user.email "[email protected]"
    git config user.name "gitName"
    
    1. Sign All comits of a Repo:
    git config commit.gpgsign true
    
    1. Add GPG key to an Email and Git name to all Repos (Global configuration):
    git config --global user.email "[email protected]"
    git config --global user.name "gitName"
    
  • Push with detach HEAD mode: git push origin HEAD:remote-branch-name

  • Delete all remote tags: git tag -l | xargs -n 1 git push --delete origin

  • Delete all local tags: git tag | xargs git tag -d

  • Create Empty branch :

    git checkout --orphan <branchname>
    // This will create a new branch with no parents. Then, you can clear the working directory with
    git rm --cached -r .
    // And then you just commit branch with empty commit and then push
    git commit -m <commit message> --allow-empty
    git push origin <newbranch>
    

Ref: https://stackoverflow.com/questions/13969050/how-to-create-a-new-empty-branch-for-a-new-project

    // You can use the following command:
    git log --format='%ae' HASH^!
	// You need to include -s to suppress the diff.
    git show -s --format='%ae' HASH

Ref: https://stackoverflow.com/questions/29876342/how-to-get-only-author-name-or-email-in-git-given-sha1

Base64 Encoding/Decoding:

  • Convert file to base64 string: cat myfile.txt | base64

  • Convert base64 string into a file: echo $MYFILE | base64 -D > /any/path/myfile.txt echo "Base64String" | base64 -D > downloads/myFile.txt

    gem uninstall fastlane gem install fastlane -v 2.110.0

Read me:

References:

  1. https://www.makeareadme.com/

Docker:

  • List all containers: docker ps -a

  • Delete container: docker rm e5d container_name