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 / keepalive.sh
Last active February 14, 2021 07:49
Sometimes a process needs to give output once in a while, or it gets terminated. To bypass that, use `/tmp/keepalive.sh & script.sh` and add `kill -s SIGTERM $(cat /tmp/keepalive.pid)` at the last line of your 'script.sh'.
#!/bin/bash
echo $$ > /tmp/keepalive.pid # keep this so that it can be killed from other command
while true; do
printf ".\n" && sleep 300
done
#!/bin/bash
# SANITY CHECKS
if [[ -z $GitHubMail ]]; then echo -e "You haven't configured GitHub E-Mail Address." && exit 1; fi
if [[ -z $GitHubName ]]; then echo -e "You haven't configured GitHub Username." && exit 1; fi
if [[ -z $GITHUB_TOKEN ]]; then echo -e "You haven't configured GitHub Token.\nWithout it, recovery can't be published." && exit 1; fi
if [[ -z $MANIFEST_BRANCH ]]; then echo -e "You haven't configured PitchBlack Recovery Project Manifest Branch." && exit 1; fi
if [[ -z $VENDOR ]]; then echo -e "You haven't configured Vendor name." && exit 1; fi
if [[ -z $CODENAME ]]; then echo -e "You haven't configured Device Codename." && exit 1; fi
if [[ -z $BUILD_LUNCH && -z $FLAVOR ]]; then echo -e "Set at least one variable. BUILD_LUNCH or FLAVOR." && exit 1; fi
@rokibhasansagar
rokibhasansagar / appveyor.yml
Created April 27, 2020 09:16 — forked from FeodorFitsner/appveyor.yml
appveyor.yml reference
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
diff --git a/build.sh b/build.sh
index 22f66b76eeac1c13ba41b415da81957f6798b2fe..19ede910311b388a9001806e730503b99adf9415 100644
--- a/build.sh
+++ b/build.sh
@@ -45,10 +45,12 @@ if [[ -n $EXTRA_CMD ]]; then
cd $DIR/work
fi
-echo -e "\nPreparing Delicious Lunch..."
+LOG_FILE="/tmp/${CODENAME}_build_${CIRCLE_BUILD_NUM}.log"
#!/bin/bash
###
#
# Semi-AIO Script for Building PitchBlack Recovery in CircleCI
#
# Copyright (C) 2019-2020, Rokib Hasan Sagar <rokibhasansagar2014@outlook.com>
# PitchBlack Recovery Project <pitchblacktwrp@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
@rokibhasansagar
rokibhasansagar / README.md
Last active March 16, 2020 05:10
[WIP] SkyHawk Builder

Build SkyHawk Recovery Project in CircleCI and Release onto Device Tree itself. Attach the .CircleCI.config.yml file as ".circleci/config.yml" in DT and set some ENV Vars. Trigger the build and voilà, You get the built zip as-well-as recovery.img for safekeeping.

#!/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
@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
#
# 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
#
#!/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
#