Skip to content

Instantly share code, notes, and snippets.

@podratz
podratz / freq.sh
Last active February 16, 2022 22:20
Retune music from 440 Hz to desired frequency (by changing playback speed)
#!/bin/sh
# Prequisite: Using Mac OS and having VLC Media Player installed
# Usage: `freq 432 /path/to/song`
vlc () { /Applications/VLC.app/Contents/MacOS/VLC -I rc "$@" ;}
LC_NUMERIC="en_US.UTF-8" \
rate=$(printf "%0.6f\n" $(bc -q <<< scale=6\;$1/440))
vlc -Irc --rate "$rate" "$2"
@podratz
podratz / MindNode2PDF.scpt
Created February 15, 2022 12:59
MindNode2PDF
set mindNodeFile to choose file
set fileExtension to "mindnode"
tell application "/Applications/MindNode.app"
open (mindNodeFile as alias)
set mindNodeDocument to document 1
set fileName to POSIX path of (mindNodeFile as alias)
set baseName to (characters 1 thru -((count of fileExtension) + 3) of fileName) as string
set exportFile to ((baseName & ".pdf") as POSIX file)
tell mindNodeDocument to export to exportFile as PDF
close window 1 without saving