Skip to content

Instantly share code, notes, and snippets.


Matt Rude mattrude

View GitHub Profile
plentz / nginx.conf
Last active Sep 24, 2021
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
alexkingorg / maybe-include-plugin.php
Created Jul 6, 2012
Conditional loading of a plugin within a WordPress theme.
View maybe-include-plugin.php
// Run this code on 'after_theme_setup', when plugins have already been loaded.
add_action('after_setup_theme', 'my_load_plugin');
// This function loads the plugin.
function my_load_plugin() {
// Check to see if your plugin has already been loaded. This can be done in several
// ways - here are a few examples:
markjaquith / gist:2653957
Created May 10, 2012
WordPress Fragment Caching convenience wrapper
View gist:2653957
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL
if ( !$frag->output() ) { // NOTE, testing for a return of false
// YOU CANNOT FORGET THIS. If you do, the site will break.
mattrude / gist:2005151
Created Mar 9, 2012 — forked from stran12/gist:1394757
Step-by-step installation of cGit with Nginx
View gist:2005151

How to install cGit on Nginx (Ubuntu server)

Step-by-step installtion of cGit on nginx without funky rewrite rules.


This is for ::

cmcculloh / post-receive-email
Created Nov 18, 2010
Example of a post receive email file called by a git hook that sends a color coded formatted html email of the git diff
View post-receive-email
# Copyright (c) 2007 Andy Parkins
# An example hook script to mail out commit update information. This hook
# sends emails listing new revisions to the repository introduced by the
# change being reported. The rule is that (for branch updates) each commit
# will appear on one email and one email only.
# This hook is stored in the contrib/hooks directory. Your distribution
View version_reporter.rb
# An example Jekyll generator. Utilizes the new plugin system.
# 1. Make a _plugins directory in your jekyll site, and put this class in a file there.
# 2. Upon site generation, version.html will be created in your root destination with
# # the version of Jekyll that generated it
module Jekyll
class VersionReporter < Generator
safe true