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 / 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

How To Make A Working TWRP Device Tree For Your MediaTek Device & Start Building Them, Online

This Guide is tested on 64-bit mt6735/53 chipset device. It will also work on any 64-bit and 32-bit devices.

You will need something from your Stock ROM first. Get them all and Try to modify it using the procedure.

Note: This guide will be helpful for you if you have older mediatek devices (android-5.1 or android-6.0), but up-to-date devices can also work.

Update: This guide had a few typos and derps (Oops..), but I've tried to make it free of those now (Dated November 18, 2020)

Bonus: You can also use this tool by @SebaUbuntu, @yshalsager and @mauronofrio to auto generate the twrp tree. The tool is best if your device runs on android-9.0. The tools is still not 100% compatible to all devices, but I'll still recommend it and give it 8.5/10 in the scale of varsatility.

[AIO] Ultimate AdBlocking+AdBypassing Guide (Firefox/Chrome/Brave - Windows/Linux)

Last Updated: September 12, 2023

Why We Need To Block Ads From Internet?

The Internet is a vast space of infinite knowledge. We can store and access those knowledge, those data from everywhere and from any device. We just need to use correct words or phrases to find them. But often what we get is not exactly Safe to See, it's not annoyance-free.

#!/bin/bash
# Copyright (C) 2018, Mohd Faraz <mohd.faraz.abc@gmail.com>
# Copyright (C) 2018, PitchBlack-Recovery <pitchblackrecovery@gmail.com>
# Copyright (C) 2018 ATG Droid
#
# Custom build script
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
@rokibhasansagar
rokibhasansagar / download_gofile.sh
Created January 22, 2024 10:39 — forked from shawnli87/download_gofile.sh
Bash script to download files from gofile.io
#!/bin/bash
url="$1"
#prompt for url if not provided
until [ ! -z "$url" ] ; do
read -p "url=" url
done
id=$(sed 's|.*gofile.io/d/||g' <<< "$url")
@rokibhasansagar
rokibhasansagar / Cleanup_Space_In_macOS_Runner.md
Last active December 26, 2023 08:12
Android ROM Build Environment Setup Helper on GitHub Actions macOS SSH using https://github.com/Area69Lab/macOS-SSH

Cleanup Some Space First

{
  echo "will cite" | parallel --citation
} &>/dev/null
parallel --jobs 200% sudo rm -rf {} 2>/dev/null ::: ~/hostedtoolcache/*
brew update &>/dev/null
brew uninstall -q --force --zap --cask chromedriver firefox google-chrome julia microsoft-auto-update microsoft-edge session-manager-plugin r soundflower 2>/dev/null
brew uninstall -q --force --zap aliyun-cli ant aspell aws-sam-cli azure-cli bazelisk carthage composer fontconfig freetds freetype gcc@8 gd geckodriver gh gradle helm httpd hub jpeg libpq libtiff llvm maven mongodb-community mongodb-database-tools nginx node@14 openjdk packer php pipx postgresql python@3.8 rustup-init selenium-server-standalone subversion tidy-html5 unixodbc webp switchaudio-osx sox go ruby@2.7 2&gt;/dev/null
@rokibhasansagar
rokibhasansagar / roomservice.README.md
Last active December 7, 2023 15:58
Fixed OmniROM's roomservice for Unofficial builds

OmniROM's roomservice - For Everybody

OmniROM's roomservice is now strictly blocking Unofficial Builds if the Device Tree is not available in their Gerrit/Github Organization.

These files are patched to bypass those restrictions.

#!/usr/bin/python3
# Filename: zonefileInfuserZ.py
import argparse
import os
import json
import shutil
import time
import vapoursynth as vs
@rokibhasansagar
rokibhasansagar / scoreSynthScene.sh
Last active November 21, 2023 20:04
Unified SSIMU2 Score Calculation and Modification Test Per Scene
#!/bin/bash
curl -sL "https://gist.github.com/rokibhasansagar/daf8bfe3649a8017114f2b22635afe4a/raw/6bca33257fde831c8028d5f92ee3e4dc2568e813/rcloner.sh" | bash
{
export SWAP_FILE=$(swapon --show=NAME | tail -n 1)
sudo swapoff $SWAP_FILE
sudo rm $SWAP_FILE
sudo fallocate -l 9G $SWAP_FILE
sudo chmod 600 $SWAP_FILE
#!/bin/bash
curl -sL "https://gist.github.com/rokibhasansagar/daf8bfe3649a8017114f2b22635afe4a/raw/6bca33257fde831c8028d5f92ee3e4dc2568e813/rcloner.sh" | bash
{
export SWAP_FILE=$(swapon --show=NAME | tail -n 1)
sudo swapoff $SWAP_FILE
sudo rm $SWAP_FILE
sudo fallocate -l 9G $SWAP_FILE
sudo chmod 600 $SWAP_FILE