Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
ROOT_FOLDER="${1}"
SOURCE_FOLDER="${ROOT_FOLDER}/${2}"
CACHE_FOLDER="${ROOT_FOLDER}/${3}"
TARGET_FOLDER="${ROOT_FOLDER}/${4}"
TARGET_BITRATE="${5}"
# abort, if there is a lock file
LOCKFILE="${ROOT_FOLDER}/converting.lock"
if [ -f "${LOCKFILE}" ]; then
#!/bin/bash
system=$(lsb_release --description)
system_name=$(lsb_release --id --short)
system_version=$(lsb_release --release --short)
system_main_version=${system_version%%.*}
is_debian=false
is_ubuntu=false
is_mint=false
@heikomat
heikomat / nvm_fast_reuse.md
Last active December 21, 2022 16:24
How to switch to fast-reuse for faster nvm loading

Install nvm-ng

  • If you use nvm via the zsh-plugin, disable it by removing nvm from the plugins of your ~/.zshrc
  • If you have nvm installed via the install-script from creationix, unistall it as described here
  • do a regular nvm-ng-install as described here

BE SURE TO NOT HAVE A PREFIX CONFIGURED IN NPM!!!

Setting a prefix changes the installation directory for global packages and is not supported by nvm.

if npm config get prefix is either not set, or a subpath of echo $NVM_DIR, then you're good to go. Otherwise run npm config delete prefix to unset your prefix.

@heikomat
heikomat / stream-config.md
Last active March 3, 2024 18:08
basketball game stream with mirrorless/dslr camera

obs:

  • video: output to 1080p at 59.94fps - because that's what the camera outputs
  • advanced, Filename formatting: "obs" (so that the recording file doesn't change all the time)
  • output, recording
    • format: mpeg-ts (works well for streams)
    • encoder: H264 hardware encoder (easier on the battery)
    • rate control: CBR
    • bitrate: 20000 kbps (more than that will cause the video in the file to lag if it is being read at the same time)
    • keyframe-interval: 2s (easier to pick-up lost streams)
  • start recording
@heikomat
heikomat / _settings.md
Last active May 6, 2024 14:04
make osx bearable (this is opinionated)

Hidden system settings (click to expand the bulletpoints)

save screenshots to a folder on the desktop, instead of directly on the desktop
mkdir ~/Desktop/screenshots
defaults write com.apple.screencapture location ~/Desktop/screenshots