Skip to content

Instantly share code, notes, and snippets.

View Dobbie03's full-sized avatar
💭
\m/ Metal

Matt Dobbie03

💭
\m/ Metal
  • New Zealand
View GitHub Profile
@TheSunCat
TheSunCat / usb-sounds-udev.md
Last active August 14, 2022 14:24
USB Sounds on Linux using udev!

This is an overview of how I configured my system to play a sound when a USB device (such as a flash drive) is plugged in.

Requirements

  • Linux install with udev and systemd.
  • Root access.
  • A utility to play sounds (I used aplay).
  • Sounds to play.

Playing a sound

Using the tool aplay (found in the Arch package alsa-utils), it is easy to play an audio file: aplay insert.wav

@itsfarseen
itsfarseen / switch-monitor.py
Last active January 29, 2024 06:28
Switch Monitor
#!/bin/python3
import sys
import os
mode = sys.argv[1] if len(sys.argv) > 1 else None # internal/external
def main():
if mode == "internal":
dpi = 110
@moisoto
moisoto / DeleteLocalSnapshots.md
Last active July 10, 2024 20:22
MacOS - Free Disk Space by deleting Time Machine Local Snapshots

How to delete Time Machine Local Snapshots and free your Disk Space

List local snapshots:

tmutil listlocalsnapshots /

You will be presented with a list of snapshots like this:

@heroheman
heroheman / ranger-cheatsheet.md
Last active November 2, 2024 18:57
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@guycalledseven
guycalledseven / manual-uninstall-paragon-ntfs.sh
Last active September 10, 2024 04:39
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
@palopezv
palopezv / dwm_config_pulseaudio.h
Last active October 25, 2024 18:24 — forked from neuro-sys/dwmconfig.h
dwm volume control with hardware multimedia keys (pipewire, pulseaudio, amixer and light as an extra)
/**
* dwmconfig.h
* Hardware multimedia keys
*/
/* Somewhere at the beginning of config.h include: */
/*
You obviously need the X11 development packages installed, X11proto in particular, but
here is the location of the keysyms header upstream copy if you can't bother
using the contents of your own hard drive. ;-P