Skip to content

Instantly share code, notes, and snippets.

View flushwhy's full-sized avatar
:shipit:
c<>.<>c

Flush flushwhy

:shipit:
c<>.<>c
  • @flushworks
  • Poker Table
  • 23:02 (UTC -04:00)
  • X @ryeflush
View GitHub Profile
@flushwhy
flushwhy / Lazy_git.py
Created May 6, 2025 04:58
Here is my lazy py script for Git modules lol
import os
import subprocess
import sys
import requests
from urllib.parse import urlparse
def get_latest_release_or_tag(repo_url):
"""Return (tag_name, commit_sha) from the latest release or fallback to latest tag."""
parsed = urlparse(repo_url)
owner, repo = parsed.path.strip('/').replace('.git', '').split('/')
@flushwhy
flushwhy / wavtoogg.py
Created August 25, 2024 18:51
The simple py script I use to go from wav to ogg audio formats
import os
from pydub import AudioSegment
# Get the directory containing the script (and the .wav files)
wav_dir = os.path.dirname(os.path.abspath(__file__))
# Create the 'OGG' directory if it doesn't exist
ogg_dir = os.path.join(wav_dir, 'OGG')
os.makedirs(ogg_dir, exist_ok=True)
@flushwhy
flushwhy / scrolling_text.ino
Created June 22, 2023 10:16
ESP8266 NodeMCU /w 0.96 OLED display edited scrolling text demo
#include <Arduino.h>
#include <Wire.h>
#include <U8g2lib.h>
// Setup
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, 14, 12, U8X8_PIN_NONE);
u8g2_uint_t offset;
u8g2_uint_t width;
const char* text = "Hello friend, ";