Skip to content

Instantly share code, notes, and snippets.

View yshalsager's full-sized avatar

Youssif Shaaban Alsager yshalsager

View GitHub Profile
@yshalsager
yshalsager / TWRPBuilder.md
Last active November 6, 2018 19:07
TWRPBuilder Privacy Policy

TWRPBuilder

Privacy Policy

Effective date: September 03, 2018

TWRPBuilder ("us", "we", or "our") operates the website and the TWRPBuilder mobile application (hereinafter referred to as the "Service").

This page informs you of our policies regarding the collection, use, and disclosure of personal data when you use our Service and the choices you have associated with that data. We use your data to provide and improve the Service. By using the Service, you agree to the collection and use of information in accordance with this policy. Unless otherwise defined in this Privacy Policy, the terms used in this Privacy Policy have the same meanings as in our Terms and Conditions.

@yshalsager
yshalsager / extractsub.sh
Created August 14, 2018 20:13
ani-dl SubExtractor
for file in *.mkv; do
ep=$(echo "$file" | grep -Po ' - [0-9]*' | cut -d ' ' -f3 | head -n1)
ffmpeg -i "$file" $ep.srt
done
@yshalsager
yshalsager / anidl.sh
Last active September 2, 2018 14:09
anidl.tk Downloader
#!/bin/bash
# anidl.tk Downloader
# by yshalsager
url=$2
quality=$3
function fetch_page() {
curl -s $url | tr '>' '\n' | grep $quality | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | sed -n '/folder/!p' >> links.txt
}
@yshalsager
yshalsager / mangaforall.sh
Created July 2, 2018 08:54
mangaforall.com Downloader!
# Usage: ./mangaforall.sh 'mangaurl'
curl -s $1 | grep "zip_url" | tr , '\n' | grep '.zip' | cut -d '"' -f4 | sed 's.\\/./.g' >> links.txt
echo Downloading:
for list in links.txt; do wget -i $list ;done
@yshalsager
yshalsager / devices
Created April 10, 2018 11:37
Fetch miui latest stable
261,HM2XWC_
261,HM2XWCPro_
263,MI4iGlobal_
273,MINotePro_
293,MI4c_
297,HMNote1S_
297,HMNote1SGlobal_
298,HM3_
298,HM3Global_
299,MI5_
@yshalsager
yshalsager / devices
Created April 10, 2018 10:32
A script to get all miui stable rom names
261,HM2XWC_
261,HM2XWCPro_
263,MI4iGlobal_
273,MINotePro_
293,MI4c_
297,HMNote1S_
297,HMNote1SGlobal_
298,HM3_
298,HM3Global_
299,MI5_
@yshalsager
yshalsager / buildtwrp.sh
Created April 4, 2018 19:20
A script to build TWRP (in docker) and upload to basketbuild
#Usage: sudo ./buildtwrp.sh [Brand] [Model]
# You need to define basketbuild info!
docker run --rm -i -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd):/home/cmbuild/twrp/:rw,z" stucki/cyanogenmod bash << EOF
cd ../twrp/
source build/envsetup.sh ; lunch omni_$2-eng ; make -j16 recoveryimage
exit
EOF
export version=$(cat bootable/recovery/variables.h | grep "define TW_MAIN_VERSION_STR" | cut -d '"' -f2)
cp out/target/product/$2/recovery.img out/TWRP-$version-$2-$(date +"%Y%m%d").img
cd out
https://github.com/premaca/kernel_motorola_msm8953_sanders/commits/8.1
git cherry-pick aff5e417d7113acd5e2a4a3f5080b37f49adbdbc
git cherry-pick 44456157c0477e996839059257b886c5c67fbaec
git cherry-pick 26dbef0ccd1b9f89e6e4ea7c4efe3f78561c7c4d
git cherry-pick 35580a83c5f89652c7d6a9613b33b1f6d3f32ab7
git cherry-pick 845b2a87e22efd0dc461e240ad5b4517e890b34b
git cherry-pick ed8c9354ec7cbf2b6643bb03eee408a3613a01cf
git cherry-pick a9a8faa54e736c95f1d5cf032673a6d9eab3ae94
git cherry-pick 7197ab4284f1014811a7eecaac3ce3f496444aec
git cherry-pick 1bafc94d7effb25eab5190a5e6646888a569d322
@yshalsager
yshalsager / twrpsources.sh
Last active July 28, 2018 12:14
Switch between TWRP and RedWolf
#bin/bash
path=~/ysh/recovery
if [ -e 7/version ]
then
echo source is $(cat 7/version)
else
echo "can't file source info"
fi
echo "Choose source you want to build:"
@yshalsager
yshalsager / gist:1e494c87dc5b51be632a4da585b0cc2a
Created September 6, 2017 16:17
DualBootPatcher Device yml
- name: Xiaomi Mi4S
id: aqua
codenames:
- aqua
architecture: arm64-v8a
block_devs:
base_dirs:
- /dev/block/bootdevice/by-name
- /dev/block/platform/soc.0/f9824900.sdhci/by-name