This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'find' | |
require 'rubygems' | |
require 'rake' | |
desc "Remove minified CSS and JS files from this directory and its children." | |
task :killmin do | |
Find.find(File.dirname(__FILE__)) do |path| | |
if FileTest.directory?(path) | |
if File.basename(path)[0] == ?. | |
Find.prune # Don't look any further into this directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Parse an HTTP query string into a JS object. | |
*/ | |
var parseQueryString = function(query) { | |
var uri = query || document.location.href, | |
params = {}, | |
args, i, pair, key, value; | |
if (!uri) return params; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Change Credits | |
Plugin URI: http://tarskitheme.com/ | |
Description: Change the Tarski footer credits. | |
Author: Benedict Eastaugh | |
Version: 1.1 | |
Author URI: http://extralogical.net/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* An implementation of the K Combinator. | |
* http://wiki.tcl.tk/1923 | |
* | |
* Copied from Mikael Brockman's code in Ruby on Rails' ActiveSupport library. | |
* http://weblog.jamisbuck.org/2006/10/27/mining-activesupport-object-returning | |
*/ | |
function returning(value, block, context) { | |
block.call(context || null, value); | |
return value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Custom 404 Content | |
Plugin URI: http://tarskitheme.com/ | |
Description: Change Tarski's error 404 page content. | |
Author: Benedict Eastaugh | |
Version: 1.0 | |
Author URI: http://extralogical.net/ | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var e="http://imgs.xkcd.com/comics/",t=document.getElementsByTagName("img"),n=t.length;while(n--){if(t[n].src.substring(0,e.length)===e){alert(t[n].title);return;}}})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
# Screen scraper for xkcd. The basic idea is to find out whether the comic | |
# always has the longest title of any image on the page. Inspired by this | |
# Hacker News posting: http://news.ycombinator.com/item?id=316621 | |
comic_url = 'http://imgs.xkcd.com/comics/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Change Comment Text | |
Plugin URI: http://tarskitheme.com/ | |
Description: Change comment text to something else. | |
Author: Benedict Eastaugh | |
Version: 1.0 | |
Author URI: http://extralogical.net/ | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Posted At | |
Plugin URI: http://tarskitheme.com/ | |
Description: Add timestamps to post dates. | |
Author: Benedict Eastaugh | |
Version: 1.0 | |
Author URI: http://extralogical.net/ | |
*/ | |
OlderNewer