engadget autorefresh macworld hack 15/01/08
happy keynote day. we love the engadget content, hate having to refresh the page all the time. so, simple hack to get around that - embed with an autorefresh.
save out this code, put it in a text file and load it in a webbrowser. simple. enjoy.
<html>
<head>
<meta http-equiv="refresh" content="60">
<title>engadget apple keynote coverage 2008</title>
</meta></head>
<body>
<frameset>
<frame src="http://www.engadget.com/2008/01/15/live-from-macworld-2008-steve-jobs-keynote/">
</frame></frameset>
</body>
</html>
leopard and mail bundles quickie 29/10/07
just a quickie for all those in leopard land (grrrrrrrroooowwwwwlllll) - you will have discovered that all your nice plugins for mail.app (gpg, mail act on etc) dunna work captain. however, this little terminal hack will enable them. (make sure to quit mail first)
defaults write com.apple.mail EnableBundles 1
defaults write com.apple.mail BundleCompatibilityVersion 3
that was all
window size follow up 23/10/07
so inspired was i by hacking window positions, i thought some more moving things around was in order. two more examples for you to all play with.
first, this little chap will move the top focused window to the top left hand corner of your screen. gosh, isn’t that fun
--first get name of top most app
tell application "System Events" to set appList to name of application
processes whose frontmost is true
set frontApp to item 1 of appList
--get size of the window we're going to move
tell application "System Events" to tell process frontApp
to set {winWidth, winHeight} to size of front window
--move the window
tell application frontApp to set bounds of
window 1 to {0, 0, winWidth, winHeight}
and this one will move the top window to the centre of the screen
tell application "System Events" to set appList
to name of application processes whose frontmost is true
set frontApp to item 1 of appList
--calculate the dimensions of the desktop
tell application "Finder"
set dimensions to bounds of window of desktop
set screenWidth to item 3 of dimensions
set screenHeight to item 4 of dimensions
end tell
--calculate the centre
tell application frontApp
set fSize to bounds of window 1
set wLeft to item 1 of fSize
set wTop to item 2 of fSize
set wRight to item 3 of fSize
set wBottom to item 4 of fSize
set windowWidth to wRight - wLeft
set windowHeight to wBottom - wTop
set windowTop to (screenHeight - windowHeight) / 2.0
set bounds of window 1 to
{(screenWidth - windowWidth) / 2.0, windowTop,
(screenWidth + windowWidth) / 2.0, windowTop + windowHeight}
end tell
move your windows with abandon!
preview and other resizing hacks 11/10/07
in order to make preview.app do cool applescript type stuff, it must be enabled for some odd reason. here is the code:
defaults write
/Applications/Preview.app/Contents/Info NSAppleScriptEnabled -bool YES
now isn’t that strange?
but what you’re really asking is why do i care? well, with some applescript and quicksilver magic you can resize the front application to a preset size. i.e. when the preview window opens up too small, with one press of a keyboard trigger you can make it bigger, dude.
so, you’ll need this bit of apple script (or something similar):
tell application "System Events" to set appList to name
of application processes whose frontmost is true
set frontApp to item 1 of appList
tell application frontApp
set bounds of window 1 to {0, 0, 1200, 1200}
end tell
(change the window bounds to whatever you like) save that script, then assign it to a quicksilver trigger. now, whenever you need a quick bit of resize magic, just hit your trigger key and the front most window will do the resizing thing. neat, eh?
we love tags 4/10/07
so yes, wordpress 2.3 has come and has added the joys of tagging. so that motivated me to switch categories to tags and from that, i just had to design a new theme. so yeah - new theme. w00t :)