Skip to content

Instantly share code, notes, and snippets.

Avatar

Martin Sugioarto nakal

View GitHub Profile
View poudriere-cron.sh
#!/bin/sh
SCRIPTNAME=`basename "$0"`
PORTSTREE="local"
POUDRIERE="/usr/local/bin/poudriere"
URL="https://host.example.org/poudriere/"
poudriere_build() {
for REPO in $REPOS; do
echo "Started $REPO ("`/bin/date | /usr/bin/tr -d '\n'`")"
View phabricator_phd
#!/bin/sh
#
# $FreeBSD$
# PROVIDE: phabricator_phd
# REQUIRE: DAEMON mysql
# KEYWORD: shutdown
. /etc/rc.subr
View phabricator_aphlict
#!/bin/sh
#
# $FreeBSD$
# PROVIDE: phabricator_aphlict
# REQUIRE: phabricator_phd
# KEYWORD: shutdown
. /etc/rc.subr
View phabricator_sshd
#!/bin/sh
#
# $FreeBSD$
# PROVIDE: phabricator_sshd
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
@nakal
nakal / mbox-split.sh
Created Sep 11, 2015
Split a single MBOX into many small email files
View mbox-split.sh
# generates mails 1.eml, 2.eml,... from a single mbox file
# when (e.g.) procmailrc is flawed and everything was delivered
# locally
#
# then you can feed these files into the LDA one-by-one
awk '/^From / {nr += 1; getline }; { print $0 >> ( nr".eml" ) }' /var/mail/$USER
@nakal
nakal / todo-syn.vim
Created Jun 14, 2018
How to add custom syntax highlighting to C comments
View todo-syn.vim
syntax match CustomTodo '\(REMOVE\|FIX\|COMPLETE\|CHECK\)ME'
syntax cluster cCommentGroup add=CustomTodo
highlight CustomTodo ctermbg=yellow guibg=yellow
@nakal
nakal / messages
Created Dec 29, 2017
error 11 during initial "notmuch new" run
View messages
Dec 28 21:47:41 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7546634240, length=65536)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7546732544, length=65536)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7546830848, length=65536)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7546961920, length=65536)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7547289600, length=65536)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7547453440, length=32768)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7547551744, length=32768)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7547617280, length=32768)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7547748352, length=32768)]error = 11
Dec 28 21:49:05 papika kernel: g_vfs_done():ada0s1h.eli[WRITE(offset=7
View SysInfoBar-Linux.txt
CPU Info: /proc/stat, line "cpu", first 4 columns
Net Info: /proc/net/netstat, IpExt lines, match "octets" column titles with values
Bat Info: /sys/bus/acpi/drivers/battery/PNP0C0A:00/power_supply/BAT0/capacity
Mem Info: /proc/meminfo
ToDo:
- split up SysInfoBar for each OS
View mbsyncrc
MaildirStore maildir
Path ~/.mail/
Inbox ~/.mail/INBOX
Flatten .
IMAPAccount imapaccount
Host HOSTNAME
User USER
Pass PASSWORD
SSLVersions TLSv1.2