Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike DeVita mikedevita

View GitHub Profile
View ghost-performance-nginx-config.conf
# sets the proxy cache path location, max size 2g
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g;
# transfers the `Host` header to the backend
proxy_set_header Host $host;
# uses the defined STATIC cache zone
proxy_cache STATIC;
# cache 200 10 minutes, 404 1 minute, others status codes not cached
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active Jan 16, 2021
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@JeffreyWay
JeffreyWay / tip.sh
Created Aug 15, 2013
Ever want to undo everything that you've worked on since the last commit (including adding new files)? Here's a little alias to help with that.
View tip.sh
alias gundo='git reset HEAD~ && git clean -df'
View gist:5105516
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;font-size:16px}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/php");</script>
@davidvanleeuwen
davidvanleeuwen / Gruntfile.coffee
Last active Dec 11, 2015
My Gruntfile for projects (still a work in progress)
View Gruntfile.coffee
'use strict'
module.exports = (grunt) ->
grunt.initConfig
open:
default:
url: 'http://localhost:5000'
reload:
port: 5000
proxy:
@elvisimprsntr
elvisimprsntr / siriproxy-raspberrypi.txt
Last active Jan 4, 2019
SiriProxy running on a Raspberry Pi computer.
View siriproxy-raspberrypi.txt
# $Header: /root/RCS/siriproxy-raspberrypi.txt,v 1.9 2013/11/09 08:11:00 root Exp $
# $Log: siriproxy-raspberrypi.txt,v $
# Revision 1.9 2013/11/09 08:11:00 root
# updated for latest RVM which installs dependencies and Ruby by default
#
# Revision 1.8 2013/03/22 20:41:20 root
# updated for Ruby 2.0.0 and SiriProxy 0.5.2
#
# Revision 1.7 2012/12/31 04:42:57 root
# shorter URL for newark and typos
@vrypan
vrypan / dyndns53.py
Last active Oct 13, 2020
Python script to add/update an A record at amazon area53 DNS service, using current IP. (ie, dyndns replacement)
View dyndns53.py
from area53 import route53
from boto.route53.exception import DNSServerError
import requests
import sys
from datetime import datetime
# Modified from https://markcaudill.me/blog/2012/07/dynamic-route53-dns-updating-with-python/
domain = 'domain.tld'
subdomain = 'subdomain_name'
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
@brookr
brookr / Google Apps Standard DNS Settings
Last active May 25, 2017
All the DNS records for a new Google Apps account, as entered in AWS:Route53
View Google Apps Standard DNS Settings
A: # If using naked domain redirects via Google
216.239.32.21
216.239.34.21
216.239.36.21
216.239.38.21
MX: # If using Google Mail
1 ASPMX.L.GOOGLE.COM.
5 ALT1.ASPMX.L.GOOGLE.COM.
5 ALT2.ASPMX.L.GOOGLE.COM.
You can’t perform that action at this time.