Skip to content

Instantly share code, notes, and snippets.

#topnav_big_news_module, #not_logged_user, #sidebar_right, #read-edge, .connect_widget, #badges_v2_1, .collection_wrapper_h, .tags_holder, #follow_tags, .promo_holder, .badgets_bottom, #submissions_shortcuts, .sbm-main-new, .get_huffpo, .ad_wrapper, .link_entries, #around_the_web, #related_images, .comments_block_holder, #adsDiv0
{
display:none !important;
}
(function() {
var get=(function(){var map={};window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(m,k,v){map[k]=v;});return map;}());
if(get.source){
jQuery.getScript("http://ausnursing.bluestatedigital.com/page/spud?jsonp=callback&type=set&field=source&value="+get.source);
}
if(get.subsource){
jQuery.getScript("http://ausnursing.bluestatedigital.com/page/spud?jsonp=callback&type=set&field=subsource&value="+get.subsource);
}
})();
@yahelc
yahelc / gist:2648038
Created May 9, 2012 19:03
redirect url js
var get = (function() {
var map = {};
location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, k, v) {
map[k] = v;
});
return map;
} ());
$("input[name='redirect_url']").val(get.redirect_url);
@yahelc
yahelc / On Splash Page.js
Created March 24, 2012 01:47
JS Redirects without killing analytics and sourcing
//Before Google Analytics
window._gaq = window._gaq || [];
var get = (function() {
var map = {};
window.location.hash.replace(/[#&]+([^=&]+)=([^&]*)/gi, function(m, k, v) {
map[k] = v;
});
return map;
} ());
@yahelc
yahelc / gist:1812409
Created February 13, 2012 01:10
Most Frequently Used Words in My Tweets.
5821 the
4360 to
3944 a
3328 http
2747 of
2627 i
2621 is
2240 in
2009 for
1844 it
@yahelc
yahelc / gist:1726582
Created February 2, 2012 23:54
$.fn.analytics plugin
$("#foo").analytics(function(){});
//that's just a simplified and less-error prone way of doing
$("#foo").one("mousedown keydown", function(){});
//(with special fixes for <form> submits and non-Enter mousedowns)
//If you specify a callback function, `this` is bound to
//the DOM element, like in any jQuery function
$("#foo").analytics(function(){ console.log( this.id, $(this).attr("href") ); });
-- phpMyAdmin SQL Dump
-- version 3.3.8.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 28, 2012 at 04:56 PM
-- Server version: 5.0.91
-- PHP Version: 5.3.6-pl0-gentoo
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
// ==UserScript==
// @name Show Full Domain on Hacker News posts
// @description Sets full domain on hacker news posts.
// @namespace http://userscripts.org/users/119115
// @include http://news.ycombinator.com/*
// @include https://news.ycombinator.com/*
// @match https://news.ycombinator.com/*
// @match http://news.ycombinator.com/*
// ==/UserScript==
@yahelc
yahelc / caveatPatchor.js
Created December 15, 2011 16:45
Sample caveatPatchor.js file for use in Propane 1.1.2 and above: Plus YouTube and MP3 Support
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@yahelc
yahelc / gist:1479100
Created December 14, 2011 23:30
gist embed testing
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.