Skip to content

Instantly share code, notes, and snippets.

View ellefsen's full-sized avatar

Kim Ellefsen ellefsen

View GitHub Profile
@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;
}
'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: {
# 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
<?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.
*
@ellefsen
ellefsen / gist:94c7d329e251a0c8bec5
Created October 22, 2014 21:57
Create WordPress user programatically
<?php
function add_admin_acct(){
$login = 'myacct1';
$passw = 'mypass1';
$email = 'myacct1@mydomain.com';
if ( !username_exists( $login ) && !email_exists( $email ) ) {
$user_id = wp_create_user( $login, $passw, $email );
$user = new WP_User( $user_id );
@ellefsen
ellefsen / cookie.php
Last active August 29, 2015 14:07 — forked from Abban/cookie.php
<?php
/*
Plugin name: Single user login
Plugin URI:
Description:
Author: Ben May
Author URI:
Version: 0.1
*/