Skip to content

Instantly share code, notes, and snippets.

Dave Hulbert dave1010

Block or report user

Report or block dave1010

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
@jawn
jawn / Ideal onboarding braindump.md
Last active Nov 7, 2019
Ideal onboarding braindump
View Ideal onboarding braindump.md
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.

@v0lkan
v0lkan / nginx.conf
Last active Dec 7, 2019
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
@Numan1617
Numan1617 / gist:dff95e1332dd14cc87c3
Created Apr 8, 2014
iOS - Automatic Version Numbering
View gist:dff95e1332dd14cc87c3
# Use last tag as the base for the version. E.g. tag initial commit as 0.0
LAST_TAG_VERSION=`git describe --tags | cut -f1 -d"-"`
# Optional. Same as above but keeps the commit hash
#LAST_TAG_VERSION=`git describe --tags`
# Total number of commits in the repository
TOTAL_COMMITS=`git rev-list HEAD --count`
# Write the version numbers to the compiled product
@sh1n0b1
sh1n0b1 / ssltest.py
Created Apr 8, 2014
Python Heartbleed (CVE-2014-0160) Proof of Concept
View ssltest.py
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@endocrimes
endocrimes / StyleGuide.md
Last active Aug 29, 2015
Objective-C style guide
View StyleGuide.md

My Objective-C Style guide

This style guide outlines the coding conventions that I try to stick to when writing Objective-C. I'm posting it here mostly as a brain dump and easy reference for the future, and to formalise it a little more.

It's pretty similar to that of the NYTimes. This document is mostly a customised version of that, you should go check theirs out!

Useful Resources

If you're looking to see some of the reasons behind some choices, or for something I haven't covered, look at the sites below, Apples documentation is pretty great.

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

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

Wes Winham winhamwr@gmail.com

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.

@dave1010
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:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>'
@UnderpantsGnome
UnderpantsGnome / pre-commit
Last active Sep 27, 2015
My pre-commit hook
View pre-commit
#!/bin/bash
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
dave1010 / 00-the-wordpress-way.md
Created Aug 18, 2011
The WordPress Way - The 10 rules of WordPress development
View 00-the-wordpress-way.md

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
You can’t perform that action at this time.