Skip to content

Instantly share code, notes, and snippets.

View 641i130's full-sized avatar
🦀
Rewrite it in rust!

Caret 641i130

🦀
Rewrite it in rust!
View GitHub Profile
@641i130
641i130 / README.md
Last active January 3, 2023 05:34 — forked from ioquatix/README.md
How to setup v4l2 loopback for use with OBS.
@641i130
641i130 / ctabus.sh
Last active January 11, 2023 17:38
CTA Bus Tracker Cli
#!/bin/bash
# chmod the script and run like this ./ctabus.sh [bus code]
# This gets the times from the raw HTML code sent from the server
# Special thanks to chatgpt for fixing the grep statements!
curl -s "https://ctabustracker.com/bustime/wireless/html/eta.jsp?route=NULL&direction=NULL&id=$1&showAllBusses=on" | grep -oP '<strong.*>(.*?)</strong>' | grep -vE '<strong.*>#[0-9]{1,3}&nbsp;</strong>' | sed -E 's/.*>([0-9]+).*/\1/;t;s/.*>DUE.*/DUE/'
@641i130
641i130 / wallpaper.sh
Created July 26, 2022 05:14
Randomly choose a picture for setting wallpapers on linux
#!/bin/bash
# Note that /landscape/ contains any image file name png,jpg,jpeg and is a landscape image and vise versa for portrait
# This works in order of monitor ID (DP-0 -> DP-2) in that order
feh --bg-fill "$(find /landscape/ -regextype posix-extended -regex '.*\.(png|jpg|jpeg)$' -print0 |shuf -z -n 1)" "$(find /portrait/ -regextype posix-extended -regex '.*\.(png|jpg|jpeg)$' -print0 |shuf -z -n 1)"
@641i130
641i130 / fix-gpg-keys.sh
Created July 26, 2022 19:37
Fix the broken GPG keys on arch based operating systems. (This was written for arco linux, so I can't guarantee it'll work on anything else).
#!/bin/bash
# RUN THIS AS ROOT!!!
pacman -S archlinux-keyring arcolinux-keyring
rm -rf /var/lib/pacman/sync/
rm -rf /etc/pacman.d/gnupg/
pacman -Scc --noconfirm
pacman-key --init
pacman-key --populate archlinux
pacman-key --populate arcolinux
pacman-key --refresh-keys
@641i130
641i130 / t-mine.py
Created July 29, 2022 21:12
Auto mine in terraria (AKA hold down buttons)
# Terraria Button Holder
# Written by 641i130
# (DVORAK KEYBOARD LAYOUT)
import pynput
import time
pm = pynput.mouse
pk = pynput.keyboard
mc = pm.Controller()
kc = pk.Controller()
@641i130
641i130 / Cargo.toml
Created November 7, 2022 18:41
check if ip / port is up as fast as possible
[package]
name = "ip-up"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
port_check = "0.1.5"
@641i130
641i130 / song-sync.sh
Created January 3, 2023 05:35
Sync music folder with android device running SSH
#!/bin/bash
# FOR USE WITH THIS APP:
# https://play.google.com/store/apps/details?id=com.arachnoid.sshelper&gl=US&pli=1
echo "Syncing music dump to phone!!!"
echo "Press enter to continue!"
read
folder_name=$(date +%d%m%Y)
cd /home/rei/ytdl/ && mkdir $folder_name || echo "Folder was made already!!"
mv *.mp3 $folder_name
read -p "Enter IP address: " ip
@641i130
641i130 / wallpaper.sh
Created January 3, 2023 05:36
Set random wallpaper with given folders
feh --bg-fill "$(find /landscape/images/path/ -regextype posix-extended -regex '.*\.(png|jpg|jpeg)$' -print0 |shuf -z -n 1)" "$(find /portrait/images/path/ -regextype posix-extended -regex '.*\.(png|jpg|jpeg)$' -print0 |shuf -z -n 1)"
@641i130
641i130 / shuffle.sh
Last active January 13, 2023 00:43
Cycle through multiple wallpaper folders for a proper shuffled feel. Will re-shuffle once it has done a cycle. This was written using ChatGPT and further cleanup by me.
#!/bin/bash
# Directories containing the images for both landscape and portrait
p_pics="$HOME/Pictures/Wallpapers/portrait"
l_pics="$HOME/Pictures/Wallpapers/landscape"
# File to store the shuffled images for both landscape and portrait
p_pics_shuf="$HOME/.p_pics_shuf"
l_pics_shuf="$HOME/.l_pics_shuf"
@641i130
641i130 / Cargo.toml
Created May 29, 2023 05:42
JSON Serialize Aes 128 Cfb Rust Example
[package]
name = "aes-json"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
aes = "0.8.2"
cfb-mode = "0.8.2"