Skip to content

Instantly share code, notes, and snippets.

View mxmilkiib's full-sized avatar
🔊

Milkii Brewster mxmilkiib

🔊
View GitHub Profile
@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 August 7, 2023 01:46
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 May 7, 2025 02:47
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 March 6, 2024 11:09
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 April 29, 2025 10:09
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
@collinbarrett
collinbarrett / userChrome.css
Last active April 11, 2024 10:22
A userChrome.css to use with Tree Style Tab (https://github.com/piroor/treestyletab) for Firefox
/*
Windows
Location: C:\Users\<YourUsername>\AppData\Roaming\Mozilla\Firefox\Profiles\<YourFirefoxProfile>\chrome
Notes:
If minimize, maximize, and close buttons are no longer visible, enable the Title Bar or Menu Bar in Firefox Customize.
macOS
Location: /Users/<YourUsername>/Library/Application Support/Firefox/Profiles/<YourFirefoxProfile>/chrome
Notes:
If minimize, maximize, and close buttons overlap other controls, add the Flexible Space in Firefox Customize.