Skip to content

Instantly share code, notes, and snippets.

View aaronjorbin's full-sized avatar

Aaron Jorbin aaronjorbin

View GitHub Profile
set noesckeys
set autoindent
set smartindent
set pastetoggle=<F2>
set tabstop=4
set shiftwidth=4
set expandtab
@aaronjorbin
aaronjorbin / _has_values.js
Created October 29, 2011 01:22
underscore.js mixin for checking if an array has a list of values or an object has a list of keys
_.mixin({
has_values: function( ){
var args = _.values(arguments),
list = args.shift(),
length = args.length;
if (_.isObject(list))
list = _.values(list);
return (_.intersection(list,args).length === length);
@aaronjorbin
aaronjorbin / gist:2325308
Created April 7, 2012 04:57 — forked from nacin/gist:2323060
Nacin's SVN override
# SVN override to prevent commits that try to implicitly commit more than one file.
# Has weaned me off of svn ci -m very effectively. I now almost always use svn ci,
# which usually results in me writing longer and more helpful commit messages.
# Also, it prevents me from committing unrelated code, so there's that.
function svn() {
if [ "$1" == "ci" ] && [ "$2" == "-m" ] && [ -z "$4" ] && [ "$(svn stat --ignore-externals | grep '^[^?X]' | wc -l | awk '{print $1}')" -gt 1 ]; then
svn stat --ignore-externals | grep '^[^?X]'
echo ""
echo $3
@aaronjorbin
aaronjorbin / addthis-bbpress.php
Created May 2, 2012 15:18
AddThis Remove from BBPress Topics
<?php
/*
* +--------------------------------------------------------------------------+
* | Copyright (c) 2012 Add This, LLC |
* +--------------------------------------------------------------------------+
* | This program is free software; you can redistribute it and/or modify |
* | it under the terms of the GNU General Public License as published by |
* | the Free Software Foundation; either version 2 of the License, or |
* | (at your option) any later version. |
* | |
@aaronjorbin
aaronjorbin / fetch-images.js
Created June 15, 2012 17:10 — forked from georgestephanis/fetch-images.js
Possibility for fetching images for Press This?
var metas = document.getElementsByTagName('meta');
img = document.getElementsByTagName('img'),
send = [],
raw = new Image();
for (m in metas){
if ( metas[m].property == 'og:image')
send.push(metas[m].content);
}
@aaronjorbin
aaronjorbin / markerly.com.js
Created August 1, 2012 04:16
a .js file to redierct around markerly
if (window.location.pathname=='/direct.php')
{
window.location.replace( decodeURIComponent( window.location.search.match( /url=(.+?)(&|$)/)[1]));
}
@aaronjorbin
aaronjorbin / wcphilly-twitter.js
Created October 20, 2012 20:35
Get a list of all twitter handles at WordCamp Philly 2012
// Get Twitter accounts on the WC Philly 2012 site
var page = require('webpage').create(),
system = require('system');
// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
page.onConsoleMessage = function(msg) {
console.log(msg);
};
@aaronjorbin
aaronjorbin / expectations.md
Created October 25, 2012 21:32
Expectations for speakers and organizers of WordCamps

Purpose

The purpose of this document is to start a discussion that leads to better expectations between speakers and organizers of WordCamps. It is based on Open Conference Expectations by @rmurphey @divya and @paul_irish. It is based on my experience speaking at many WordCamps and seeing some great things and not great things. I would love your comments and feedback.

What I ask for as a speaker

  1. A complimentary ticket to the event.
  2. A code of conduct for every attendee, including speakers and sponsors. Everyone should be able to have a good time in a safe, harassment-free environment. See the The Ada Initiative for more information on how to create such a policy.
  3. Adequate amount of time to prepare. This means the call for speakers should occur at least sixty days before the camp and invitations at least thirty days before the
@aaronjorbin
aaronjorbin / twitter.php
Created March 4, 2013 02:23
Parse a twitter archive csv to pull out the time stamps
<?php
date_default_timezone_set('America/New_York');
$file = $argv[1];
$all = '';
$tweets = '';
$retweets = '';
if (($handle = fopen($file, "r")) !== FALSE) {
while (($data = fgetcsv($handle, 0, ",")) !== FALSE) {
$str = strtotime($data[5])."\n";
$all .= $str;
o wp-admin/js/about.js
o wp-admin/js/accordion.js
o wp-admin/js/color-picker.js
o wp-admin/js/comment.js
o wp-admin/js/common.js
o wp-admin/js/custom-background.js
o wp-admin/js/custom-header.js
o wp-admin/js/customize-controls.js
o wp-admin/js/dashboard.js
o wp-admin/js/edit-comments.js