Skip to content

Instantly share code, notes, and snippets.

View aaronjorbin's full-sized avatar

Aaron Jorbin aaronjorbin

View GitHub Profile
@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 / 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 / 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 / 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 / _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);
set noesckeys
set autoindent
set smartindent
set pastetoggle=<F2>
set tabstop=4
set shiftwidth=4
set expandtab