Skip to content

Instantly share code, notes, and snippets.

@aMir733
aMir733 / sp-status.py
Created November 28, 2022 19:33
Updates your telegram bio to the name of the song that you're listening to on Spotify
from pyrogram import Client
from apscheduler.schedulers.asyncio import AsyncIOScheduler
import requests
from multiprocessing import Manager
api_id = 0
api_hash = ""
app = Client("my_account", api_id, api_hash)
form = "{0} - {1}" # 0: song name | 1: artist name
@aMir733
aMir733 / tun2socks-init.sh
Last active April 21, 2023 08:33
tun2socks tunnel init script
#!/usr/bin/env bash
[[ $(id -u) != 0 ]] && exit 1
TUN2SOCKS=tun2socks
INIT=xray.client
DEFAULTS=()
INTERFACE=usb0
trap "cleanup" EXIT
@aMir733
aMir733 / adb-tcpip
Created July 12, 2022 14:38
Enable wireless debugging and connect using adb.
#!/usr/bin/env bash
# Enable wireless debugging and connect using adb.
command -v adb su >/dev/null || exit 1
# Variables
_SUDO="su -c"
_ADB="adb"
# Functions
@aMir733
aMir733 / bumper.sh
Created May 27, 2022 07:49
Bump ebuild version
#!/bin/bash
# Bump the versions of the local repository ebuilds
# Put the script inside the bumper.d directory
# Example script:
#PACKAGE_NAME="amdgpu-pro-vulkan"
#PACKAGE_DIR="media-libs/${PACKAGE_NAME}"
#LATEST_VERSION="$(curl -s https://repo.radeon.com/amd...
#LATEST_EBUILD="${PACKAGE_NAME}-${LATEST_VERSION}.ebuild"
# Defaults
#!/bin/bash
# Variables
ADB="adb -s 52105802eed17447"
THRESHOLD=35
INTERVAL=1
INTERVAL_ERROR=300
GTK3_SETTINGS="$HOME/.config/gtk-3.0/settings.ini"
GTK3_OPTION="gtk-application-prefer-dark-theme"
GTK4_OPTION="org.gnome.desktop.interface color-scheme"
@aMir733
aMir733 / htb
Last active October 22, 2021 14:20
htb init: A script to run when starting a new box on HackTheBox.
#!/bin/bash
#----Default Values----:
HTB_NAME=""
HTB_IP=""
HTB_VPN_MODE="PI"
HTB_VPN_PI="lab_aMir733"
HTB_VPN_RA="aMir733-release(6)"
HTB_DIR=$HOME/htb
HTB_PATH='$HTB_DIR/$HTB_NAME'
@aMir733
aMir733 / sp
Last active August 29, 2021 11:36 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line. Added status and polybar-mode to the script.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#