Skip to content

Instantly share code, notes, and snippets.

View mxmilkiib's full-sized avatar
🔊

Milkii Brewster mxmilkiib

🔊
View GitHub Profile
@mxmilkiib
mxmilkiib / mpv_playerctl_firefox_mpris_pause-play.desktop
Last active October 8, 2023 17:02
A desktop entry to allow Linux users to open a directory containing audio files in mpv whilst pausing then unpause any Firefox media playing upon opening and exit. Requires: playerctl, Firefox Mpris integration extension, and ZSH as the current shell. Also sets the volume to 80%, starts at 30 second in, and sets an unobtrusive window size https:…
[Desktop Entry]
NoDisplay=1
Exec=bash -c 'playerctl pause -p firefox; mpv --geometry=600x300 --volume=80 --start=30 --player-operation-mode=pseudo-gui --script-opts=autoload-disabled=yes -- %U/**/*.{flac,mp3,oga,ogg,vobis,opus,aac,m4a,wav,mod,med,it,xm,s3m} %U/*.{flac,mp3,oga,ogg,vobis,opus,aac,m4a,wav,mod,med,it,xm,s3m} ; playerctl play-pause -p firefox'
MimeType=inode/directory
Name=mpv (mpris ⏯)
Icon=mpv
Type=Application
@aileftech
aileftech / hex-colors.txt
Created October 1, 2022 18:10
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
@frabert
frabert / COPYING
Last active December 21, 2023 13:35
Favicons for HN
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@aaronmdjones
aaronmdjones / freenode-resign-letter.txt
Created May 19, 2021 10:20
My resignation from freenode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
My resignation from freenode staff
==================================
I joined the freenode staff in March 2019 [1].
Before I joined the staff, Freenode Ltd was sold [2] to a person named
Andrew Lee as part of a sponsorship deal. The informal terms of that

It appears that rasengan (Andrew Lee) of Private Internet Access believes that ownership of the company Freenode Ltd. gives him the right to unilaterally replace the current staff team.

We may have had our disagreements with staff, but freenode being run by a volunteer team, using servers provided by sponsors, is a key reason that we appreciate freenode.

As such, we do not believe that such a unilateral replacement by a corporate interest is appropriate.

If this attemped takeover by Andrew Lee continues, we will be advocating to move our communities elsewhere.

Context: Fuchs' leaked (not by him) draft resignation letter that caused Andrew Lee to come onto #freenode: https://fuchsnet.ch/privat/fn-resign-letter.txt

@loveemu
loveemu / xm-form-ja.md
Last active March 7, 2024 03:36
The "Complete" XM module format specification v0.81
@mxmilkiib
mxmilkiib / mpv-ffmpegvisual-jackin.sh
Last active March 6, 2021 17:55
quick jack audio to waterfall spectrgraph (ffmpeg showcqt filter in mpv)
# https://github.com/mfcc64/mpv-scripts/blob/master/visualizer.lua
# https://github.com/mfcc64/showcqt-bash
# fixed to 800x600 atm. todo; migrate calculations from other projects
# basic, no data image
mpv --config=no --quiet --lavfi-complex="[aid1] asplit [ao], afifo, aformat = channel_layouts = stereo, firequalizer = gain = '1.4884e8 * f*f*f / (f*f + 424.36) / (f*f + 1.4884e8) / sqrt(f*f + 25122.25)': scale = linlin : wfunc = tukey: zero_phase = on: fft2 = on, showcqt = size = 800x600 : count= 2.5 : csp = bt709 : bar_g = 2: sono_g = 4 : bar_v= 9 : sono_v = 17 : font = 'Nimbus Mono L,Courier New,mono' : fontcolor = 'st(0, (midi(f)-53.5)/12); st(1, 0.5 - 0.5 * cos(PI*ld(0))); r(1-ld(1)) + b(ld(1))' : tc = 0.33 : attack = 0.033 : tlength= 'st(0,0.17); 384*tc / (384 / ld(0) + tc*f /(1-ld(0))) + 384*tc / (tc*f / ld(0) + 384 /(1-ld(0)))', format = yuv420p [vo]" av://jack:"mpv JACK"
# silly long, includes data image for horizontal axis note/octave labels
mpv --config=no --quiet --lavfi-complex="[aid1] asplit [a
#define LV2_TinyUI_URI "http://example.org/lv2/tinyUI"
#define LV2_TinyUI_PREFIX LV2_INLINEDISPLAY_URI "#"
#define LV2_TinyUI__interface LV2_INLINEDISPLAY_PREFIX "Interface"
#define LV2_TinyUI__feature LV2_INLINEDISPLAY_PREFIX "Feature"
/** a LV2 Feature provided by the Host to the plugin */
typedef struct {
/** Opaque host data */
LV2UI_Controller controller;
@gullyn
gullyn / flappy.html
Last active November 28, 2023 18:23
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@probonopd
probonopd / Wayland.md
Last active April 24, 2024 20:06
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr