Skip to content

Instantly share code, notes, and snippets.

View chris-roerig's full-sized avatar
😎
💯

Chris Roerig chris-roerig

😎
💯
View GitHub Profile
@chris-roerig
chris-roerig / gist:bb7077e2e3ff742e5cdb
Last active August 29, 2015 14:10
A simple script to swap the hosts file
#!/bin/bash
case "$1" in
live)
cp /etc/hosts.live /etc/hosts
echo "Now using the live hosts file"
exit
;;
@chris-roerig
chris-roerig / gist:20237fbce75a58ec6fc4
Last active August 29, 2015 14:10
Iterates a list of URLs from a CSV, tries to access each page and adds it to a CSV based on the status code.
require 'curb'
require 'csv'
file = 'crawlreport.csv'
started_at = Time.new
codes = {
missing: [],
success: [],
redirect: [],
failure: []
@chris-roerig
chris-roerig / gist:79777c111374f6356348
Last active October 19, 2020 23:17
How to install NameCheap EssentialSSL wildcard certificate in nginx on Ubuntu 14.04

First generate a new CSR openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr

DO NOT DELETE THE server.key FILE

Follow the rest of this guide after activating the csr and recieving the certs from Namechep.

unzip the package from COMODO

unzip STAR_<yourfqdn_here>_com.zip