This file contains hidden or 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
| /** | |
| * Dark UPS Tracker v0.1 | |
| * <https://gist.github.com/carlbennett/5569ae5c5217eb51f1dbd0d5ff848cfa> | |
| * | |
| * Written by Carl Bennett <carl@carlbennett.me> | |
| * You are hereby free to use this code under the MIT license. | |
| * 14 August 2020 | |
| * | |
| * Official UPS Orange Color: #f7be00 | |
| */ |
This file contains hidden or 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 bash | |
| # vim: set colorcolumn=: | |
| set -e -o pipefail | |
| [ -z "${TERM}" ] && echo 'Error: TERM not set, this script is exclusively interactive!' 1>&2 && exit 1 | |
| echo -e '\e[1;32mCertificate Generator\e[0m' | |
| HOSTNAMES=() |
This file contains hidden or 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
| <?php | |
| namespace CarlBennett; | |
| use \DateTime; | |
| use \DateTimeZone; | |
| use \Exception; | |
| use \StdClass; | |
| const GRAVATAR_BASE = 'https://secure.gravatar.com/avatar/'; |
This file contains hidden or 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/bash | |
| # Load the PHP environment so we can use php. | |
| source /opt/remi/php72/enable | |
| if [ -z "$PHP_BIN" ] | |
| then | |
| PHP_BIN=php | |
| fi |
This file contains hidden or 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 php | |
| <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | |
| if (php_sapi_name() !== "cli") { | |
| http_response_code(500); | |
| exit("Must be ran by php-cli"); | |
| } | |
| if ($argc < 3) { | |
| exit( |
This file contains hidden or 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
| ; Google DNS: | |
| nameserver 8.8.8.8 | |
| nameserver 8.8.4.4 | |
| nameserver 2001:4860:4860::8888 | |
| nameserver 2001:4860:4860::8844 | |
| ; OpenDNS: | |
| nameserver 208.67.222.222 | |
| nameserver 208.67.222.220 | |
| nameserver 2620:0:ccc::2 | |
| nameserver 2620:0:ccd::2 |
This file contains hidden or 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
| It's story time. | |
| The Dallas sniper fire shootings that occurred on July 7, 2016 really had me on | |
| the edge of my seat. I began watching the live broadcast around 8:30pm. | |
| When I began watching, the shooting was still a very active situation. The news | |
| reporter was crouched down behind a car with a couple of police officers. All | |
| I could think at this time was when will the heavy armored vehicles arrive from | |
| the police state. |
This file contains hidden or 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
| # Enhanced Network Hosts File | |
| # Authored by Carl Bennett <https://carlbennett.me> | |
| # | |
| # How To <https://support.rackspace.com/how-to/modify-your-hosts-file/> | |
| # (I do not endorse Rackspace, the document is simply of decent quality.) | |
| # | |
| # This file is hereby released under the MIT license. A copy of the license can | |
| # be found at: <https://opensource.org/licenses/MIT> | |
| # |
This file contains hidden or 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
| # Fix user and directory permissions: | |
| find . -type f -print0 | sudo xargs -0 chmod 664 | |
| find . -type d -print0 | sudo xargs -0 chmod 775 | |
| # Copy user permissions to group permissions: | |
| chmod -R g=u . | |
| # Make new files inherit the group of the container directory | |
| chmod g+s <directory> |
This file contains hidden or 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/bash | |
| # vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: | |
| # Only display motd if tty and not sudoing as root | |
| [ "$PS1" ] && [ "$EUID" -ne 0 ] || return 0 | |
| # Run the entire function in its own subshell. | |
| # | |
| # The local keyword in functions prevents inheriting values. | |
| # The subshell prevents exporting them. |
NewerOlder