Skip to content

Instantly share code, notes, and snippets.

@sahal
sahal / 01-BUILD-JOPLIN-IN-DOCKER.md
Last active November 18, 2024 20:36
Build Joplin in Docker

Multi build

This will create a whole bunch of node-xx version docker images preloaded with the official Joplin 3.1.24 tarball. Then, we'll try to build it.

Currently, I've tested the build with node 18 19 20 21 22 and 23.

Canvas is seemingly not building on node 20+, this is to validate that theory. See: Automattic/node-canvas#2448

I'll post the results later... my laptop takes about 20 minutes per build, so see you in a few hours.

@sahal
sahal / TiddlyWiki-Revert-to-local-copy-of-external-js.md
Last active November 11, 2024 03:14
Tiddlywiki Revert to local copy of external JS

While browsing this page, How to reduce the size of your Tiddlywiki, I noticed that there were no instructions to revert back to a local copy in case of emergency. I can think of times where I might want to edit my tiddlywiki while offline but since I'm pointing to an external source, this could be a problem.

Normally, by overriding the coreURL variable inside the $:/core/save/offline-external-js ShadowTiddler you can set the external javascript file to be a remote site.

@sahal
sahal / downgrade_arch_packages_using_pacman_log.md
Last active October 31, 2024 13:03
Downgrade Arch Packages Using pacman.log

A shitty way to downgrade the packages you just upgraded

This is great in case you boot into a non-working system after an upgrade.

This recently helped me after one of my KDE packages mirror caused sddm to never display my kde desktop after I logged in. I didn't see any useful error logs in journalctl and I gave up troubleshooting.

Ty to #archlinux on libra chat for their help

@sahal
sahal / 00_Whova_Calendar_Dump.md
Last active September 17, 2024 22:02
Whova Calendar Dump

Whova Calendar Dump

https://whova.com/

This is a shitty bash script to dump an ics file from a whova json agenda dump. For some reason they don't let you download a calendar file with your events. I think they might want you to download their app. Lol...

How to use

@sahal
sahal / YOUTUBE_DL_HELPER_README.md
Last active August 27, 2024 01:33
A Youtube DL Helper Bash script. I got tired of looking through my bash history to find the relevant commands to download videos using youtube-dl.

Use this with youtube-dl

Note: This is specificially for youtube-dl as found at ytdl-org/youtube-dl

Get the freshest release from git

You'll want to pull the repo to a convienient location. $HOME/code/youtube-dl

$ git remote -v
@sahal
sahal / get-english-subtitiles-using-youtube-dl.md
Created August 13, 2024 19:34
Get english youtube subtitles using youtube-dl

Use Youtube-DL

I'm fond of just using youtube-dl via their repo without installing it. I just use the latest commit on their main branch, called master

$ git remote -v
origin  git@github.com:ytdl-org/youtube-dl.git (fetch)
origin  git@github.com:ytdl-org/youtube-dl.git (push)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
@sahal
sahal / imagemagick-thumbs-index.sh
Created August 8, 2024 12:29 — forked from stekan/imagemagick-thumbs-index.sh
Generate Thumbnail-Index with ImageMagick
#!/bin/bash
file_extension="${1:-png}"
> index.html
[ -d thumbs ] || mkdir thumbs
echo "Generating Thumbnails..."
for f in *.${file_extension}; do
magick convert "${f%.*}.${file_extension}" -strip -thumbnail 200x100 "thumbs/${f%.*}.png" &> /dev/null
@sahal
sahal / wiki_js_podman_compose.md
Created June 26, 2024 03:07
Get Wiki JS running locally with podman
@sahal
sahal / record_audio_from_pulse_audio_monitor_device.md
Last active June 9, 2024 00:57
Record Audio from Pulse Audio Monitor Device

Find your default sink monitor

giggles: sink monitor is a funny name for this concept

  • The audio outputs that PulseAudio creates are called "sinks."
  • "Monitors" are virtual devices that you can use to listen to the audio that will be sent to these devices (i.e. it turns a sink into a source)
# get default monitor name - you do not need to be root for this. yay!
$ pactl list sinks | grep $(pactl get-default-sink).monitor | cut -d : -f 2

Ensure that your monitor volume is at 100%

@sahal
sahal / REMAP_KEYBOARD_KEYS.md
Last active March 7, 2024 21:30
Now that Wayland is default in KDE6, I have to find an alternative way to remap keys