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
| mturk.yml |
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
| Date.prototype.setISO8601 = function(dString){ | |
| var regexp = /(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/; | |
| if (dString.toString().match(new RegExp(regexp))) { | |
| var d = dString.match(new RegExp(regexp)); | |
| var offset = 0; | |
| this.setUTCDate(1); | |
| this.setUTCFullYear(parseInt(d[1],10)); |
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
| Date.prototype.niceDate = function(){ | |
| var months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July' , 'August', 'September', 'October', 'November', 'December'); | |
| var days = new Array('Sunday','Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); | |
| /* Monday, July 5th 2009*/ | |
| var text = ''; | |
| text += days[this.getDay()] + ', '; | |
| text += months[this.getMonth()] + ' '; | |
| text += this.getDate().toOrdinal() + ' '; | |
| return text += this.getFullYear(); | |
| }; |
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/ruby -w | |
| # Time Taken | |
| # A ridiculously simple way to track time in git using Google Spreadsheets | |
| # Copyright: 2009 Mark Percival - SquarePush LLC - squarepush.com | |
| # License: MIT | |
| # Installation | |
| # 1. Create Google spreadsheet and update configuration | |
| # 2. Copy this file to .git/hooks/post-commit in your project |
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
| on run argv | |
| tell application "System Events" to tell process "Terminal" to keystroke "t" using command down -- open a new tab | |
| tell application "Terminal" to do script "cd " & item 1 of argv in front window -- change directory | |
| end run | |
| -- in your profile | |
| -- alias newtab='osascript ~/.applescripts/newtab.applescript `pwd`' |
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/local/bin/ruby | |
| # | |
| # save-history.rb - | |
| # $Release Version: 0.9.5$ | |
| # $Revision: 11708 $ | |
| # $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $ | |
| # by Keiju ISHITSUKAkeiju@ruby-lang.org) | |
| # | |
| # -- | |
| # |
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 HypeM Play-Pause | |
| // @namespace http://fluidapp.com | |
| // @description Adds Play/Pause button to the dock menu | |
| // @include * | |
| // @author Mark Percival | |
| // ==/UserScript== | |
| (function () { | |
| if (window.fluid) { |
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
| // Gibberish wants all inputs on it's internal methods to be byte arrays. | |
| // This simplifies things like UTF-8 support and it's just an easy way to dealing with binary data and calculations. | |
| // But it's got utilities to help! | |
| // a2h - Byte array to hex string | |
| // s2a - String to byte array | |
| // Most of this is hidden from you when you just use it for encryption. | |
| GibberishAES.a2h(GibberishAES.Hash.MD5(GibberishAES.s2a("Hello, World!"))); |
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
| ruby -e'include Math;(-10..10).each{|y|s="";\ | |
| (-14..14).each{|x| s << (x**2+y**2<11**2 \ | |
| && atan2(y,x)<PI*0.8&&atan2(y,x)>-PI*0.8 \ | |
| && x**2+(y+6)**2>1 ? "@":" ")*2};puts s}' |
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
| git status -s | grep '^.*[M|A]' | awk '{print $2}' | xargs -n1 sed -i '' 's/[[:space:]]*$//' |