Skip to content

Instantly share code, notes, and snippets.

View krmnn's full-sized avatar

Thomas Karmann krmnn

  • Berlin
  • 21:43 (UTC +02:00)
View GitHub Profile
@krmnn
krmnn / gist:9603278
Last active August 29, 2015 13:57
Debian Wheezy on Intel Galileo Development Board
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcpVerzeichnis Skelet:
> mkdir -p loop sdcard image
Plattenimage erstellen (3,8 GB max wegen FAT):
> dd if=/dev/zero of=loopback.img bs=10M count=380
@krmnn
krmnn / gist:b77321b4b9aad7c4d996
Created March 15, 2015 14:14
Applescript to open the current Finder directory with iTerm
on run
tell application "Finder"
set dir_path to quoted form of (POSIX path of (folder of the front window as alias))
end tell
CD_to(dir_path)
end run
on CD_to(theDir)
tell application "iTerm"
activate
@krmnn
krmnn / kernelcache
Created March 15, 2015 14:18
rebuild OS X kernelcaches from Mavericks upward
kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions
@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
@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 / 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 / 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 / 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 / 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 / Home Recording: Acoustic treatment.md
Last active October 10, 2017 14:47
Room Acoustic treatment