Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jfeilbach on github.
  • I am argonaut (https://keybase.io/argonaut) on keybase.
  • I have a public key whose fingerprint is 1458 E597 1B78 B582 42F8 42A3 FBF8 0D63 DF3C 204F

To claim this, I am signing this object:

@jfeilbach
jfeilbach / go.md
Last active March 22, 2020 19:20
/boot/extra/go
#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
# Copy ssh keys to root hime directory.
mkdir -p /root/.ssh
cp /boot/extra/authorized_keys /root/.ssh/authorized_keys
# Change the permissions and ownership of the key file
chmod 600 /root/.ssh/authorized_keys
chown root:root /root/.ssh/authorized_keys
@jfeilbach
jfeilbach / clean_mac_files.cron
Last active April 15, 2020 16:30
/etc/cron.daily/clean_mac_files.cron
#!/bin/bash
# 22 Mar 2020
# version .4 Added more logging
# Version .3 Fixed recursive directory deletes failing
# Version .2 - remove .DS_Store files and ._* files
#
SECONDS=0
log=/var/log/syslog
echo "Starting removing Mac specific files..." 2>&1 | /usr/bin/logger -t mac_files
@jfeilbach
jfeilbach / LS_COLORS
Created July 31, 2017 23:49
/etc/LS_COLORS override for unraid from macOS terminal
LS_COLORS='rs=0:di=01;36:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=
01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=
01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35
:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:
*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.
asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=0
@jfeilbach
jfeilbach / share.cfg
Created July 31, 2017 23:51
share.cfg
# Generated settings:
shareDisk="yes"
shareUser="e"
shareUserInclude=""
shareUserExclude=""
shareSMBEnabled="yes"
shareNFSEnabled="no"
shareNFSFsid="100"
shareAFPEnabled="yes"
shareInitialOwner="Administrator"
@jfeilbach
jfeilbach / disk.cfg
Created July 31, 2017 23:55
/boot/config/disk.cfg
# Generated settings:
startArray="no"
spindownDelay="1"
queueDepth="1"
spinupGroups="no"
defaultFormat="2"
defaultFsType="xfs"
shutdownTimeout="90"
poll_attributes="1800"
nr_requests="128"
--exclude='$RECYCLE.BIN' --exclude='$Recycle.Bin' --exclude='.AppleDB' --exclude='.AppleDesktop' --exclude='.AppleDouble' --exclude='.com.apple.timemachine.supported' --exclude='.dbfseventsd' --exclude='.DocumentRevisions-V100*' --exclude='.DS_Store' --exclude='.fseventsd' --exclude='.PKInstallSandboxManager' --exclude='.Spotlight*' --exclude='.SymAV*' --exclude='.symSchedScanLockxz' --exclude='.TemporaryItems' --exclude='.Trash*' --exclude='.vol' --exclude='.VolumeIcon.icns' --exclude='Desktop DB' --exclude='Desktop DF' --exclude='hiberfil.sys' --exclude='lost+found' --exclude='Network Trash Folder' --exclude='pagefile.sys' --exclude='Recycled' --exclude='RECYCLER' --exclude='System Volume Information' --exclude='Temporary Items' --exclude='Thumbs.db'
Before:
System-wide power settings:
SleepDisabled 0
Currently in use:
standby 1
Sleep On Power Button 1
womp 1
autorestart 1
hibernatefile /var/vm/sleepimage
@jfeilbach
jfeilbach / gist:76330a038dbb8ac06975c5da651d1184
Last active May 30, 2018 19:26
brew install imagemagick
brew install gcc
brew -v update
brew install imagemagick --with-librsvg --with-openmp --with-pango --with-webp --with-fontconfig --with-fftw --with-openjpeg --with-openexr --with-opencl --with-libwmf --with-perl --with-little-cms --with-little-cms2 --with-ghostscript --with-liblqr --with-x11 --with-hdri --with-libheif
@jfeilbach
jfeilbach / gist:22330779ad4120d3f96054eda95bdfc3
Created March 7, 2018 22:57
convert bash seconds to human readable hours minutes seconds
displaytime () {
local T=$SECONDS
local D=$((T/60/60/24))
local H=$((T/60/60%24))
local M=$((T/60%60))
local S=$((T%60))
[[ $D > 0 ]] && printf '%d days ' $D
[[ $H > 0 ]] && printf '%d hours ' $H
[[ $M > 0 ]] && printf '%d minutes ' $M
[[ $D > 0 || $H > 0 || $M > 0 ]] && printf 'and '