Skip to content

Instantly share code, notes, and snippets.

View ellefsen's full-sized avatar

Kim Ellefsen ellefsen

View GitHub Profile
@ellefsen
ellefsen / gist:3215943
Created July 31, 2012 10:35 — forked from evansolomon/gist:2274120
nginx WordPress multisite config
server {
listen 80 default_server;
server_name domain.com *.domain.com;
root /srv/www/domain.com/public;
access_log /srv/www/domain.com/log/access.log;
error_log /srv/www/domain.com/log/error.log;
location / {
index index.php;
<?php
/*
Term Archive Pages:
- http://example.com/recipes/dinner/
- http://example.com/recipes/breakfast,brunch/
Single Recipe Pages:
- http://example.com/recipes/dinner/soup-title/
<?php
/*
Plugin name: Single user login
Plugin URI:
Description:
Author: Ben May
Author URI:
Version: 0.1
*/
@ellefsen
ellefsen / cookie.php
Last active August 29, 2015 14:07 — forked from Abban/cookie.php
<?php
/**
* This function looks for the directory that "wp-config.php" resides in
* and then looks for a file named ".revision", the content of which is a
* single integer set by Beanstalk upon deployment.
*
* The purpose is to version static resources so that browsers will
* re-download any cached, outdated versions with the newer version.
*
# The latest version of this script is now available at
# https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh
VERSION=1.9.3-p286
brew update
brew install rbenv ruby-build rbenv-vars readline ctags
if [ -n "${ZSH_VERSION:-}" ]; then
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
else
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
// watch for changes and trigger compass, jshint, uglify and livereload
watch: {
@ellefsen
ellefsen / wrapping.php
Last active August 29, 2015 14:10 — forked from scribu/wrapping.php
<?php
# License: Public Domain
# I recommend replacing 'my_' with your own prefix.
function my_template_path() {
return My_Wrapping::$main_template;
}