Skip to content

Instantly share code, notes, and snippets.

View dtipson's full-sized avatar

Drew dtipson

View GitHub Profile
dtipson / batching a CORS request as a backup
Created February 10, 2012 16:46
bit of code (part of a larger object not shown) that handles batching of a huge CORS POST into several JSONP requests. The rwJSONP function returns a promise
batchIt: function(q){
var b = $.Deferred(),
batches = [],
if (nids.length===per) {
dtipson /
Created June 19, 2012 19:42
Bill Wulf's Resignation Letter

Comp. Sci. Prof. William Wulf’s resignation letter

BY on June 19, 2012

Below is a resignation letter submitted [to the Cavalier Daily] this morning by Computer Science Prof. William Wulf:

Dean and Interim President Zeithaml,

By this email I am submitting my resignation, effective immediately. I do not wish to be associated with an institution being as badly run as the current UVa. A BOV that so poorly understands UVa, and academic culture more generally, is going to make a lot more dumb decisions, so the University is headed for disaster, and I don’t want to be any part of that. And, frankly, I think you should be ashamed to be party to this debacle!

(function($, M) {
var $html = $('html'),
mprops = {},
ieon = false,
ies = {
54: 'oldie lt-ie10 lt-ie9 lt-ie8 lt-ie7', //ie6
55: 'ie7 oldie lt-ie10 lt-ie9 lt-ie8', //ie7
56: 'ie8 oldie lt-ie10 lt-ie9', //ie8
javascript:(function(){ yepnope({test: typeof jQuery=='undefined' && typeof bQuery=='undefined',yep: '//',both: ''
}); }());
dtipson / dabblet.css
Created March 4, 2013 22:10 — forked from LeaVerou/dabblet.css
Failed attempt at gracefully degrading switch-style checkboxes
* Failed attempt at gracefully degrading switch-style checkboxes
* without pseudoelements (which shouldn’t exist on replaced elements) and extra elements.
* Inspired by Espresso’s “Tools” switch
* DO NOT USE. Currently only works properly in WebKit :(
input[type="checkbox"]:checked+label { /* :checked here acting as a filter for older browsers */
appearance: none;
dtipson / dabblet.css
Created March 15, 2013 21:53 — forked from LeaVerou/dabblet.css
Switch-style checkboxes.
* Switch-style checkboxes.
* Inspired by Espresso’s “Tools” switch
input[type="checkbox"]:checked { /* :checked here acting as a filter for older browsers */
position: absolute;
opacity: 0;
function jandocme(){
var i = 0, windowWidth = $(window).width();
var $el = $(this),
w = $el.width(),
h = $el.height(),
src = $el.attr('src');
if(w>16 && h>16 && (src.indexOf('1px')===-1) && h<1000) { $el.attr('src',''+w+'-'+h+'?'+(i++)); }
dtipson / jandocer.js
Last active December 15, 2015 14:19
javascript: (function () {var jsCode = document.createElement('script');jsCode.setAttribute('src', '');document.body.appendChild(jsCode);}());
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$plugin_info = array(
'pi_name' => 'URL Encode',
'pi_version' => '1.1',
'pi_author' => 'Airtype Studio / BSD',
'pi_author_url' => '',
'pi_description' => 'Runs urlencode on a string of text.',
dtipson / dabblet.css
Created June 7, 2013 14:56
SVG Share Buttons using text-align: justify
* SVG Share Buttons using text-align: justify
.three-share-btns {
margin:100px auto; /*just so it shows up*/
width: 118px; /*defines pretty much everything*/
height: 22px; /*works best in this case when this is predefined*/