Skip to content

Instantly share code, notes, and snippets.

View mxmilkiib's full-sized avatar
🔊
x1000ing w/ AI

Milkii Brewster mxmilkiib

🔊
x1000ing w/ AI
View GitHub Profile
@ageis
ageis / .bashrc 02-25-2020
Last active May 10, 2024 02:34
@ageis's ~/.bashrc 🖥️ with numerous useful functions, aliases and one-liners. ⚠️ NOTE: many paths in sourced scripts and environment variables are specific to my system, but if you dig in I hope you'll find something you can use!
#!/bin/bash
# ~/.bashrc: executed by bash(1) for non-login shells.
# kevin gallagher (@ageis) <[email protected]>
# normally I divide this into separate files: .bashrc, .bash_profile, .bash_aliases and .bash_functions (also .bash_logout), but it's all concatenated here.
ulimit -s unlimited
export MYUID=$(id -u)
export USER="$(id -un)"
if [[ "$TILIX_ID" ]] || [[ "$VTE_VERSION" ]]; then
@SpotlightKid
SpotlightKid / alsa-query.c
Created April 29, 2019 15:49
Print hardware capabilities of ALSA device
/*
* alsa-query.c - print hardware capabilities of ALSA device
*
* compile with: gcc -o alsa-query alsa-query.c -lasound
*/
#include <stdio.h>
#include <alsa/asoundlib.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof *(a))
@major
major / i3-get-window-criteria.sh
Created February 8, 2019 14:39
Get i3 window criteria
#!/bin/sh
# Source: https://faq.i3wm.org/question/2172/how-do-i-find-the-criteria-for-use-with-i3-config-commands-like-for_window-eg-to-force-splashscreens-and-dialogs-to-show-in-floating-mode.1.html
# i3-get-window-criteria - Get criteria for use with i3 config commands
# To use, run this script, then click on a window.
# Output is in the format: [<name>=<value> <name>=<value> ...]
# Known problem: when WM_NAME is used as fallback for the 'title="<string>"' criterion,
# quotes in "<string>" are not escaped properly. This is a problem with the output of `xprop`,
# reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807
@Flafla2
Flafla2 / pixar.cpp
Last active March 22, 2019 01:15
Modified version of Pixar's postcard renderer. Runs 4 times faster and says "HIRE ME" instead of "PIXAR"
// pixar.cpp
// Ran through clang-format, then commented
// Also changed text to "HIRE ME" and used fork()
// to have 4 child processes for easy multithreading
//
// Original by Andrew Kensler
// Edits by Adrian Biagioli
#include <stdlib.h> // card > pixar.ppm
@amanusk
amanusk / display.sh
Last active July 20, 2025 21:09
Easily change between laptop and external displays in i3 + dmenu
#!/bin/bash
# This script is intended to make switching between laptop and external displays easier when using i3+dmenu
# To run this script, map it to some shortcut in your i3 config, e.g:
# bindsym $mod+p exec --no-startup-id $config/display.sh
@nzec
nzec / README.MD
Last active August 17, 2025 02:45
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb
@fbrinker
fbrinker / i3-display-swap.sh
Last active September 27, 2025 02:49
Swap i3 displays / workspaces between displays
#!/usr/bin/env bash
# requires jq
DISPLAY_CONFIG=($(i3-msg -t get_outputs | jq -r '.[]|"\(.name):\(.current_workspace)"'))
for ROW in "${DISPLAY_CONFIG[@]}"
do
IFS=':'
read -ra CONFIG <<< "${ROW}"
if [ "${CONFIG[0]}" != "null" ] && [ "${CONFIG[1]}" != "null" ]; then
@mxmilkiib
mxmilkiib / m_ctrl.py
Last active July 1, 2018 06:11
mididings script - scene_1 maps nanokontrol2 s/m/r button leds to the first three rows in seq64. subscenes of scene_2 are for channel strip effects.
#!/usr/bin/env python
# m_ctrl.py - mididings things
# scene_1 maps s/m/r buttons to seq64 pattern grid
# scene_2 to map control to a channel strip
# http://dsacre.github.io/mididings/doc/genindex.html
from mididings import *
# for sending LED scene changes
@lightrush
lightrush / README.md
Last active August 31, 2025 15:35
Normalize volume level with PulseAudio

Normalize volume level with PulseAudio and simultaneous output

This should work conceptually on any Linux OS with PulseAudio but these particular instructions are for Ubuntu. There are two major reasons for using simultaneous output. The first is self-evident - we can output to say a bluetooth headset and wired headphones at the same time to enable two people to watch a movie with headphones on a single computer. The second reason is a sort of a convenience for setup. We know the simultaneous sink name so the default.pa config would work without modification so long as simultaneous output is enabled. If we were to set this up without that, we'd have to customize the config with our specific device sink name. That's totally doable but personally I always setup simultaneous output. That's why I haven't described the alternative in this gist.

@thombashi
thombashi / copy_mdlink_bookmarklet.js
Last active November 23, 2023 00:26
Bookmarklet to copy URL and title as Markdown link