Skip to content

Instantly share code, notes, and snippets.

<?php
// Writes the appropriate #leftnav menu based on page id
$current_page_id = get_the_ID();
$amenities_sub_nav_pages = array(34, 63);
if (in_array($current_page_id, $amenities_sub_nav_pages)) {
wp_nav_menu(array(
'container' => 'false',
'menu' => 'amenities-sub-nav',
'menu_id' => 'leftnav'
));
@conspirator
conspirator / gist:6152245
Last active December 20, 2015 15:09
# iTerm Colors 1. Download Gist 2. Rename to `webb.itermcolors` 3. Double click renamed file to install 4. Under Profiles > Colors, select "webb" preset
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
@conspirator
conspirator / gist:6152235
Created August 4, 2013 22:36
Sublime Text Configuration
{
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme",
"font_face": "SourceCodePro-ExtraLight",
"font_size": 13.0,
"highlight_line": false,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 2,
@conspirator
conspirator / hack.js
Created December 18, 2012 16:15
1. Go to http://www.hatchpet.com/ 2. Open up your console. 3. Paste in the following and hit enter.
$('#licksprite').addClass('lickspriteAnim');
@conspirator
conspirator / index.html
Created November 30, 2012 15:32
A CodePen by Christopher Webb. Sass Color Helper
<table>
<tr>
<td class="a1"></td>
<td class="b1"></td>
<td class="c1"></td>
</tr>
<tr>
<td class="a2"></td>
<td class="b2"></td>
<td class="c2"></td>
@conspirator
conspirator / git-chipper
Created November 28, 2012 04:20
A quick shell script to delete local git branches en masse.
#!/bin/bash
# ## git-chipper
#
# Author: Christopher Webb <hello@conspirator.co>
# Website: http://conspirator.co
# License: http://www.opensource.org/licenses/MIT
#
# Move to master branch. Delete all other local branches.
#
@conspirator
conspirator / grunt.js
Created October 13, 2012 07:48
A sample grunt file.
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/* \n' +
' * \tAuthor:\t\t<%= pkg.name %>\n' +
' * \tWebsite:\t<%= pkg.website %>\n' +
' * \tTwitter:\thttp://twitter.com/<%= pkg.twitter %>\n' +
@conspirator
conspirator / git-ss
Created August 1, 2012 14:15
Selenium Slam: A shell script to quickly push branches with incremental naming
#!/bin/bash
# ## git-ss
#
# Author: Christopher Webb <hello@conspirator.co>
# Website: http://conspirator.co
# License: http://www.opensource.org/licenses/MIT
#
# A shell script to quickly push branches with incremental naming
#
@conspirator
conspirator / gist:3045352
Created July 4, 2012 04:33
Arduino: Jaws
/*
Jaws ( aka Blink, but different)
Start the blinking at interval at 2 seconds. With every successive loop, decrement the intervall by 100ms.
Keep looping until you get to 0, then start over at 2 seconds.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
@conspirator
conspirator / gist:3045276
Created July 4, 2012 04:20
Arduino: Blink v1
/*
Blink
Turns on an LED on for 1/4 a second, then off for 1/4 second, after the third blink, hold for 1 1/4 seconds and repeat.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;