Skip to content

Instantly share code, notes, and snippets.

@jihan917
jihan917 / doskey.mac
Created October 27, 2010 08:10
doskey macrofile - (quick and dirty) *nix shell simulation for cmd.exe
;= doskey.mac - posix shell style aliases for cmd.exe
;= place it under %AppData% and create a shortcut to
;= C:\Windows\System32\cmd.exe /k "doskey /macrofile=%AppData%\doskey.mac"
;= beware, this is very crippled *nix shell simulation.
;= --``why not go ahead and use bash/ksh/etc?''
;= --``no I don't. shell on Windows just sucks.''
;= I use these aliases to save me a few (otherwise-would-be) typos;
;= for anything more than a few lines,
@mixxorz
mixxorz / waveform.py
Last active January 19, 2023 15:46
Generate waveform images from audio files
# Requires pydub (with ffmpeg) and Pillow
#
# Usage: python waveform.py <audio_file>
import sys
from pydub import AudioSegment
from PIL import Image, ImageDraw
@augiedoggie
augiedoggie / qterm-toggle.sh
Last active April 26, 2023 14:01
Popup/Quake style terminal for Haiku OS
#!/bin/bash
### the unique window title prefix for our terminal session
terminalKeyword="QuakeTerm"
### optionally set the location of a custom terminal profile to be used
### it must contain whatever is used as the terminalKeyword at the beginning of the "Window title"
### for example: "Window title" , "QuakeTerm %i: %t"
### comment out the line to use the default Terminal settings
#terminalProfile="/boot/home/config/non-packaged/apps/MyCustomTerminalSettings"
@zumikkebe
zumikkebe / winpwnr.sh
Last active December 31, 2023 23:40
winpwnr.sh is a one-liner Haikus' hey front-end with the intent to domate windows
#! /bin/bash
Usage()
{
echo "usage: ${script_name} [-D] [-a value] [-dhl] [-s value] [-f] [-twLFGpPMAmHnr value]
-D automatically detects the current active window, obtaining the name of the application and the ID number
-a select the application by name
@moyix
moyix / ensure_fpu.py
Last active March 5, 2024 10:55
Some handy utils for messing with MXCSR (x86-64 SSE FPU control register)
#!/usr/bin/env python
import sys, os
import platform
import ctypes as ct
import mmap
from enum import Enum
import importlib
import functools
import errno