Skip to content

Instantly share code, notes, and snippets.

View gleuch's full-sized avatar
🏃‍♂️
Marathon

Greg Leuch gleuch

🏃‍♂️
Marathon
View GitHub Profile
// adapted from jquery.com
// Hehe.
if ( window.addEventListener ) {
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
window.addEventListener("keydown", function(e){
kkeys.push( e.keyCode );
if ( kkeys.toString().indexOf( konami ) >= 0 ) {
// Just replace www.google.com w/ whatever
window.location = "http://www.google.com";
@gleuch
gleuch / gist:113319
Created May 18, 2009 04:39
script/console code snippet to expire cache fragments
# How-to expire memcache cache fragment files from script/console
Item.find(:all).each{|m| ActionController::Base.new.expire_fragment("item/#{m.id}")}
// ==UserScript==
// @name Ctrl+F'd
// @namespace by halvfet <http://www.halvfet.com>
// @description Rush Limbaugh believes a censored internet can't be Ctrl+F'd (or Cmd+F for Mac users).
// @include *
// ==/UserScript==
/*
Ctrl+F'd
A GreaseMonkey script to censor text on a web page, in the Rush Limbaugh style.
<?php */
Authorized Feeds to Google Reader
by Greg Leuch <http://www.halvfet.com>
More information at http://halvfet.com/io/adding-authorized-feeds-to-google-reader
*/
$feeds = array(
'twitter'=> 'http://username:password@twitter.com/statuses/friends_timeline.rss',
);
### Keybase proof
I hereby claim:
* I am gleuch on github.
* I am gleuch (https://keybase.io/gleuch) on keybase.
* I have a public key whose fingerprint is C231 632E 7612 7D11 BA65 ECF1 8D35 F204 DE17 7AEC
To claim this, I am signing this object: