Skip to content

Instantly share code, notes, and snippets.

View Tristor's full-sized avatar

Tristor Tristor

View GitHub Profile
@morgant
morgant / gist:1753095
Created February 6, 2012 16:25
Building GnuTLS on Mac OS X

Preparing the Build Environment

cd ~/Desktop
mkdir wget-build
cd wget-build

Building & Installing GMP 5.0.2

@maxdavid
maxdavid / xkcd-hasher.py
Last active December 15, 2015 17:20
A quick and sloppy attempt to win http://almamater.xkcd.com/ for evergreen.edu
#!/usr/bin/env python3
# xkcd-hasher.py
# for the motherland!! http://almamater.xkcd.com/
# forked from arthurdent's 1193.py. thx buddy
#
# usage: ./xkcd-hasher.py <num hashes> <randword length> <goal number>
from skein import skein1024
from datetime import *
@thefloweringash
thefloweringash / fix-freebsd-update.sh
Created January 31, 2014 10:09
There I "fixed" freebsd-update.
#!/bin/sh
# freebsd-update makes assumptions that don't match the world I live
# in. My local mirror has a 20ms rtt, can probably saturate my 130mbps
# line speed and takes about 2 minutes to fetch all of FreeBSD 10's
# dists; freebsd-update's mirrors are at least 140ms away, and take
# about 4 hours to fetch the changes from 9.1-RELEASE-p10 to
# 10.0-RELEASE.
#
# freebsd-update is a clever script that downloads a lot of bsdiff
@mwpastore
mwpastore / 00README.md
Last active September 30, 2024 16:00
Lightning Fast WordPress: Caddy+Varnish+PHP-FPM

README

This gist assumes you are migrating an existing site for www.example.com — ideally WordPress — to a new server — ideally Ubuntu Server 16.04 LTS — and wish to enable HTTP/2 (backwards compatibile with HTTP/1.1) with always-on HTTPS, caching, compression, and more. Although these instructions are geared towards WordPress, they should be trivially extensible to other PHP frameworks, other FastCGI backends, and even non-FastCGI backends (using proxy in lieu of fastcgi in the terminal Caddyfile stanza).

Quickstart: Use your own naked and canonical domain names instead of example.com and www.example.com and customize the Caddyfile and VCL provided in this gist to your preferences!

These instructions target Varnish Cache 4.1, PHP-FPM 7.0, and Caddy 0.10. (I'm using MariaDB 10.1 as well, but that's not relevant to this guide.)