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
# This allows you to be a good OOP citizen and honor encapsulation, but | |
# still make calls to private methods (for testing) by doing | |
# | |
# obj.bypass.private_thingie(arg1, arg2) | |
# | |
# Which is easier on the eye than | |
# | |
# obj.send(:private_thingie, arg1, arg2) | |
# | |
class Object |
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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA8iMjLZGkoBG5VHHJG1jzA2vdh1QnPSr8aYIw6fsgdDsS4iYNq++iDg5nEsIwdjAfnyY3lGUWafpn3nDyn+bnDp+SZwSIAfZuqpnM06Lk37283GayW/98nLahIxnnm7P30rlqNmhxgwPygawA0Ayl5s2/Pi+fkFrkn52CS/MsZZsRVks6+MBL4Ssmvs0GBEQBGILu1rp8CCIfh5Dk6690wp8s4vq07oS0xg3vFwbgzcwuyMVEnz/BYG5oFKMDzdQTB30jrd39kGs2xyWz9hlfpXW4NFbfMMlIzLsgWgJePzcNElUF6ZVmGy/+wqC/Znj/bYh1FUralW6h9jpA7SMwAw== [email protected] | |
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
Patch to make vanilla a2x run on OS X | |
--- /usr/local/bin/a2x 2008-02-11 00:49:23.000000000 +0100 | |
+++ a2x 2007-10-29 04:50:53.000000000 +0100 | |
@@ -7,24 +7,13 @@ | |
# under the terms of the GNU General Public License (GPL). | |
# | |
-# MK: `readlink -f' isn't available on OS X. | |
-function realpath() | |
-{ |
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 python | |
# A tiny appscript example in Python. | |
import appscript | |
appscript.app("iTunes").current_track.artist.get() |
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
(with-open-file (!!!-stream (merge-pathnames ".sbcl_completions" (user-homedir-pathname)) | |
:direction :output | |
:if-exists :supersede) | |
(let ((!!!-seen (make-hash-table :size 6000 :test #'equal)) | |
(!!!-cl-package (find-package "CL")) | |
(!!!-cl-user-package (find-package "CL-USER"))) | |
(loop for !!!-package in (list-all-packages) | |
do (let ((!!!-prefixes | |
(if (or (eq !!!-package !!!-cl-package) | |
(eq !!!-package !!!-cl-user-package)) |
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 | |
# evanphx's old version of the gx git macro facility, slightly modified. | |
# I guess this is completely superseded by git aliases by now, but I like | |
# having it around somewhere... | |
class GitProxy | |
def initialize(prog="git") | |
@prog = prog | |
@record = false | |
@recording = [] |
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
#!/bin/zsh | |
# | |
# zlogout | |
# zsh-specific logout script | |
# Clear tty | |
if whence tty >/dev/null; then | |
case "$(tty)" in | |
/dev/tty[0-9]*) clear ;; | |
esac |
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
on open (theItems) | |
set theCleanedItems to {} | |
repeat with theApp in theItems | |
set thePath to the POSIX path of theApp | |
fixOwner(thePath) | |
fixPermissions(thePath) | |
unquarantine(thePath) | |
set theCleanedItems to theCleanedItems & ("- " & the displayed name of item (theApp as string) of application "Finder") | |
end repeat | |
set theText to "Successfully cleaned: |
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
tell application "System Events" | |
if exists application process "Terminal" then | |
set terminalProcess to application process "Terminal" | |
if frontmost of terminalProcess then | |
tell terminalProcess to set visible to false | |
else | |
tell terminalProcess to set frontmost to true | |
end if | |
else | |
tell application "Terminal" |
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
on archive(theURL, theTitle) | |
tell application "Yojimbo" | |
set theItem to make new web archive item¬ | |
with contents theURL | |
end tell | |
end archive | |
on bookmark(theURL, theTitle) | |
tell application "Yojimbo" | |
set theItem to make new bookmark item¬ |
OlderNewer