Absurdistan (1)
This post over there at TUAW.com boils down to one thing: Turn your expensive phony toy off to save battery. Yeah, that’s great!
This post over there at TUAW.com boils down to one thing: Turn your expensive phony toy off to save battery. Yeah, that’s great!
The way i organize my data has changed a lot over the last years.
Way back in the last millennium i had folders for everything. A folder within a folder within folders. And somewhere buried deep within that, my applications, music, pictures, email and whatnot.
Although Apple does the best a company can going from great to suck, it’s their OS and applications that changed my mind a lot.
I refuse to browse my music by folders. I like it by artist, album or some other arbitrary tag. The same and more for my email. I was used to have a folder structure
Spotlight was the first desktop search i used and after it was stable and performed well after the first view release, it is great. I roughly “arrange” data by themes (i.e. images, programming, music) and put programs in one big directory and i’m done. Oh, remembering my old Windows 95 box with a folder “dos_app” for well… DOS programs and games and a second “win_app” for gui thingies… Hell!
I certainly heard about Windows Future Storage a.k.a. WinFS back in 2003, a relational filesystem by Microsoft which should have been available in Vista but has never made it that far. Today, i read somewhat more and I’m really putting my head against the wall. This thing could have been huge! It’s pity that the problems releasing Vista must have been that big that they (Microsoft) cut their plans of an intelligent file system once again.
After all that Java and Ruby stuff here, i am a database guy, i like the maths behind relations and the power within. Furthermore, this video called IWish Concept Video must be one of the few cool ad videos Microsoft has ever made. Great stuff and i think absolutely possible with all the great ideas in WinFS.
Sometimes my Macbook decides to wake up from his sleep (a.k.a hibernation). Most of the times i notice this at work when my emails disappear from my imap inbox as Mail.app applies his rules.
As i do not have Apple Remote Desktop or any other VNC server enabled on my Macbook, i do have a problem.
I can vpn into my home and i can ssh into the Macbook, so i came up with the following solution:
Put the following three lines into a plain textfile, i.e. “sleep.txt” and save it somewhere:
tell application "Finder" sleep end tell
Then, open Terminal.app, change to the directory you saved the file in and execute:
osascript sleep.txt |
Your ssh connection will then timeout and the Mac sleeps.
Stupid me forgot that ssh can execute remote commands: From your workmachine execute
ssh my_home_computer 'osascript sleep.txt' |
and you’re done. Thanks “tante” for reminding me 🙂
Alternatively, you can achieve similar with Mail.app itself, have a look at the solution here, but i like mine better.
Zooming with the CTRL+Mouse Wheel Up/Down has been in inversed in Firefox 3. In version 2 you zoomed in (enlarged the text) with CTRL+Mouse Wheel Down and zoomed out with CTRL+Mouse Wheel Up, its now in Firefox 3 the other way round.
The revert back to the old behaviour, change
mousewheel.withcontrolkey.numlines = 1
to
mousewheel.withcontrolkey.numlines = -1
in about config.
To me “pulling” the page towards myself always felt much more natural to me than the other way round, but that’s just me.
Just in case i do keep forgetting that stuff, here’s a regex for decoding urls like
ftp://user:somepass@somehost:someport
in Java:
final Hashtable<String, Integer> portMap = new Hashtable<String, Integer>(); portMap.put("ftp", 21); portMap.put("sftp", 22); final Pattern urlPattern = Pattern.compile("(ftp|sftp)://(\\S+):(\\S+)@([\\S&&[^:]]+)(:(\\d+))?"); final Matcher m = urlPattern.matcher(url); if(!m.matches()) throw new RuntimeException("Invalid ftp url!"); final String protocol = m.group(1).toLowerCase(); final String user = m.group(2); final String password = m.group(3); final String host = m.group(4); final int port = m.group(6) != null ? Integer.parseInt(m.group(6)) : portMap.get(protocol); |
Just in case anybody is interessted, i’m writing a wrapper around j2ssh and Commons::Net to support both ftp and sftp in a J2SE program.