Skip to content

Instantly share code, notes, and snippets.

@eib
eib / .nanorc
Last active May 13, 2020 23:41
Nano config
set nowrap
set autoindent
set historylog
set cut
set const
set regexp
#set tabsize 2
#set tabstospaces
#git clone https://github.com/eib/nanorc ~/.nano
@eib
eib / .gitconfig
Last active July 30, 2022 21:16
.gitconfig
[user]
name = Ethan Blackwelder
email = eib@users.noreply.github.com
[mergetool]
keepBackup = false
[core]
autocrlf = true
#editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe'
editor = nano
[alias]
@eib
eib / Tune-up
Created November 5, 2017 15:59
Luthier
Electronics
- check for working electronics
- check for alternating magnet poles (dual pick-ups act as hum-buckers)
- check grounding
- foil shielding (not touching pickup screws)
- clean out electric contacts (of pots/switches)
- replace ceramic pots with <the better kind>
Body
- buff out scratches
@eib
eib / interfaces
Created August 28, 2015 05:34
Network configuration on a Raspberry Pi
# File: /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
allow-hotplug wlan0
@eib
eib / Lircmap.xml
Last active August 28, 2015 05:38
Using a Universal Remote to control Kodi (via LIRC)
<?xml version="1.0" encoding="UTF-8"?>
<!-- File: ~/.kodi/userdata/Lircmap.xml -->
<lircmap>
<remote device="DVR">
<!-- Buttons already recognized:
KEY_POWER,
KEY_UP, KEY_LEFT, KEY_RIGHT, KEY_DOWN, KEY_BACK,
KEY_PLAY, KEY_STOP, KEY_REWIND, KEY_FASTFORWARD,
KEY_[0-9]
@eib
eib / advancedsettings.xml
Last active August 28, 2015 05:00
Using kodi advancedsettings.xml to exclude external hard-drive paths, then password-protecting them via samba shares
<!-- File: ~/.kodi/userdata/advancedsettings.xml -->
<advancedsettings>
<audio>
<excludefromlisting>
<regexp>^/media</regexp>
<regexp>^/mnt</regexp>
</excludefromlisting>
</audio>
<video>
<excludefromlisting>
@eib
eib / 85-external-drive-rule.rules
Last active October 25, 2021 10:25
How to automatically mount/unmount an external USB hard drive
# File: /etc/udev/rules.d/85-external-drive-rule.rules
# Rules for auto-mounting/unmounting USB drives
ACTION=="add", ENV{ID_MODEL}=="USB_to_ATA_ATAPI_bridge", ENV{ID_VENDOR_ID}=="152d", ENV{ID_MODEL_ID}=="2338", RUN+="/usr/local/bin/automount.sh"
ACTION=="remove", ENV{ID_MODEL}=="USB_to_ATA_ATAPI_bridge", ENV{ID_VENDOR_ID}=="152d", ENV{ID_MODEL_ID}=="2338", RUN+="/usr/local/bin/unmount.sh"
# Notes:
# To detect your own drive's ID_MODEL, ID_MODEL_ID, and ID_VENDOR_ID, run "udevadm monitor --environment --udev" before plugging/unplugging the drive
# To force udev to reload these rules (without reboot), run "udevadm control --reload-rules" and "udevadm trigger"
# To change udev's logging level (written to /var/log/syslog), you can run "udevadm control --log-priority=info" (or debug), or configure it via /etc/udev/udev.conf
@eib
eib / crontab
Last active July 3, 2018 10:17
How to start a node service (lirc-web) around boot-time on a Raspberry pi
# File: sudo crontab -e
# Starts "lirc-web" 30 seconds after boot: https://github.com/alexbain/lirc_web
@reboot (sleep 30 && /home/pi/scripts/startup/lirc-web.sh) &