Skip to content

Instantly share code, notes, and snippets.


Dave Hulbert dave1010

View GitHub Profile
v0lkan / nginx.conf
Last active Oct 21, 2021
Configuring NGINX for Maximum Throughput Under High Concurrency
View nginx.conf
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
View types.markdown

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

winhamwr /
Created Jun 4, 2012
Creating a repeatable, dynamic site to site VPN with OpenSwan on Ubuntu 10.04 from Amazon EC2

Creating a dynamic site-to-site VPN with OpenSwan on Ubuntu 10.04 on EC2

Wes Winham

There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.

jawn / Ideal onboarding
Last active Feb 23, 2021
Ideal onboarding braindump
View Ideal onboarding
CHH / .gitignore
Created Aug 2, 2011
PHP Templating Engine with bindable $this support in 53 LOC
View .gitignore
ryanb / github_tree_slider.js
Created Dec 6, 2010
This is how GitHub's new AJAX file browser works.
View github_tree_slider.js
GitHub.TreeSlider = function () {
if (window.history && window.history.pushState) {
function a() {
if (e.sliding) {
e.sliding = false;
if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
sh1n0b1 /
Created Apr 8, 2014
Python Heartbleed (CVE-2014-0160) Proof of Concept
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
dave1010 / htaccess
Created Dec 14, 2011
HTTP Status Cats Apache (htaccess) config
View htaccess
# HTTP Status Cats
# Apache (htaccess) config created by @dave1010
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# Usage: copy save this file as .htaccess or add it to your httpd.conf
ErrorDocument 404 '<a href="" title="404 - Not Found by GirlieMac, on Flickr"><img src="" width="500" height="400" alt="404 - Not Found"></a>'
UnderpantsGnome / pre-commit
Last active Sep 27, 2015
My pre-commit hook
View pre-commit
debug=`git diff --cached | grep -C 2 -E '+\s*And (open|show me the page|save_and_open_page)'`
pry=`git diff --cached | grep -C 2 -E 'binding.pry'`
debugger=`git diff --cached | grep -C 2 debugger`
console_log=`git diff --cached | grep -C 2 console.log`
conflicts=`git diff --cached | grep -C 2 -E '<<<|>>>'`
if [ -n "$debug" ]; then
echo "debugging statements added in this commit"
dave1010 /
Created Aug 18, 2011
The WordPress Way - The 10 rules of WordPress development

The WordPress Way

A tongue-in-cheek look at coding standards in the WordPress core and the average WordPress plugin.

  1. # Declare variables global - in case they're going to be used again
  2. All function/method parameters should be strings (e.g. 'yes'/'no') - for clarity
  3. Functions and methods should return mixed types
  4. No need to separate PHP logic from HTML, JS or CSS
  5. Don't worry about PHP Notices - they're not important