Skip to content

Instantly share code, notes, and snippets.

View Vocaned's full-sized avatar
🐦‍⬛

Vocaned Vocaned

🐦‍⬛
View GitHub Profile
@Vocaned
Vocaned / Launch.bat
Last active June 29, 2025 08:56
The most beautiful C client launcher ever.
@echo off
title Basic batch launcher 1.0
set /p url=mc:// URL:
rem Remove mc:// from url
set newurl=%url:mc://= %
rem Split newurl into IPandPort, name and mppass
for /f "tokens=1,2,3 delims=/ " %%a in ("%newurl%") do set IPandPort=%%a&set name=%%b&set mppass=%%c
@Vocaned
Vocaned / FkOrg.bat
Last active June 29, 2025 08:56
Change some stuff the organization controls automatically + misc tweaks
REM CONFIG
REM Two double quotes around the path
REM I have no fucking idea why windows is like this but it doesnt work if you only use one pair of double quotes
set ahk=""C:\Program Files\AutoHotkey\AutoHotkey.exe""
set wallpaper="%USERPROFILE%\Pictures\bg2.png"
set wallpaperStyle=2
REM Write scripts to temp
@Vocaned
Vocaned / CSVtoMarkdown.py
Last active June 29, 2025 08:55
Converts a csv file into a markdown table in Python
def CSVtoMarkdown(fn):
# Doesn't really follow the RFC 4180 standard.
# - Double quotes don't do anything.
# - You can't escape special characters.
# - The header line IS required.
# I made this for my personal project, so you can edit this if you really need those features.
output = ''
# Open file and turn it into a 2D list
@Vocaned
Vocaned / irplus.xml
Last active June 29, 2025 08:55
irplus file for one of the generic chinese rgb controllers that every single product ever uses
<irplus>
<device manufacturer="" model="RGB Remote" columns="12" format="WINLIRC_RAW" bits="" pre-bits="" toggle-bit-pos="" gap-pulse="1" gap-space="107680" one-pulse="" one-space="" zero-pulse="" zero-space="">
<button backgroundColor="ffffffff" label="BRIGHTER" span="3">9016 4489 592 543 589 548 561 549 589 544 589 544 588 521 621 509 592 544 593 1653 589 1659 588 1681 567 1684 585 1662 617 1650 566 1681 591 1665 613 1652 594 516 618 1654 594 516 616 516 589 544 593 525 612 511 593 545 588 1663 586 544 592 1652 589 1662 614 1652 593 1654 594 1658 617 40028 9046 2209 592</button>
<button backgroundColor="ffffffff" label="DARKER" span="3">9051 4463 619 515 589 544 566 543 622 514 589 545 594 517 587 544 591 543 594 1657 590 1662 586 1681 593 1659 587 1657 589 1684 570 1677 593 1658 589 543 593 546 561 1682 594 544 571 539 589 542 589 548 612 498 616 1654 595 1658 583 552 560 1681 590 1663 589 1682 594 1653 590 1658 593 40082 9035 2235 593</button>
<button backgroundColor="ffafafaf" label="OFF" span="3"
@Vocaned
Vocaned / pair-headphones.sh
Last active June 29, 2025 08:55
Automatically pair headphones using bluetoothctl
#!/bin/bash
prompt="#"
address="00:00:00:00:00:00" # mac address here
echo "=== Checking rfkill ..."
if [[ $(rfkill list bluetooth -o SOFT | tail -1) != "unblocked" ]]; then
echo "rfkill error. Unblock bluetooth with 'rfkill unblock bluetooth'"
rfkill list
exit 1
import znc
import requests
import re
class zncdiscord(znc.Module):
description = 'Discord webhooks for ZNC'
module_types = [znc.CModInfo.UserModule]
# Never send notifications from nicks in this list
nick_blacklist = ['',]
@Vocaned
Vocaned / caption.sh
Last active June 29, 2025 08:54
meme captions using imagemagick
#!/bin/bash
in=$1
text=$2
out=$3
if [ $# -lt 3 ]; then
exit
fi
@Vocaned
Vocaned / opengraphparser.py
Last active June 29, 2025 08:54
Get OpenGraph tags from html using html.parser
import html.parser
class OpenGraphParser(html.parser.HTMLParser):
def __init__(self, *, convert_charrefs: bool = ...) -> None:
self.tags = {}
super().__init__(convert_charrefs=convert_charrefs)
def handle_starttag(self, tag, attrs):
if tag != 'meta':
return
@Vocaned
Vocaned / gimmeavaccine.py
Last active June 29, 2025 08:54
Scrapes Flowmedik Oy EAika service for available vaccination times
import requests
import time
import bs4
CLIENTID = '' # First part of eaika domain. (https://[ID].eaika.fi)
GROUP = 'pfizer' # Partial string to search for in group name (usually vaccine name or age), searches all groups if empty
LOCATION = '' # Partial string to search for in vaccination location, searches all locations if empty
WEBHOOK_URL = '' # (discord style) Webhook url to return search results to, program returns json data if empty
def send_webhook(msg):
@Vocaned
Vocaned / bf.py
Last active June 29, 2025 08:54
python brainfuck interpreter i wrote at 3:30AM because i couldn't sleep
program = input()
programpointer = 0
buffer = {}
pointer = 0
tmp = []
loops = {}
for i,c in enumerate(program):
if c == '[':