This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
basename $0 |& | |
IFS=- read -p name cmd | |
if [ -z "$cmd" -a $# -gt 0 ]; then | |
cmd=$1 | |
shift | |
fi | |
cmd=${cmd%svc} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# "include: /var/unbound/etc/ad-blacklist.conf" in /var/unbound/etc/unbound.conf | |
# run script as daily cron | |
TMPFILE=$( mktemp get_dns_blacklists-XXXXXXXXX ) | |
trap 'rm -f $TMPFILE; exit 1' EXIT KILL INT QUIT TERM | |
( | |
ftp -VM -o- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | grep ^0.0.0.0 | awk '{ print $2 }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# find_network.sh - An OpenBSD Wireless Network configurator | |
# Looks for available networks listed at the end of the script | |
# Use this by adding "!/path/to/find_network.sh \$if" to your wlan hostname.if | |
if=$1 | |
if [ -z "$if" ]; then | |
echo "Usage: $0 interface" >&2 | |
exit 2; | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env plackup -s FCGIDropPrivs | |
use strict; | |
use warnings; | |
my ($user, $group) = qw( nobody nogroup ); | |
my $uid = getpwnam($user); | |
my $gid = getgrnam($group); | |
my $root = '/var/empty'; | |
package Plack::Handler::FCGIDropPrivs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/afresh1/dotfiles/blob/master/plenv/libexec/plenv-install-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/afresh1/dotfiles/blob/master/plenv/libexec/plenv-install-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
set -e | |
set -f -u -C | |
# Copyright (c) 2019 Andrew Hewus Fresh <andrew@afresh1.com> | |
# | |
# 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. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
egress=$1 | |
internal=$2 | |
# This should set up ipv6 on XFinity or Comcast on OpenBSD 6.1 | |
# Stop everything | |
/usr/bin/pkill dhcp6c | |
route -qn delete -inet6 default | |
ifconfig $egress -inet6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -T | |
use v5.16; | |
use warnings; | |
use OpenBSD::Pledge qw< pledge >; | |
use JSON::PP qw<>; | |
# Copyright (c) 2020 Andrew Hewus Fresh <andrew@afresh1.com> | |
# | |
# Permission to use, copy, modify, and distribute this software for any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -T | |
use v5.16; | |
use warnings; | |
delete $ENV{PATH}; | |
delete $ENV{ENV}; | |
use OpenBSD::Unveil; | |
use OpenBSD::Pledge; |