Skip to content

Instantly share code, notes, and snippets.

@aroemen
aroemen / emulator-install-using-avdmanager.md
Created March 13, 2025 16:33 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@aroemen
aroemen / update-android-project.sh
Created November 21, 2024 11:37 — forked from bizz84/update-android-project.sh
Script to update Gradle, Java and other Android project settings in a Flutter project
#!/bin/bash
# Update Gradle, Java and other Android project settings in a Flutter project
# See: https://gradle.org/releases/
DESIRED_GRADLE_VERSION="8.9"
# Build errors often show the required Java version
DESIRED_JAVA_VERSION="17"
# See: https://developer.android.com/ndk/downloads
DESIRED_NDK_VERSION="27.0.12077973"
# The minimum Android SDK version
@aroemen
aroemen / postman-rs256-signing.js
Created September 22, 2021 20:43
Postman RS256 JWT Signing
var jwtPrivateKey = `-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----`;
// Set headers for JWT
var header = {
'alg': 'RS256',
'typ': 'JWT'
};
git remote add -f Bproject /path/to/B
git merge -s ours --no-commit Bproject/master
git read-tree --prefix=dir-B/ -u Bproject/master
git commit -m "Merge B project as our subdirectory"
git pull -s subtree Bproject master
git clone --bare [email protected]:{USERNAME}/{REPOSITORY_NAME}.git
cd {REPOSITORY_NAME}.git
git push --mirror [email protected]:my-new-repo.git
cd ..
rm -rf {REPOSITORY_NAME}.git
@aroemen
aroemen / terminal-load-ssh-key.sh
Created April 19, 2013 13:00
Checks if a SSH key is loaded and loads it if not loaded
# load ssh key
keyloaded=$(ssh-add -l|grep aroemen -c)
if [ $keyloaded == '0' ]
then
ssh-add {path to ssh key}
fi
@aroemen
aroemen / restore-git-submodules.sh
Created February 25, 2013 02:39
Restore git submodules from .gitmodules. Since git submodule init only considers submodules that already are in the index (i.e. "staged") for initialization this short script parses .gitmodules, and each url and path pair.
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
@aroemen
aroemen / git-clean-branches
Created February 12, 2013 16:58
Deletes all local branches that have been merged into HEAD
git branch -d `git branch --merged | grep -v '^*' | tr -d '\n'`
@aroemen
aroemen / ignore-git-line-endings.sh
Created January 9, 2013 18:31
Git ignore line endings on checkout workaround
#!/bin/bash
mv .gitattributes .gitattributes-tmp
git add -u
mv .gitattributes-tmp .gitattributes
git reset .gitattributes
git checkout -- .gitattributes
@aroemen
aroemen / git-change-case.sh
Last active December 10, 2015 12:39
Used to change the case in a directory for a Git repository. Or use this config command `git config core.ignorecase false`
mv foo foo2
git add -A
git commit -m "renaming"
mv foo2 FOO
git add -A
git commit --amend -m "renamed foo to FOO"
# or in git v1.7.7+
git mv improper_Case improve_case2
git mv improper_case2 improve_case