Skip to content

Instantly share code, notes, and snippets.

View mas4112's full-sized avatar
🎯
Focusing

Md. Al Amin Sobuz mas4112

🎯
Focusing
View GitHub Profile
@mas4112
mas4112 / 8GB_android-11_compilation-note
Created February 17, 2022 22:54 — forked from verNANDo57/8GB_android-11_compilation-note
Workarounds for building Android 11 on 8GB RAM
Workarounds for building R on 8GB RAM environment:
1. At the start of the build:
[ 99% 138/139] /mnt/ssd/lineage/out/soong/.bootstrap/bin/soong_build /mnt/ssd/lineage/out/soong/build.ninja
This used to take around 30mins, after enabling zram now it takes around 30secs (thanks to @kdrag0n for the zram idea) which is on par with what happens in 16GB RAM building environments
sudo apt install zram-config for installing zram-config package
sudo nano /etc/fstab and add a # in front of the swap disk if you have one and then reboot
After booting cat /proc/swaps to check if zram is enabled or not
@mas4112
mas4112 / fork-a-branch.sh
Created April 21, 2021 09:19 — forked from benbalter/fork-a-branch.sh
How to fork a single branch of a repo, preserving commit log
mkdir target-repo
cd target-repo
git init
git remote add origin git@github.com...
git remote add upstream git@github.com....
git fetch upstream
git pull upstream master
git push origin master
Alternative: