Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AeliusSaionji
AeliusSaionji / shortcutMaker.sh
Last active April 6, 2022 13:36
Steam Deck non-steam game shortcut maker
#!/bin/sh
# Creates shortcut ".desktop" files to facilitate easily adding non-steam games
# by Aelius
# NOTES
# Linux GOG games installed by GameHub create their own shortcuts
# This is not true for Heroic nor MiniGalaxy
# They attempt to create shortcuts, but currently not working in flatpak
# GameHub flatpak cannot currently install Windows games without innoextract
--- keyboards/ergodox_ez/config.h 2020-02-11 00:59:19.189990347 -0500
+++ keyboards/ergodox_ez_rhalf/config.h 2020-02-11 23:46:48.212405452 -0500
@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define DIODE_DIRECTION COL2ROW
#ifndef ERGODOX_EZ_CONFIG_H
#define ERGODOX_EZ_CONFIG_H
@AeliusSaionji
AeliusSaionji / logitech.lua
Created December 22, 2019 06:45
Some desktop usability functions for logitech mice in LogitechGamingSoftware
--Tap G8 to quick alt+tab
--Hold G8 to navigate alt+tab interface with mouseover
--RAlt + RClick = move window
function OnEvent(event, arg)
OutputLogMessage("event = %s, arg = %s\n", event, arg)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 8) then
timeStart = GetRunningTime()
PressKey("lalt")
PressAndReleaseKey("tab")
@AeliusSaionji
AeliusSaionji / kobo forma
Last active March 9, 2019 23:05
Use graphcsmagick to generate images for the kobo forma screensaver mod
The screensaver mod renders only png images 1:1 to the top-left corner of the screen.
So we need to
- Resize larger images down to the screen resolution (1440x1920)
- Resize smaller images up to the screen resolution
- Composite images centered on top of a canvas sized 1440x1920 - images not exactly 1440x1920 will be centered
- Convert to grayscale
gm.exe mogrify -output-directory kobo -format png -type Grayscale -geometry '1440x1920' -gravity center -extent '1440x1920' *
@AeliusSaionji
AeliusSaionji / uMatrix.txt
Created March 5, 2019 18:28
Important uMatrix rules
* cloudfront.net script allow
* www.googletagmanager.com script allow
@AeliusSaionji
AeliusSaionji / userChrome.css
Created March 5, 2019 17:29
userChrome to hide firefox tabs except when: customizing, menubar shown, tabs in titlebar
#main-window:not([customizing]):not([tabsintitlebar="true"]) #toolbar-menubar[inactive="true"] + #TabsToolbar {
visibility: collapse !important;
}
#!/bin/sh
if [ $# -eq 0 ]; then
printf '%s\n' 'Specify the playlist file.'
printf '%s\n' './musicupdate playlist.m3u8'
exit
fi
# First, some tests
## Make sure file exists

Keybase proof

I hereby claim:

  • I am AeliusSaionji on github.
  • I am aelius (https://keybase.io/aelius) on keybase.
  • I have a public key whose fingerprint is 5310 A83C 221C C9E8 8642 A148 56B3 7E11 DD78 EC38

To claim this, I am signing this object:

--- a/msys2_shell.cmd 2017-02-14 06:05:20.000000000 -0500
+++ b/msys2_shell.cmd 2017-06-01 20:47:50.936329100 -0400
@@ -76,7 +76,7 @@
if NOT EXIST "%WD%mintty.exe" goto startsh
set MSYSCON=mintty.exe
:startmintty
-start "%CONTITLE%" "%WD%mintty" -i /msys2.ico /usr/bin/bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
+start "%CONTITLE%" "%WD%mintty" -i /msys2.ico /usr/bin/dash -l %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%
--- a/pass 2017-03-27 00:32:12.000000000 -0400
+++ b/pass 2017-03-28 08:55:28.249545500 -0400
@@ -154,13 +154,13 @@
# This base64 business is because bash cannot store binary data in a shell
# variable. Specifically, it cannot store nulls nor (non-trivally) store
# trailing new lines.
- local sleep_argv0="password store sleep on display $DISPLAY"
+ local sleep_argv0="password store sleep"
pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5
- local before="$(xclip -o -selection "$X_SELECTION" 2>/dev/null | base64)"