Skip to content

Instantly share code, notes, and snippets.

@2xlink
2xlink / style.css
Created March 11, 2024 09:07
Obsidian-styling
/* Bottom padding for each paragraph */
div.HyperMD-list-line, div.cm-line {
padding-bottom: 0.2rem !important;
}
/* Gray and fade out task list item buttons until hovered */
.task-id,
.task-dependsOn,
.task-priority,
@2xlink
2xlink / gist:b61d953865126727cd26838c81edd102
Last active January 30, 2024 22:02
mineclonia list of items (incomplete)
mcl_amethyst:amethyst_shard
mcl_anvils:anvil
mcl_armor:boots_chain
mcl_armor:boots_diamond_enchanted
mcl_armor:boots_iron
mcl_armor:boots_leather
mcl_armor:chestplate_chain
mcl_armor:chestplate_diamond
mcl_armor:chestplate_diamond_enchanted
mcl_armor:chestplate_iron
#!/bin/bash
set -eu
wmctrl -d | grep "*" | cut -d " " -f 1 > /tmp/current_desktop
wmctrl -s $1
#!/bin/bash
set -eu
touch /tmp/current_desktop
last=$(cat /tmp/current_desktop)
wmctrl -d | grep "*" | cut -d " " -f 1 > /tmp/current_desktop
if [[ -z $last ]]; then
last=$(cat /tmp/current_desktop)
fi
@2xlink
2xlink / watermark.sh
Last active April 24, 2019 12:17
Watermarks photos of your personal documents using ImageMagick
#!/bin/bash
set -euo pipefail
if [[ $# -ne 2 ]]; then
echo "Usage: $0 IMAGE WATERMARK-TEXT"
exit 1
fi
FILE=$1
TEXT=$2
TARGET_FILE=${FILE%.*}-watermark.${FILE##*.}
#!/bin/bash
# This script takes your chat and posts it to a webserver.
# Finally a chat protocol everyone can use!
if [[ -z $1 ]]; then
echo "First parameter must be the host!"
exit 1
fi