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
Dummy HSTS Priming Target | |
See https://crbug.com/626180 |
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/sh -e | |
cat << EOF | |
if [ -f \${prefix}/user.cfg ]; then | |
source \${prefix}/user.cfg | |
if [ -n "\${GRUB2_PASSWORD}" ]; then | |
set superusers="root" | |
export superusers | |
password_pbkdf2 root \${GRUB2_PASSWORD} | |
fi | |
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
#!/bin/bash | |
# Record time duration, concurrent timers | |
timer() { | |
[[ $1 =~ ^[0-9]+$ ]] && { | |
[[ $n -gt $1 ]] || n=$1; local i=$1; shift; } | |
[[ $1 == -n ]] && { n=$(( n + 1 )); shift; } | |
[[ $1 == -p ]] && { n=$(( n - 1 )); shift; } | |
[[ $1 == -c ]] && { local i=$n; shift; } | |
[[ -n $1 ]] || say -n err 'No timer action specified.' |
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 | |
# Log message and print to stdout | |
# shellcheck disable=SC2059 | |
say() { | |
export TERM=${TERM:=xterm} | |
if [[ $1 == -h ]]; then | |
shift; local s=$1; shift | |
tput setaf 2; printf "$s\\n" "$@" | |
else |
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
<Directory "/files/"> | |
IndexOptions Charset=UTF-8 DescriptionWidth=* HTMLTable FancyIndexing FoldersFirst IconsAreLinks IconHeight=16 IconWidth=16 IgnoreCase NameWidth=* SuppressHTMLPreamble SuppressRules XHTML VersionSort | |
IndexStyleSheet "/assets/css/bootstrap-4.1.3.min.css" | |
IndexOrderDefault Ascending Name | |
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t | |
HeaderName "/assets/html/HEADER.html" | |
ReadmeName "/assets/html/README.html" | |
Options Indexes SymlinksIfOwnerMatch | |
AllowOverride None |
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
# Original version | |
function New-SecurePassword { | |
<# .SYNOPSIS | |
Generates high entropy passwords of configurable length #> | |
[Alias('genpw')] | |
Param( | |
# Length of passwords to genereate | |
[int]$Length = 20, | |
# How many passwords to generate | |
[int]$Count = 5, |
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
# This file can be sourced and also executed directly | |
# Definitions and declarations go here | |
function main () { | |
# All action happens here | |
return 0 | |
} | |
# Only run if not sourced |
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
# Goes in $HOME/.config/systemd/user/borg-auto.service | |
[Unit] | |
Description=Borg backup service | |
[Service] | |
Type=simple | |
Restart=no | |
ExecStart=%h/.local/bin/borg-auto |
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
[Unit] | |
Description=Splunk Enterprise | |
After=network.target | |
Wants=network.target | |
[Service] | |
Type=forking | |
RemainAfterExit=no | |
Restart=on-failure | |
RestartSec=30s |
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 | |
# If you selected the STIG config during install, some of these will be configured already. | |
# All of these are mentioned in the STIG, but some of them must be done manually. | |
# FIPS all the things. | |
yum install -y dracut-fips | |
# Regenerate ramdisk (current kernel) | |
dracut -f "/boot/initramfs-$(uname -r).img" "$(uname -r)" | |
# Append 'fips=1' to GRUB_CMDLINE_LINUX | |
grep 'fips=1' /proc/cmdline || |