Skip to content

Instantly share code, notes, and snippets.

dprandzioch / gist:4d0848a91f0357eb4a3b4af07d0ce1b1
Created Mar 13, 2020
shameless hrcloud2 code rip for faux code generator test
View gist:4d0848a91f0357eb4a3b4af07d0ce1b1
// / -----------------------------------------------------------------------------------
// / The follwoing code checks for required core files and terminates if they are missing.
if (!file_exists(realpath(dirname(__FILE__)).'/securityCore.php')) die ('<body>ERROR!!! HRC2AppCore21, Cannot process the HRCloud2 Security Core file (securityCore.php).'.PHP_EOL.'</body></html>');
else require_once (realpath(dirname(__FILE__)).'/securityCore.php');
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / The following code sets the global variables for the session.
$AppDir = $InstLoc.'/Applications/';
dprandzioch / gogs
Created Aug 6, 2016
Gogs FreeBSD rc.d script
View gogs
# PROVIDE: gogs
# REQUIRE: networking syslog
. /etc/rc.subr
dprandzioch /
Last active Jan 11, 2022
OS X setup script (currently 10.11)
# Homebrew requires Xcode CLI tools to be installed. OS X provides stubs for CLI tools
# that trigger the CLI tools installer when called. So we call `git` to start the installation.
echo "Press any key when Xcode CLI tools installation is complete..."
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL"
dprandzioch /
Created Mar 28, 2016
Simple backup script utilizing rsync and ZFS snapshots
#!/usr/bin/env bash
# Simple backup script utilizing rsync and ZFS snapshots.
# rsync must be installed both on the server and the client.
# ssh must be installed on the client.
# bash must be installed on the server.
dprandzioch / OwncloudCaddyfile
Last active Dec 8, 2020
Caddy ownCloud Gist
View OwncloudCaddyfile {
root /usr/local/www/owncloud/
fastcgi / php
rewrite {
regexp /index.php/.*
to /index.php?{query}
log /usr/local/www/owncloud.log
dprandzioch / caddy
Last active Dec 27, 2019
FreeBSD Caddy init script
View caddy
# PROVIDE: caddy
# REQUIRE: networking
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable caddy:
# caddy_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable caddy
dprandzioch /
Created Jan 1, 2016
A bash script for automatically downloading new podcast episodes and pretty-printing new files. Works on Linux and BSD/OS X
#!/usr/bin/env bash
# The following script parses podcast feeds and downloads all podcast episodes listed in
# the feed if they don't exist within the target path. The target directory will be created
# if it does not exist.
[ -x "$(command -v wget)" ] || (echo "wget is not installed" && exit 1)
[ -x "$(command -v sed)" ] || (echo "sed is not installed" && exit 1)
[ -x "$(command -v xargs)" ] || (echo "xargs is not installed" && exit 1)