Skip to content

Instantly share code, notes, and snippets.

Andrew Maxwell AJMaxwell

Block or report user

Report or block AJMaxwell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AJMaxwell
AJMaxwell / nginx.ufw
Created Sep 20, 2017
UFW configuration for Nginx on Ubuntu 16.04 (/etc/ufw/applications.d/nginx)
View nginx.ufw
[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.service
Last active Dec 12, 2017
nginx.service file for Ubuntu 16.04 (/etc/systemd/system/)
View nginx.service
# 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 / cache-warmer.sh
Last active Sep 13, 2019
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.
View cache-warmer.sh
#!/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 / keybase.md
Created Mar 29, 2017
Keybase.io ownership verification
View keybase.md

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-openssl_build.sh
Last active Dec 23, 2018
Install Nginx, OpenSSL, and ngx_pagespeed from source on Ubuntu 14.04
View nginx-openssl_build.sh
#!/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
You can’t perform that action at this time.