Skip to content

Instantly share code, notes, and snippets.

View AJMaxwell's full-sized avatar

Andrew Maxwell AJMaxwell

View GitHub Profile
@AJMaxwell
AJMaxwell / keybase.md
Created March 29, 2017 19:06
Keybase.io ownership verification

Keybase proof

I hereby claim:

  • I am ajmaxwell on github.
  • I am ajmaxwell (https://keybase.io/ajmaxwell) on keybase.
  • I have a public key whose fingerprint is FAE6 33D9 BE38 DCBF 81C7 DA8A 2592 1C69 11E3 28D2

To claim this, I am signing this object:

@AJMaxwell
AJMaxwell / nginx.service
Last active December 12, 2017 19:24
nginx.service file for Ubuntu 16.04 (/etc/systemd/system/)
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
@AJMaxwell
AJMaxwell / nginx.ufw
Created September 20, 2017 19:09
UFW configuration for Nginx on Ubuntu 16.04 (/etc/ufw/applications.d/nginx)
[Nginx HTTP]
title=Web Server (Nginx, HTTP)
description=Small, but very powerful and efficient web server
ports=80/tcp
[Nginx HTTPS]
title=Web Server (Nginx, HTTPS)
description=Small, but very powerful and efficient web server
ports=443/tcp
@AJMaxwell
AJMaxwell / nginx-openssl_build.sh
Last active September 12, 2021 20:57
Install Nginx, OpenSSL, and ngx_pagespeed from source on Ubuntu 14.04
#!/bin/bash
##############################################################################################
## Install Nginx with OpenSSL, and ngx_pagespeed
##
## Author: Andrew Maxwell <amaxwell@ajmaxwell.com>
## Date: 2017/09/18
## Version: 0.3
##
## Disclaimer: I am not responsible for how you use this script. Do not assume this script
@AJMaxwell
AJMaxwell / cache-warmer.sh
Last active June 13, 2022 09:36
A quick bash script I wrote to prime the cache of all my websites. This script grabs the sitemap of the site you wish to warm, then grep the urls to wget each one to cache it on the server.
#!/bin/bash
#####################################################################################################
# Cache Warmer
#
# Useage: cache-warmer.sh ...args
#
# This script grabs the sitemap of the site you wish to warm, then grep the urls to wget each one
# to cache it on the server. I'm sure there are better ways to do this, but this was a simple enough
# method for my needs. I didn't want to have to type in the urls each time I warmed their cache, so
# I just made simple functions with short names to feed those urls into the cache warming function.
@AJMaxwell
AJMaxwell / SuperchargeWindowsDefender.ps1
Created November 8, 2022 18:14
Supercharge Windows Defender with some basic Registry & Policy changes. Inspired by https://0ut3r.space/2022/03/06/windows-defender/
# Supercharge Windows Defender
#
# Inspired by https://0ut3r.space/2022/03/06/windows-defender/
# Optional GUI Changes
# Windows Security Memory Integrity
# When an old driver is preventing Memory Integrity from enabling, delete the driver by running the following
# PowerShell command as Administrator:
# Get-CimInstance Win32_SystemDriver -Filter "name='<DriverName>'" | Invoke-CimMethod -MethodName Delete