Posted on Sunday, July 15, 2007:
Archive Yojimbo Bookmarks
Yojimbo can catalog bookmarks as well as web archives, which are basically local copies of web sites. This script creates web archives from existing bookmarks you select.
tell application "Yojimbo"
-- get the selected items, if any
set _items to selection
if _items is missing value then return
-- archive all the selected bookmark items
repeat with _item in _items
if class of _item is bookmark item then
-- bookmark properties the archive should inherit
set _name to name of _item
set _url to location of _item
set _tags to tags of _item
-- archive the bookmarked page
try
set _archive to make new web archive item with contents _url with properties {name:_name}
add tags _tags to _archive
end try
end if
end repeat
end tell
Download ArchiveYojimboBookmarks.scpt.zip 1.1 3k
Install the script in ~/Library/Scripts/Applications/Yojimbo. The script does not check whether there is already a web archive for the bookmarked location, but it could be done.
2:40 PM Comment (0)
Posted on Tuesday, July 10, 2007:
LDLink
Note: LDLink has been superseded by LDMerge.
LDLink is a utility that can reversibly combine separate LDraw part libraries by creating symbolic links to the contents of one directory structure in another. Alternate libraries can be used to manage unofficial LDraw parts; support for this concept is present to varying degrees in some LDraw programs. This utility is intended to facilitate other tools, such as L3P, which do not readily support parallel part libraries.
Download ldlink 1.0 (5k Tcl script)
Install the script as ldlink and make it executable with chmod +x ldlink.
Usage: ldlink merge|unmerge [-src LDRAWDIR] [-dst LDRAWDIR]
On merge, links to src files are created in dst.
On unmerge, links named after src files are removed from dst.
Conflicts with normal files in dst are skipped and reported.
Default dst is LDRAWDIR environment variable.
Default src is dst/Unofficial.
To merge unofficial parts downloaded by LDView with the rest of your part library, the following command may be sufficient:
ldlink merge
If the environment variable LDRAWDIR is not defined — or if you would like to override its value — use the dst option to specify the destination where the merge should occur. Likewise, the src option may be used to merge parts from a source other than the destination’s Unofficial subdirectory:
ldlink merge -src /Custom/LDraw -dst /Standard/LDraw
To reverse a merge, reissue the command using unmerge instead of merge:
ldlink unmerge ldlink unmerge -src /Custom/LDraw -dst /Standard/LDraw
LDLink reports how many links it created or removed.
4:58 PM Comment (4)
Posted on Friday, July 6, 2007:
Vector Image Stylization
I’ve stylized a few drawings with a vectorization program called autotrace. Here is a brief summary of the process:
The vectorization command looks like this:
autotrace -corner-threshold 20 -filter-iterations 15 threshold.pbm > vectorized.eps
11:32 PM Comment (0)
Posted on Wednesday, July 4, 2007:
Scaled LCD Resolution
My laptop's display has a native resolution of 1280 × 800 pixels.

When I select a different display resolution, it is stretched to fit the screen. This may distort the aspect ratio. It also looks like crap.

Scaled modes are available. These preserve proportion, but they still look like crap.

Why not use an exact subsection of the screen? I don't think my display can do this, but it seems like the most logical solution. Who wants the crappy scaling?

Are there any LCD monitors that work like this?
9:23 PM Comment (0)
PSA: Mac OS X Keyboard Navigation
Open the Keyboard & Mouse pane of System Preferences and click the Keyboard Shortcuts tab. Select the "All controls" keyboard access option.

Now you can use the tab key to select every last popup menu, button, and checkbox. The selected interface element is indicated by a halo, like the one surrounding the "Where" menu in the following screenshot.

Invoke the active element by pressing the space bar or, in some cases, the arrows. (In this case, pressing space will display the menu. As with all menus, you can use the arrow keys to select items - or just begin typing to select matching item names.) The return and escape keys retain their usual function.
12:31 PM Comment (0)
Posted on Sunday, July 1, 2007:
YouTube Comment Blocker
I like YouTube, but I abhor asinine YouTube comments. This wee bit of CSS neatly excises the comments section from each YouTube page I visit:
div#commentsDiv {
display: none;
}
To use this with Safari, save the code in a text file and select it with Safari→Preferences→Advanced→Style Sheet→Other. It may work with other browsers, too.
Of course, this will hide any div identified as commentsDiv that your browser happens to encounter, not just those found at YouTube. I don’t know if it is possible to restrict user CSS rules to a specific domain.
Update: Firefox and Camino users can use this version to ensure that only YouTube pages are affected:
@-moz-document domain(youtube.com) {
div#commentsDiv {
display: none;
}
}
Save as userContent.css in ~/Library/Application Support/Camino/chrome/, or the corresponding profile subdirectory for Firefox.
6:44 PM Comment (0)