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
Start-Transcript C:\ProgramData\account-hygiene.log -Append | |
function accountFilter($accountList) { | |
# Filter out system principals and exempt accounts | |
return $accountList | Where-Object { | |
# Don't process these accounts | |
$_.DistinguishedName -notmatch "OU=Service Accounts" -and | |
$_.DistinguishedName -notmatch "OU=Admin Accounts" -and | |
$_.DistinguishedName -notmatch "OU=DA Accounts" -and | |
$_.DistinguishedName -notmatch "OU=Special" -and |
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
/var/log/audit/audit.log { | |
weekly | |
missingok | |
notifempty | |
sharedscripts | |
rotate 5 | |
maxsize 50M | |
compress | |
copytruncate | |
nodateext |
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
#/etc/systemd/system/dev-shm-noexec.service | |
[Unit] | |
Description=Remounts /dev/shm with noexec to satisfy STIG requirements | |
DefaultDependencies=false | |
[Service] | |
ExecStart=/bin/mount -o remount,nosuid /dev/shm | |
Type=oneshot |
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
Start-Transcript C:\ProgramData\smartcard-enforcement.log -Append | |
function accountFilter($accountList) { | |
# Filter out system principals and exempt accounts | |
return $accountList | Where-Object { | |
# These can't use a smart card | |
$_.DistinguishedName -notmatch "Service Accounts" -and | |
$_.DistinguishedName -notmatch "Admin Accounts" -and | |
$_.DistinguishedName -notmatch "DA Accounts" -and | |
# Builtin and system principals |
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
/* ==UserStyle== | |
@name Wanikani Breeze Dark (Fixes) | |
@namespace github.com/AfroThundr3007730 | |
@version 1.0.3 | |
@description Fixes for the Wanikani Breeze Dark theme | |
@author ZeroSinner & Kumirei & AfroThundr | |
@homepageURL https://gitlab.com/valeth/wanikani-breeze-dark/ | |
@updateURL https://gist.githubusercontent.com/AfroThundr3007730/6d591a5d2594d7951de92306858a60a7/raw/wanikani-breeze-dark-fix.user.css | |
@supportURL https://community.wanikani.com/t/16973/ | |
@license CC-BY-SA-4.0 |
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/python3 | |
import os | |
import sys | |
import json | |
def parse_proc(): | |
values = {} |
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 | |
# These steps will allow the setup of an on-demand SSH proxy | |
# Three unit files will be created to serve this purpose: | |
# ssh-socks-helper.socket - The listening socket providing activation | |
# ssh-socks-helper.service - A systemd proxy to pass the socket fd | |
# ssh-socks.service - The actual SSH service providing the tunnel | |
cat <<'EOF' > ~/.config/systemd/user/ssh-socks-helper.socket | |
[Unit] | |
Description=Proxy Helper Socket for Bastion SOCKS5 Proxy |
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
// ==UserScript== | |
// @name Remove WSJ Paywall | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Attempts to show the non-paywalled version of Wall Street Journal articles | |
// @author AfroThundr | |
// @include https://www.wsj.com/articles/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
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/python | |
# Dumps pre-webextension Stylish styles to CSS files | |
import os | |
import json | |
def dump_styles(): | |
dump_dir = os.path.join(os.getcwd(), 'style_dump') | |
style_file = os.path.join(os.getcwd(), 'stylish-storage.js') | |
stylish = json.load(open(style_file, 'r')) |
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 | |
# Pre- and post-hook for certbot dns-01 to use DDNS | |
# Where we put our TSIG for dynamic udpates | |
TSIG=/etc/letsencrypt/acme.key | |
# We need the authoritative nameserver | |
NS="dig +short $(host -v $CERTBOT_DOMAIN | awk '/SOA/ {print $5}' | head -1)" | |
# The actual challenge record to use |