Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
echo Username
read username
echo GroupAdds - comma separated group list
read groups
# be sure password database to be in sync
# Install tinc
brew install tinc
brew install tuntap
# create configuration
mkdir /usr/local/etc/tinc
cd /usr/local/etc/tinc
tar xf ~/Downloads/insitu.tinc.conf.tar
# change own hostname
@huehnerhose
huehnerhose / patroni
Last active January 3, 2024 16:51
patroni FreeBSD rc.d script
#!/bin/sh
# PROVIDE: PATRONI
# REQUIRE: ETCD
# BEFORE: LOGIN
# KEYWORD: shutdown
# https://www.dbi-services.com/blog/patroni-on-freebsd-13/
. /etc/rc.subr
# To Monitor the whole process
tail -f /var/log/fsck_hfs.log
chflags -R nouchg /Volumes/{name of your network share}/{name of}.sparsebundle
hdiutil attach -nomount -noverify -noautofsck -readwrite /Volumes/{name of your network share/{name of}.sparsebundle
fsck_hfs -drfy -c 750 /dev/diskxs2 #-c -> amount of RAM used as "cache"
# if fsck doesn't do the magic, use DiskWarrior
hdiutil detach /dev/diskxs2
# in sparsebundle/com.apple.TimeMachine.MachineID.plist remove
<li class="sideMenuListItem">
<span class="headline">
</span>
<span class="description">
</span>
</li>
@huehnerhose
huehnerhose / toc.js
Created January 9, 2014 18:29
Table of contents script for multimarkdown
(function(){
var toc = $("<div class='toc'>");
toc.append('<ul class="level-1">');
var last = 0;
$(":header").each(function(){
var tagName = $(this).prop("tagName");
tagName = parseInt(tagName.split("H")[1]);
if(tagName < last){