First Header | Second Header | Third Header |
---|---|---|
oneone | 12 | [13] |
[21] | [twotwo][22] | [23] |
[31] | [32] | [three trees][33] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# change/set the password of a PEM file | |
# https://gist.github.com/mmguero/6f576e45266ff370732dd7b1e2bf9777 | |
set -e | |
WORKDIR="$(mktemp -d)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://gist.github.com/mmguero/4afe9db7d9da60c89b5145a60ba669e8 | |
# Get the coordinates of the active window's | |
# top-left corner, and the window's size. | |
# This excludes the window decoration. | |
unset x y w h | |
eval $(xwininfo -id $(xdotool getactivewindow) | | |
sed -n -e "s/^ \+Absolute upper-left X: \+\([0-9]\+\).*/x=\1/p" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# takes a screenshot of the currently active window | |
# https://gist.github.com/mmguero/95f62f32b44083913708e0d7929ad134 | |
import -window "$(xdotool getwindowfocus getactivewindow)" ./screenshot-"$(date +%Y%m%d_%H%M%S)".png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see https://starship.rs/config/ | |
# https://gist.github.com/mmguero/730775739384895e84874320c1f9af66 | |
palette = "tlacuache" | |
format = """ | |
[\ue0b6](fg:machine_info_bg)\ | |
$username\ | |
$hostname\ | |
$localip\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"commandline": "cmd.exe /c set MSYSTEM=MINGW64 && %USERPROFILE%/scoop/apps/msys2/current/usr/bin/bash --login -i", | |
"font": | |
{ | |
"face": "Hack NFM", | |
"size": 11 | |
}, | |
"guid": "{75529e5d-bde6-4848-85f4-d73c3838a5f5}", | |
"hidden": false, | |
"icon": "%USERPROFILE%/scoop/apps/msys2/current/mingw64.ico", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$lower($firstalphachar($swapprefix($if2(%albumartist%,%artist%))))/ | |
$swapprefix($if2(%albumartist%,%artist%))/ | |
$if(%albumartist%,%album%/,) | |
$if2(%albumartist%,%artist%) - $if(%albumartist%,%album%) - $if($gt(%totaldiscs%,1),%discnumber% - )$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) - )$if(%_multiartist%,%artist% - ,)%title% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# run imagededup (https://github.com/idealo/imagededup) on a directory/directories of images | |
# and write the results as JSON to STDOUT | |
# | |
# https://gist.github.com/mmguero/75ddc56f2961e5301bc14e46fbf75119 | |
import argparse | |
import glob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$BASH_VERSION" ]; then | |
echo "Wrong interpreter, please run \"$0\" with bash" | |
exit 1 | |
fi | |
ENCODING="utf-8" | |
RUN_PATH="$(pwd)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for FILE in ~/.config/systemd/user/*.service; do \ | |
echo "-------- $(basename "$FILE")"; \ | |
( systemctl --user status --no-pager "$(basename "$FILE")" 2>&1 | tee /dev/fd/3 | head -n 3 ) 3> >( tail -n 3 ) ; \ | |
done |