Skip to content

Instantly share code, notes, and snippets.

View krmnn's full-sized avatar

Thomas Karmann krmnn

  • Berlin
  • 15:28 (UTC +02:00)
View GitHub Profile
@krmnn
krmnn / xbrowsersync.service
Created September 16, 2017 10:50
xBrowserSync-API systemd service file
[Unit]
Description=xBrowserSync is a free tool for syncing browser data between different browsers and devices, built for privacy and anonymity.
After=syslog.target
After=network.target
After=mongod.service
[Service]
Type=simple
User=xbrowsersync
Group=xbrowsersync
@krmnn
krmnn / macOS HomeBrew: automatic installation of tools and applications.md
Last active August 29, 2022 15:40
macOS HomeBrew: automatic installation of tools and applications

macOS HomeBrew: automatic installation and updating of tools and applications

Software installation of my usual tools (via homebrew) and applications (via homebrew-cask) can be automated with homebrew-bundle.

Install instructions

  1. Install homebrew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  2. Add bundle: brew tap Homebrew/bundle

@krmnn
krmnn / Home Recording: Acoustic treatment.md
Last active October 10, 2017 14:47
Room Acoustic treatment
@krmnn
krmnn / BOSS DD-20 Giga Delay Patches.md
Last active May 28, 2023 21:38
BOSS DD-20 Giga Delay Patches

Collected Patches for the BOSS DD-20

Link: BOSS DD-20 Giga Delay

The Edge Dual Delay

  • Mode: Dual
  • Short Delay: 10 - 20ms
  • Long Delay: 350ms - onward
@krmnn
krmnn / Nginx SSL reverse proxy config for Home-Assistant.md
Last active September 18, 2017 12:58
Nginx SSL reverse proxy config for Home-Assistant

Nginx SSL reverse proxy config for Home-Assistant

  1. Forward :80 and :443 to IP running HA.
  2. Don't use the HA built-in SSL directives. They never actually worked for me.
  3. Do the letsencrypt dance.
  4. Create a SSL dhparams file: openssl dhparam -out /etc/nginx/ssl/dhparams.pem 2048. Watch your raspberry getting hot for an hour.
  5. Enable nginx config: ln -s /etc/nginx/sites-available/home-assistant.conf /etc/nginx/sites-enabled/home-assistant.conf
  6. systemctl restart nginx
@krmnn
krmnn / gitea.service
Created May 17, 2017 19:24
A systemd service file for running gitea 1.1.1 on Debian Jessie
[Unit]
Description=Gitea
After=syslog.target
After=network.target
After=postgresql.service
# for fcgi appliance:
#After=memcached.service
[Service]
Type=simple
@krmnn
krmnn / macOS: send mail over relay via built-in postfix.md
Last active April 9, 2021 20:35
Make MacOS send mail over relay via built-in postfix

Make MacOS send mail over relay via built-in postfix

tested with MacOS 10.12.4

  1. Make additions to the end of /etc/postfix/main.cf, see below.
  2. Create /etc/postfix/smtp_sasl_passwords and smtp_generic, see below.
  3. Secure file permissions: chmod 0640 /etc/postfix/smtp_sasl_passwords
  4. Update hashmaps: cd /etc/postfix && postmap smtp_sasl_passwords && postmap smtp_generic
  5. Reload postfix configuration: postfix reload
@krmnn
krmnn / analyze_mac_3rdpartymodifications.sh
Created April 25, 2015 06:37
Analyze OS X for 3rd party modifications
#!/bin/bash
printf "\n\n\e[0;32mKernel Extensions: \e[0m\n\n"
kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
printf "\n\n\e[0;32mSystem-wide LaunchItems/Daemons: \e[0m\n\n"
sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfix|x)/{print $3}'
printf "\n\n\e[0;32mUser-context LaunchItems/Daemons: \e[0m\n\n"
launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
@krmnn
krmnn / collectwindows
Created March 20, 2015 12:42
Move all windows to main display (OS X)
-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...}
property processesToIgnore : {}
-- Get the size of the Display(s), only useful if there is one display
-- otherwise it will grab the total size of both displays
tell application "Finder"
set _b to bounds of window of desktop
set screen_width to item 3 of _b
set screen_height to item 4 of _b
end tell