Skip to content

Instantly share code, notes, and snippets.

View Opposite34's full-sized avatar
🎯
Focusing

Ping Opposite34

🎯
Focusing
View GitHub Profile
@Opposite34
Opposite34 / qemu-commands.md
Last active July 4, 2025 07:05
QEMU Commands: Notes for self

QEMU Commands

References

Creating Image

qemu-img create -f qcow2 Image.img 10G

@Opposite34
Opposite34 / glazewm-autotile.py
Last active February 9, 2025 16:01
Dwindle (BSPWM, Qtile, Hyprland)-style Tiling Script for GlazeWM
import asyncio
import websockets
import json
async def main():
uri = "ws://localhost:6123"
async with websockets.connect(uri) as websocket:
await websocket.send("sub -e window_managed")
await websocket.send("sub -e focus_changed")
@Opposite34
Opposite34 / totp.go
Created August 26, 2024 17:55
Time-based OTP (TOTP) implementation in Go
package main
import (
"crypto/hmac"
"crypto/rand"
"crypto/sha1"
"encoding/base32"
"fmt"
"log"
"math"
@Opposite34
Opposite34 / typing_input.nim
Last active May 3, 2024 11:18
A small text-input-like typing coded in nim. Only alphanumeric, space, comma, and period are supported
import boxy, opengl, windy
let windowSize = ivec2(1280, 720)
let window = newWindow("test", windowSize)
makeContextCurrent(window)
loadExtensions()
let bxy = newBoxy()
@Opposite34
Opposite34 / get_ratings_above_gotham.py
Created January 2, 2023 19:26
Get all the name of the chess players with fide ratings above gothamchess (Levy Rozman)
import requests
#CHANGE THIS TO LEVY ROZMAN'S CURRENT RATING
gotham_rating = 2322
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
# 'Accept-Encoding': 'gzip, deflate, br',
@Opposite34
Opposite34 / wordle_dad_solve.py
Created October 30, 2022 19:00
BlueHensCTF2022 - Wordles with Dads Solve Scripts
from pwn import *
import requests
import pickle
from bs4 import BeautifulSoup
url = "https://icanhazdadjoke.com/"
suburl = "search?term=&page="
jokes = []
@Opposite34
Opposite34 / convert_part1.py
Last active October 30, 2022 19:17
BlueHensCTF2022 - PurQRatory Solve Scripts
#edited: knew after writing this that pdfimages from poppler.utils does the same job but easier...
from pdf2image import convert_from_path
#doing this in batches so it doesn't killed itself (+ forlooping broke somehow soooo yea)
dpi = 300
path = "./PurQRatory.pdf"
pages = convert_from_path(path, dpi=500, output_folder="",last_page=26)
@Opposite34
Opposite34 / minesweeper.kt
Last active January 16, 2022 15:58
a (messy) implementation of cli-based minesweeper in kotlin
import kotlin.random.Random
fun main() {
var value = 0
print("width: ")
val w = readNum()
print("height: ")
val h = readNum()