Archive: Mac
May 8, 2008
DIY multi-touch on OS X

Bridger Maxwell has been blogging his progress on creating a homebrew multi-touch platform in OS X. Prior to this, there's been a lot of activity around building multi-touch systems on Windows using the Touchlib library, but this is the first time I've seen a concerted effort on OS X.
The basic hardware is the same for both environments: LEDs surround a sheet of acrylic, causing a backscatter of IR when fingers are pressed to the screen. On the software side, though, the multi-touch interface is provided through Pawel Solyga's OpenTouch library. From the sounds of things, though, it's not super simple getting the interface messages from OpenTouch to your multi-touch enabled Cocoa apps:
Both OpenTouch and TouchLib send the touch data to other applications by sending Tangible User Interface Object (TUIO) network messages. TUIO is a protocol that is designed for transmitting the state of multi-touch systems. TUIO is built upon another protocol, Open Sound Control (OSC). While libraries for receiving TUIO messages are available in a few languages such as C++ or Java, there was not a solution for Cocoa applications. My first step was to build a library for receiving TUIO messages in Cocoa.Because TUIO is built upon OSC, I looked for a library that could parse OSC messages. Unfortunately, I could not find one that would fill all my needs. WSOSC was a library that came close though. There were a few issues to work around (use NSData instead of NSString), but eventually I was able to use WSOSC to parse the OSC packets. When finished, my framework had the ability to parse TUIO messages and had a method to delegate the TUIOCursor objects it created to another application.
From the blog comments, it sounds like Bridger is planning on releasing this middle layer when it gets a little further along. At the moment, though, he's released a demo comic viewing application that uses his multi-touch project framework. If you're interested in developing multi-touch apps for OS X, some of the discussions on Bridger's blog would be a good place to start.
Bridger's Multi-Touch Blog
OpenTouch Library
See also:
Make your own multitouch displays and software apps
Posted by Jason Striegel |
May 8, 2008 08:43 PM
Mac, Software Engineering |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
April 23, 2008
Scriptographer - Javascript for Illustrator

My friend Barrett sent along a link today to an Illustrator scripting plugin called Scriptographer. I'm sort of a slouch at Illustrator, so I had him give me the quick 411 and I must say, this is pretty cool.
If you're familiar with Javascript, Scriptographer will enable you to crank out little scripts that can generate illustrations procedurally. As an example, the bubbelbubbling script, show above, tuns your pen tool into a fountain of random bubbles that follow your drawing path. There are certain styles of artwork that could really lend themselves to a procedural drawing tool: fractals, patterns, random "particle" effects. These things would take forever to generate manually, but by defining the effect programatically, you can quickly experiment with your work in a more dynamic fashion, tweaking variables and fine-tuning your work as you go.
The project website also has a growing library of user-contributed scripts that are worth checking out. It's a good place to start for your own creations, or you may just find exactly what you're looking for, already crafted for you by another designer-coder.
Posted by Jason Striegel |
Apr 23, 2008 09:11 PM
Design, Life, Mac, Software Engineering |
Permalink
| Comments (1)
| TrackBack
| Digg It
| Tag w/del.icio.us
April 19, 2008
Manipulating Mac keyboard LEDs through software
Amit Singh, the Google Mac Team hacker who taught us all how to use the Mac motion sensor as a human interface device and manipulate the keyboard backlight on the MacBook Pro, wrote a short program that demonstrates how to control the LEDs on your keyboard through a user space program:
If you have an irrepressible urge to turn these LEDs on or off through software, here is a program that shows you how. (Note that the program only manipulates the LEDs -- it will not actually cause caps lock or num lock to be engaged.) The program also serves as an example of how to do user-space Human Interface Device (HID) programming through the I/O Kit.
I'm not sure what you could use this for, but that's for you to sort out, right?
Manipulating keyboard LEDs through software
Reading and manipulating the keyboard backlight on the MacBook Pro
Hacking the sudden motion sensor
Posted by Jason Striegel |
Apr 19, 2008 09:46 PM
Mac |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
March 28, 2008
CSS ad blocking for Firefox and Safari
Using Firefox's CSS-based chrome feature or Safari's advanced stylesheet preferences and a little clever CSS coding, you can disable most banner ads, making them invisible in your browser. This technique is considerably easier and more flexible than setting up a private DNS server or proxy to filter out images from ad-serving domains.
The trick is setting up a number of CSS rules that use "*=" substring selection on an element's properties. For instance, matching an IFRAME tag with the SRC parameter containing doubleclick would look like IFRAME[SRC*="doubleclick"] and matching an anchor tag with an HREF containing a url with "ads." in it would look like A:link[HREF*="ads."]. Giving the style "display: none ! important" to all of the possible combinations and adding the stylesheet to your browser's chrome effectively turns off the ad-serving web. The site below has a comprehensive CSS file that's been tailored to assassinate ads from most networks.
To be honest, I didn't realize that you could do this type of parameter matching and subselection in CSS, so it's worth looking at the CSS source for that alone. If you don't use it for this purpose, perhaps the technique will come in handy for something else you are working on.
Better Ad Blocking for Firefox, Mozilla, Camino, and Safari
Ad Blocking userContent.css
Posted by Jason Striegel |
Mar 28, 2008 09:20 PM
Firefox, Life, Lifehacker, Mac, Web |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
March 25, 2008
iNoteBook: repurpose an old laptop

It seems like I end up updating my laptop every couple of years, but as cool as new hardware is, sometimes the challenge of finding a new use for the old machine is more interesting. The iNoteBook mod is a classic example, transforming a broken, screenless iBook into a stealth desktop machine.
What's your favorite laptop reuse project? If you've got one, please share in in the comments.
Posted by Jason Striegel |
Mar 25, 2008 07:56 PM
Hardware, Home, Mac, Retro Computing |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
March 24, 2008
Safari single window mode
Dennis Stevense posted a great little Terminal hack which enables single window browsing for the latest version of Safari. If you're running 3.1 you can type in the following command to make all "target='_blank'" links open in a new tab instead of in a new window:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
This is one of my favorite Firefox features, so I'm pretty happy to see it available in Safari, even if it's under a hidden setting.
How to enable single window mode in Safari
Posted by Jason Striegel |
Mar 24, 2008 09:30 PM
Mac |
Permalink
| Comments (1)
| TrackBack
| Digg It
| Tag w/del.icio.us
March 11, 2008
N64 emulation: better than the real thing

Racketboy has a great article showing off some of the capabilities of the modern N64 emulator. If your machine is fast enough, most of the available emulators will really give you a noticeable resolution boost and better looking anti-aliased models. Using the Rice Video plugin with the Project64 emulator, you can even swap out the textures for some games with user-created texture packs.
I still use the real hardware (is the N64 considered "retro" now?), so before seeing this, I hadn't even considered emulation for this platform. That all changed when I saw the Mario64 mod shown above. The selection of available emulators is impressive, and there are open source emulators available for just about every platform. I'm currently playing a game under Mupen64 on my iMac and it's pretty flawless. My only wish is that all computers came, by default, with a nice joystick like they did back in the 80s.
Enhance N64 Graphics With Emulation Plugins & Texture Packs - Link
Project64 Emulator - Link
Rice Video Plugin - Link
Mupen64 Emulator (cross-platform, open source) - Link
Posted by Jason Striegel |
Mar 11, 2008 10:35 PM
Gaming, Linux, Mac, Retro Gaming, Virtualization, Windows |
Permalink
| Comments (3)
| TrackBack
| Digg It
| Tag w/del.icio.us
March 9, 2008
Command line Twitter
You can easily update your Twitter status from the command line using cURL. The Tech-Recipes blog posted this handy command line hack:
With cURL installed, you can post to Twitter from the terminal window by using the following syntax:
curl -u yourusername:yourpassword -d status="Your Message Here" http://twitter.com/statuses/update.xmlYou will receive a response containing the XML coding for your post which acts as a confirmation that your post was submitted.
Consider this: instant messaging is the new talk (phone for my VMS peeps) and Twitter is the new finger. It's nice to see at least one of these handy communication tools make its way back to the command line.
Posting to Twitter from the Terminal Window - Link
cURL downloads - Link
Posted by Jason Striegel |
Mar 9, 2008 09:39 PM
Linux, Mac, Ubuntu, Windows |
Permalink
| Comments (3)
| TrackBack
| Digg It
| Tag w/del.icio.us
February 23, 2008
Remote file access through email
Shantanu Goel put a proof-of-concept Outlook macro together that will send you files in response to a specially formatted email. The idea is that you can activate this and leave Outlook running on your computer at work and if you are offsite and need to grab a document it's only an email away.
This project came into being after reading this post at lifehacker (original post and solution here). It listed a method to retrieve mails on your home/office PC by sending a "magic email" to it, but it was only for mac's. Seeing that people wanted it for windows as well, I thought of making something up during lunch time at office.
If you think about it, this is kind of a clever way to get around a corporate firewall. It'd be funny to add some directory listing functionality to it and formalize an email file transfer protocol.
Remote File Access Through E-Mail -Link
Posted by Jason Striegel |
Feb 23, 2008 08:07 PM
Life, Mac, Network Security, Windows |
Permalink
| Comments (2)
| TrackBack
| Digg It
| Tag w/del.icio.us
February 6, 2008
TrueCrypt for OS X

TrueCrypt 5.0 was released yesterday and OS X has been added to the list of supported operating systems, making it the only open source volume encryption utility that works in Linux, Mac and Windows. It's a really slick utility for creating an AES-256 or Serpent encrypted volume that you can drop sensitive files inside.
You can use TrueCrypt to create an encrypted volume image inside a file, or you can encrypt a whole disk image or partition. The OS X version uses MacFUSE to provide user-mode mounting of the encrypted disk. The main application window, pictured above, gives you a simple interface for creating and mounting encrypted images.
Once an image is mounted, you can use it like a normal hard disk. Unmount the disk and you're left with a file full of random gibberish. FAT is the only filesystem that's available through the interface, but once the disk is mounted, you can reformat it with Disk Utility to use XFS.
There are a couple of things worth noting. In the Windows and Linux versions a special bootloader is available that lets you encrypt your entire system drive. It doesn't look like that option is available in the OS X version. Also, when I tested the latest OS X binary this evening, the "hidden volume" plausible deniability feature wasn't working. Hopefully that will be added in a future release. Until then, TrueCrypt is better suited for storing tax documents and things you wouldn't want visible to a laptop thief, rather than the details of where you've hidden the bodies.
Posted by Jason Striegel |
Feb 6, 2008 08:34 PM
Cryptography, Data, Mac |
Permalink
| Comments (1)
| TrackBack
| Digg It
| Tag w/del.icio.us
February 2, 2008
Sidebar separator hack for OS X

Becky Stern forwarded us Jonathan Berger's simple and useful hack that adds dividers to the Finder sidebar.
I use the Finder's Sidebar pretty heavily, but it was getting to be a mess that could really use some dividers. Solution? Make an empty folder called " ..................." and stick it in there.
You'll need a leading space with periods. Dashes also work and patterns like " - - - - - -" are satisfying too. Periods work particularly well, because you can make the filename long and when it's abbreviated in a skinny sidebar it'll still look correct with "..." added at the end.
To add more than one separator, you need a unique folder for each one. To do this, you can either make folders with different numbers of periods, or, for a consistent length, just place all the folder copies inside each other like Russian dolls.
The final trick is to give the separator folders a blank icon to disguise the fact that they are just folders sitting in your sidebar. I was too lazy to do this part and I'm still happy with the effect, though it doesn't look quite as hot as Jonathan's screen grab above.
Hacking Separators Into the Leopard Finder Sidebar - Link
Posted by Jason Striegel |
Feb 2, 2008 10:49 PM
Mac |
Permalink
| Comments (1)
| TrackBack
| Digg It
| Tag w/del.icio.us
January 21, 2008
OS X on the Asus Eee PC

We've posted about installing Ubuntu and Vista on the little Asus Eee PC, so to round things off, here's a guide for installing Leopard. Using a few tools of the hackintosh trade, Dan from Uneasy Silence was able to get OS X running on the little lappy.
So, ever since I got the eeePC I've loved how easy it is to tinker with. Since I'm not a Linux guy, I dumped the Xandros preload and opted for Windows XP so I could you my EVDO USB datacard and blogging software easier, but I wondered could I install OSX on it? And, after trial and error - you can!
One thing that Dan mentions is that Leopard is a bit pokey on the Eee. He opted to run OS X 10.4.8 instead, and it sounds like it performs quite a bit better.
Load OSX 10.5 Leopard on the eeePC - Link
Vista on the Eee PC - Link
HOWTO - Install Ubuntu on the Asus Eee PC - Link
Posted by Jason Striegel |
Jan 21, 2008 09:35 PM
Hardware, Mac |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
As thin as the MacBook Air?

One of my favorite old computers is making the news again--C|Net News.com reports that the Sharp Actius MM10 is most likely the thinnest notebook out there (seems pretty much a tie):
Back in the first years of the decade, Sharp released the Muramasas. Measuring 0.54 inch thick, the Actius MM10 Muramasa notebook, which hit shelves in 2003, came with a 1GHz Crusoe processor from Transmeta, 256MB of memory, a 15GB hard drive and a built-in Wi-Fi module. It ran 2.5 hours on a regular battery, and cost $1,499. Sharp also had a Mebius notebook in the Muramasa family that measured 0.65 inch thick.
In a strange coincidence, my XO laptop recently ordered me to install Linux on my MM10, so I dug it out of the closet, re-seated the hard drive (the case has never quite recovered from the time I installed a physically-too-large 40GB drive in it), and put xubuntu on it. What I'd like to find now is a 4GB or 8GB solid state drive in a package that's compatible with the Toshiba 1.8" IDE drive. Either that, or I need one of these: Compact Flash to 1.8" Toshiba HDD Adapter
Update: Thinnest notebook crown belongs to Sharp - Link
Here are some pictures of the MM10, including a few disassembly shots (go here if the slideshow doesn't load):
Posted by Brian Jepson |
Jan 21, 2008 02:26 PM
Mac |
Permalink
| Comments (3)
| TrackBack
| Digg It
| Tag w/del.icio.us
January 10, 2008
Target Disk Mode: transform your Mac into a firewire drive

If you hold down 'T' while booting a Mac, the screen will go black and display a large Firewire logo. In this state, called Target Disk Mode, your fancy laptop is magically transformed into a plain ol' external hard disk. Connect it to another machine via a firewire cable and your Mac's hard drive will appear on the other machine's desktop, just as if you had connected an external firewire drive. Just unmount and reboot to return your trusty Mac to its normal self.
While turning your laptop into a $2000 firewire drive may seem a little bit of a downgrade, it can come in quite handy for transferring large files. Think about it: if you were to transfer a huge amount of data over sneakernet, you'd need to copy it over to a firewire disk, reconnect the disk to the another machine, and then transfer the data again over the firewire connection. With Target Disk Mode, you only make the firewire transfer once, so a large file transfer takes half the time. Like sneakernet, you still need to hike one of the Macs over to the other machine to make the connection, but since you are transferring half the data, you are only required to wear one sneaker.
Posted by Jason Striegel |
Jan 10, 2008 08:47 PM
Mac |
Permalink
| Comments (7)
| TrackBack
| Digg It
| Tag w/del.icio.us
January 3, 2008
GrabFS: the screenshot file system

GrabFS is a clever MacFUSE-based file system created by Amit Singh that creates a live screenshot file system for all of your running applications.
When you run GrabFS, a new drive volume will appear. Inside, you'll find a folder for each running application, and inside each application directory, you'll find a tiff file for each of the application's windows. When you drag, copy or open one of these files, you get a snapshot of the application window at that point in time.
GrabFS requires Leopard and the Leopard build of MacFUSE. I think it's time for me to upgrade.
GrabFS: The Screenshot File System - Link
MacFUSE - Link
Posted by Jason Striegel |
Jan 3, 2008 12:02 AM
Life, Lifehacker, Mac |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
Bloggers
Welcome to the Hacks Blog!
Categories
- Ajax
- Amazon
- AppleTV
- Astronomy
- BlackBerry
- Blogging
- Body
- Cars
- Cryptography
- Data
- Design
- Education
- Electronics
- Energy
- Events
- Excel
- Excerpts
- Firefox
- Flash
- Flickr
- Flying Things
- Food
- Gaming
- Gmail
- Google Earth
- Google Maps
- Government
- Greasemonkey
- Hacks Series
- Hackszine Podcast
- Halo
- Hardware
- Home
- Home Theater
- iPhone
- iPod
- IRC
- iTunes
- Java
- Kindle
- Knoppix
- Language
- LEGO
- Life
- Lifehacker
- Linux
- Linux Desktop
- Linux Multimedia
- Linux Server
- Mac
- Mapping
- Math
- Microsoft Office
- Mind
- Mind Performance
- Mobile Phones
- Music
- MySpace
- MySQL
- NetFlix
- Network Security
- olpc
- OpenOffice
- Outdoor
- Parenting
- PCs
- PDAs
- Perl
- Philosophy
- Photography
- PHP
- Pleo
- Podcast
- Podcasting
- Productivity
- PSP
- Retro Computing
- Retro Gaming
- Science
- Screencasts
- Shopping
- Skype
- Smart Home
- Software Engineering
- Sports
- SQL
- Statistics
- Survival
- TiVo
- Transportation
- Travel
- Ubuntu
- Video
- Virtualization
- Visual Studio
- VoIP
- Web
- Web Site Measurement
- Windows
- Windows Server
- Wireless
- Word
- World
- Xbox
- Yahoo!
- YouTube
Archives
Recent Posts
- Radio controlled lawn mower
- Using the Canon Hacker's Development Kit
- Cornell University's student microcontroller projects - Spring08
- Videos from past DEFCONs
- Update the hacker map
- HOWTO - embed fonts from a SWF into a Flex app
- Server-side Google Analytics
- Remember before you forget, but no sooner.
- Stop XSS attacks with SafeHTML
- Improving astronomical video using VirtualDub
www.flickr.com
|





Recent comments