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")
#!/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
#!/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
@rokibhasansagar
rokibhasansagar / policy.xml
Created October 21, 2023 07:15
policy.xml file for ImageMagick7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)*>
<!ATTLIST policymap xmlns CDATA #FIXED ''>
<!ELEMENT policy EMPTY>
<!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
]>
<!--
@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