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 / 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 / pacman-init.sh
Created October 19, 2023 12:51 — forked from bouroo/pacman-init.sh
Init arch linux pacman
#!/usr/bin/env bash
# Enable networkd and resolved
systemctl enable systemd-networkd
systemctl enable systemd-resolved
systemctl restart systemd-networkd
systemctl restart systemd-resolved
# Init pacman mirror
curl -s -L "https://www.archlinux.org/mirrorlist/?country=TH&country=SG&country=IN&country=JP&protocol=https&ip_version=4" | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist
@rokibhasansagar
rokibhasansagar / mctd_mod3.py
Last active October 16, 2023 07:15 — forked from SAPikachu/gist:1526215
MCTDMod 3 - add support for 16bit debanding output
###################################################################################################################################
### ###
### Motion-Compensated Temporal Denoise: MCTD() ###
### ###
### v1.4.20 by "LaTo INV.", mod 2 by 06_taro ###
### ###
### 29 November 2011 ###
###
@rokibhasansagar
rokibhasansagar / split_json.sh
Created May 4, 2023 13:21 — forked from arlina-espinoza/split_json.sh
Bash script to split a JSON into multiple files. Uses jq.
#!/bin/bash
# Split a JSON into multiple files. Uses jq.
# Usage
# ./split_json.sh /path/to/json/file
file="$1"
jq -cr 'keys[] as $k | "\($k)\t\(.[$k])"' "$file" | awk -F\\t '{ file=$1".json"; print $2 > file; close(file); }'
@rokibhasansagar
rokibhasansagar / ffmpeg-extract-keyframes.sh
Created October 2, 2021 07:44 — forked from savvot/ffmpeg-extract-keyframes.sh
Extract only keyframes (I-frames) from video to images with console ffmpeg
ffmpeg -ss <start_time> -i video.mp4 -t <duration> -q:v 2 -vf select="eq(pict_type\,PICT_TYPE_I)" -vsync 0 frame%03d.jpg
@rokibhasansagar
rokibhasansagar / git-io-custom-url.md
Created December 24, 2020 13:14 — forked from dikiaap/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@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 #
#---------------------------------#
@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
@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
@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