Skip to content

Instantly share code, notes, and snippets.

View rokibhasansagar's full-sized avatar
📑
Keeping Away to "Get A Living", Literally

Rokib Hasan Sagar rokibhasansagar

📑
Keeping Away to "Get A Living", Literally
View GitHub Profile
@rokibhasansagar
rokibhasansagar / gitclean.sh
Last active September 6, 2023 18:02 — forked from Zibri/gitclean.sh
Bash script to remove all revisions from github or gist repository.
#!/bin/bash
#
# By Zibri (2019)
# Modified by @rokibhasansagar
#
# Usage: gitclean git-repo-url
#
gitclean ()
{
git clone "$1" workDir && {
echo -en "The Whole PATH ENV is - " && echo $PATH
which ghr && which repo
mkdir $(pwd)/work && cd work
echo "Initialize & Sync PBRP repo"
echo $(pwd)
repo init -q -u https://github.com/PitchBlackRecoveryProject/manifest_pb.git -b ${MANIFEST_BRANCH} --depth 1
time repo sync -c -q --force-sync --no-clone-bundle --no-tags -j32
@rokibhasansagar
rokibhasansagar / MANUAL.md
Last active November 14, 2019 18:10
Add Legacy MTK Flashing Support in PitchBlack Recovery Project

In PBRP, To add Simple Flashing Method for MTK Devices,

Open /vendor/pb/pb_build.sh and Modify the following part

Replace this part:

if [[ "$PB_FORCE_DD_FLASH" = "true" ]]; then
	cp -R "$PB_VENDOR/updater/update-binary-dd" "$PB_WORK_DIR/META-INF/com/google/android/update-binary"
else
	cp -R "$PB_VENDOR/updater/update-binary" "$PB_WORK_DIR/META-INF/com/google/android/update-binary"
@rokibhasansagar
rokibhasansagar / update-binary-mtk
Created November 17, 2019 16:52
New Updated `update-binary` for PBRP, only for MediaTek Devices
#!/sbin/sh
# Copyright (C) 2018 ATG Droid
# Copyright (C) 2019 PitchBlack Recovery <pitchblackrecovery@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@rokibhasansagar
rokibhasansagar / gdrive_download
Created January 21, 2020 06:46 — forked from darencard/gdrive_download
Script to download files from Google Drive using Bash
#!/usr/bin/env bash
# gdrive_download
#
# script to download Google Drive files from command line
# not guaranteed to work indefinitely
# taken from Stack Overflow answer:
# http://stackoverflow.com/a/38937732/7002068
gURL=$1
@rokibhasansagar
rokibhasansagar / transfer.fish
Created January 26, 2020 15:43 — forked from nl5887/transfer.fish
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
#!/bin/bash
#
# Copyright (C) 2020 OmniROM Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#!/bin/bash
#
# Copyright (C) 2016 OmniROM Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@rokibhasansagar
rokibhasansagar / tg_group_cleaner.py
Created March 4, 2020 20:37
Kick all the deleted accounts from a telegram chat using telethon.
from telethon import TelegramClient
from telethon.tl.functions.channels import EditBannedRequest
from telethon.tl.types import ChatBannedRights
import asyncio
import datetime
api_id = 1234 # Your API_ID
api_hash = "1a2b3c456" # Your APP_ID
#!/bin/bash
username=rokibhasansagar
url="gerrit.omnirom.org"
port="29418"
branch="android-6.0"
ref="android-6.0.1_r81"
wget -q https://github.com/omnirom/android_vendor_omni/raw/android-6.0/utils/aosp-forked-list