Skip to content

Instantly share code, notes, and snippets.

View hydrobeam's full-sized avatar
👨‍🏭

Laith Bahodi hydrobeam

👨‍🏭
View GitHub Profile
@hydrobeam
hydrobeam / xcb_img.rs
Created July 15, 2023 02:59
xcb/xlib get image
use xcb::x;
fn main() -> xcb::Result<()> {
let (conn, screen_num) = xcb::Connection::connect(None)?;
let setup: &x::Setup = conn.get_setup();
let screen = setup.roots().nth(screen_num as usize).expect("welp");
let width: u16 = 1000;
let height: u16 = 1000;
#!/usr/bin/fish
#
# produces filename.out from filename.in
#
# usage: testgen executable file name
#
# use -all and it'll generate output for every .in test in current dir
#
# example
# -------
"""Tracks the Waterloo CSC office status.
Updates a single message in the webhook channel as to not flood the feed.
Updating is done by deleting/re-sending the message to avoid `(edited)`
tags.
Instructions:
- Change the url at the end to point at the desired webhook.
@hydrobeam
hydrobeam / stack_script.py
Last active February 12, 2022 05:14
Stackoverflow Discord webhook
from __future__ import annotations
from dataclasses import dataclass
from datetime import datetime, timedelta
from typing import Any, Final
import requests
from apscheduler.schedulers.blocking import BlockingScheduler
from bs4 import BeautifulSoup
from dhooks import Embed, Webhook
from typing import Final, List
ALPHA: Final[str] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
key: str = input("key")
encryptee: str = input("string to encrypt, case is ignored")
# nuke punctuation
l_key: List[str] = []