Skip to content

Instantly share code, notes, and snippets.

Andrew Fresh afresh1

Block or report user

Report or block afresh1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
akpoff / dhcpd_to_unbound
Last active Jan 4, 2018
dhcpd_to_unbound -- add dhcpd entries as local_data to unbound
View dhcpd_to_unbound
# Copyright (c) 2017 Aaron Poffenberger <>
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
ligurio /
Last active Jan 22, 2020
Support of OpenBSD pledge(2) and unveil(2) in programming languages

Support of OpenBSD's pledge(2) and unveil(2) in programming languages

Also there is a port of pledge(2) and unveil(2) to Linux and SerenityOS

Language Support of unveil(2) Support of pledge(2)
Ada Yes Yes
C/C++ Yes Yes
Crystal No Yes
Erlang Yes Yes
View 00_TLDR.mkdn
  1. is shit
  2. CGI is shit
  3. <"ARGV"> shouldn't work under use strict because thats a string dereferencing a symbolic ref.
  4. Hash Keys can't retain tainting and so can be used to propagate un-vetted data into safe spaces:
  my $hash = unsafe_thing_that_returns_a_hash();
  $dbh->query(join keys %{$hash}); # data will be untained regardless of what it is.
  1. should probably do something smarter than simply returning the first param when >1 params
vmbrasseur / negotiation.markdown
Last active Apr 24, 2018
Negotiation Articles/Resources
View negotiation.markdown
pr1ntf /
Last active Oct 10, 2015
iohyve v0.2.5 -- bhyve manager based on iocage for FreeBSD
# iohyve v0.2.5 2015/05/06 "ALL HAIL LINUS edition"
# Process command line
__parse_cmd () {
while [ $# -gt 0 ] ; do
case "$1" in
version) __version
jcs / gist:5573685
Last active Oct 25, 2019
macOS FileVault encryption and OpenBSD encrypted softraid on a Macbook Air/Pro
View gist:5573685

Update (2019-05-06): The Broadcom wireless card in the MacBook Pro works and can be crammed into the Air.

Update (2015-12-04): This document used to be very lengthy as there were many manual steps required to get OpenBSD and Mac OS X working together through Boot Camp Assistant (BCA), which created a hybrid MBR and enabled a legacy BIOS emulation mode which older versions of Windows (and OpenBSD) required. Newer Macbooks stopped supporting older versions of Windows through BCA and now only support Windows 10 since it uses GPT and UEFI. However, now that newer versions of OpenBSD support GPT and UEFI, Boot Camp Assistant is no longer needed at all to boot OpenBSD.

macOS FileVault encryption and OpenBSD encrypted softraid on a Macbook Air/Pro

OpenBSD works pretty well on at least the Mid-2011 Macbook Air (A1370, SandyBridge) and Mid-2013 Macbook Air (Haswell). The new KMS code in 5.4 brings up the MBA's eDP display in 1366x768 with backlight

View dzen.rc
sleep 2
# Get screen width
SCRN_WIDTH=`xrandr --prop | grep "^Screen 0" | cut -d, -f2 | awk '{print $2}'`
#HALF_SCRN=`dc -e "$SCRN_WIDTH 2 / p"`
# Settings
simonjbeaumont / tmup
Last active Dec 10, 2019
Update bash to latest tmux environment on reattaching.
View tmup
tmup ()
echo -n "Updating to latest tmux environment...";
export IFS=",";
for line in $(tmux showenv -t $(tmux display -p "#S") | tr "\n" ",");
if [[ $line == -* ]]; then
unset $(echo $line | cut -c2-);
jnovack /
Last active Mar 28, 2018 - Sends irssi notifications to Pushover
use strict;
use warnings;
# A lot of code borrowed from the script at
# and (Daniel Johansson <>)
# and
You can’t perform that action at this time.