Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
var Person = function(x){
this.firstName = x && x.firstName ? x.firstName : "Barack";
this.lastName = x && x.lastName ? x.lastName : "Obama";
@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.
#
"productVariationsPart": {
"productVariations":{
"MHAK2AM/A": {
"productTitle": "Studio Wireless Over-Ear Headphones - Titanium",
"dimensionColor": "titanium"
},
"MH8K2AM/A": {
"productTitle": "Studio Wireless Over-Ear Headphones - Red",
"dimensionColor": "red"
},
@conspirator
conspirator / gif.sh
Last active December 31, 2015 19:49
#!/bin/sh
#
# Grab a random gif from giphy.com
#
# Example:
# $ gif // places a gif url on your clipboard
# $ gif -o // opens a gif url in your default browser
# $ gif chicago+bulls // places a Bulls-related gif url on your clipboard
# $ gif chicago+bulls -o // opens a Bulls-related gif url in your default browser
#
tweetbot:///search?query=[[draft]]%20lang%3Aen%20-filter%3Aretweet%20-%22RT%20%22
@conspirator
conspirator / a.js
Last active December 22, 2015 23:29
!function(b) {
var a = function(d, c, f) {
if (f) {
f.stopPropagation();
f.preventDefault()
}
this.$element = b(d);
this.$newElement = null;
this.button = null;
this.options = b.extend({}, b.fn.selectpicker.defaults, this.$element.data(), typeof c == "object" && c);
<?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');