Skip to content

Instantly share code, notes, and snippets.

View creativecoder's full-sized avatar

Grant Kinney creativecoder

View GitHub Profile
@creativecoder
creativecoder / Custom.css
Created November 30, 2012 19:43 — forked from bentruyman/Custom.css
Tomorrow Theme for Chrome Developer Tools
/**********************************************/
/*
/* Tomorrow Skin by Ben Truyman - 2011
/*
/* Based on Chris Kempson's Tomorrow Theme:
/* https://github.com/ChrisKempson/Tomorrow-Theme
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
#!/bin/sh
# any2markdown.sh
#
# A shell script that converts documents to markdown
#
# https://gist.github.com/creativecoder/4990796
#
# Depends on:
# pandoc: http://johnmacfarlane.net/pandoc/
@creativecoder
creativecoder / gist:5475025
Created April 27, 2013 22:36
Redirect user to plugin settings page upon plugin activation, if only this plugin is being activated
// Redirect if not activating multiple plugins at once
if( ! isset( $_GET['activate-multi'] ) ) {
wp_redirect( admin_url( 'options-general.php?page=my-plugin-options' ) );
}
@creativecoder
creativecoder / Unix Command Line Notes.md
Created July 3, 2013 01:58
Unix Command Line Notes

Unix Command Line Notes

  • Command settings
    • .bashrc
      • Aliases - place the following on a new line in the .bashrc file
        • alias [alias-name]='[alias command(s)]
        • Ex:alias ls='ls -lh'
    • .profile or .bash_profile
  • Add folders to you path
@creativecoder
creativecoder / httpd-vhosts.conf
Last active March 8, 2017 23:55
Apache redirect for missing images
# Place inside a <VirtualHost> or <Directory> declaration
#
# Particularly useful for displaying images in a local development environment
# without actually downloading all of the images
#
# Props to Mark Jaquith for the suggestion at WordCamp SF 2013
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)(png|jpg|jpeg|gif|svg)$ http://www.example.com$1$2 [L]
@creativecoder
creativecoder / .gitignore
Created August 8, 2013 02:54
.gitignore all but the specified subdirectory
# Ignore all files except for a particular directory
*
# Don't ignore directories themselves, else we can't add anything to the repository
!*/
# Don't ignore any directory with the name "path"
!**/path/*
# or its subdirectories
!**/path/**/*
# And don't forget .gitignore itself

Bearded's Hourly Contract

Date: [[Date of Document]] Between [Our Company] and [Your Company]

Summary

We’re not big on formality, but sometimes it’s best to have a few simple things written down so that we’re all on the same page. In this contract you won’t find complicated legal terms or large passages of unreadable text. We have no desire to trick you into signing something that you might later regret. We do want what’s best for the safety of both parties, now and in the future.

@creativecoder
creativecoder / Markdown.sublime-build
Created March 3, 2014 00:00
Open markdown files in Marked.app (on Mac) with Cmd + B
{
"shell_cmd": "open -a marked \"$file\"",
"selector": "text.html.markdown"
}
@creativecoder
creativecoder / Git Notes.md
Created April 17, 2014 23:25
git version control notes

Git Version Control

  • Understanding git
    • Anatomy of git
      • HEAD
        • Think of it as the snapshot of your last commit
        • Pointer to the current branch reference, which is the last commit you made or the last commit that was checked out
      • Index
  • Snapshot of your next commit
@creativecoder
creativecoder / LaravelContext.php
Last active August 29, 2015 14:26
Laravel FeatureContext for testing with Behat (use this to extend your FeatureContext class instead of Mink)
<?php
use Illuminate\Foundation\Testing\ApplicationTrait;
use Illuminate\Foundation\Testing\AssertionsTrait;
use Illuminate\Foundation\Testing\CrawlerTrait;
class LaravelContext extends PHPUnit_Framework_TestCase
{
use ApplicationTrait, AssertionsTrait, CrawlerTrait;