Skip to content

Instantly share code, notes, and snippets.

@xythh
xythh / record_audio.sh
Last active February 2, 2023 16:34
Script for recording audio on linux
#!/bin/sh
# Version 1.2
# shoutout to https://gist.github.com/Cephian/f849e326e3522be9a4386b60b85f2f23 for the original script,
# https://github.com/xythh/ added the ankiConnect functionality
# toggle record computer audio (run once to start, run again to stop)
# dependencies: ffmpeg, pulseaudio, curl
# where recording gets saved, gets deleted after being imported to anki
DIRECTORY="$HOME/.cache/"
@xythh
xythh / screenshot.sh
Last active February 2, 2023 18:46
Screenshotting script for linux
#!/bin/sh
# Version 1.2
# click and drag to screenshot dragged portion
# click on specific window to screenshot window area
# dependencies: imagemagick, xclip,curl maybe xdotool (see comment below)
# shoutout to https://gist.github.com/Cephian/f849e326e3522be9a4386b60b85f2f23 for the original script,
# https://github.com/xythh/ added the ankiConnect functionality
# if anki is running the image is added to your latest note as a jpg, if anki is not running it's added to your clipboard as a png