This file contains hidden or 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 'mathn' | |
| def sign(x) | |
| return 1 if x > 0 | |
| return -1 if x < 0 | |
| return 0 | |
| end | |
This file contains hidden or 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
| A11 = 2 | |
| A12 = -1 | |
| A13 = 0 | |
| A21 = 1 | |
| A22 = 2 | |
| A23 = -1 | |
| A31 = 2 | |
| A32 = -1 | |
| A33 = 2 |
This file contains hidden or 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
| (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))) |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| // ==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== |
This file contains hidden or 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
| // ==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() { |
This file contains hidden or 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
| 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) |
This file contains hidden or 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
| 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; |
This file contains hidden or 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
| </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> |
This file contains hidden or 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 | |
| foo = "foo" | |
| case foo | |
| when "foo" then puts "foo" | |
| when "bar" then puts "bar" | |
| else then puts "wtf?" | |
| end |