Recently in Apple Category
I have a NAS with four 400GB harddrives running a RAID 5 installation, which means I won't lose data on there unless two of the drives go bad. It's done through my TS-409 (shown to the right). Since I have all these space, I might as well use it to backup my MacBook regularly so I don't lose any of my important data. OS X users know, Time Machine is awesome. It helps you take hourly, daily, and weekly snapshots of your computer. But unfortunately, it only works with additional harddrives attached to the machine, OR Time Capsule on your network... right? Wrong. Today, we will sideways hack Time Machine, and make it work with your SMB (Windows) share folder.
Before you get started, counter intuitive as it may seem, please be sure to have your data backed up before proceeding. While the memo is written with the best of intentions to help people make backups, I will not be responsible for any data loss as result of you following through this memo of my. You have been warned.
There is a really nice GM script I want to use, but it seems to cause problems with the Google Gear synchronization. Whenever I have the script enabled, and Google Gear tries to sync, everything goes wonky and the page refuse to load. I must disable the script, have Gears sync, and then re-enable the script.
If anyone knows how to make these work in harmony, please do leave a comment to let me know how! In the mean time, I'll have to keep the script disabled...
Earlier today, I was unable to start any applications... I'd type the application name via QS, and QS would go away, but no app. I'd use Finder to go to /Applications and attempt to manually launch it, and nothing would happen. Finally, when I tried to start iTerm, it told me it was unable to fork. Linux instincts kicked in and told me that the problem came from lack of resources or PIDs. So I quickly quit a few apps (I had upwards to 30 applications running at that time), and long and behold, I was able to start applications again. I checked my processes list via terminal, and noticed a bunch of idle perl processes -- It's still a mystery to me as to what they are, as I was unable to kill them individually, nor through killall, nor could I see them via Activity monitor, but that's besides the point. I rebooted the system, and it seems to be running fine now (and the idle perl processes have yet to return *touch wood*).
I decided I want to pay attention to my resources usage, and make sure my system doesn't lock up on me. I have the habit of leaving commonly used applications running... this is even the case when I was still on Windows. This is when I started to notice a funny trend. It'd appear that applications on OSX suffers even more evident memory leak/consumption problem than their Windows counter part! Here's a quick break down of memory usage oddities after around 12 hours of me working:
iTunes - Real Memory: 220.8MB, Virtual Memory: 2.0GB
Firefox - Real Memory: 208.4MB, Virtual Memory: 1.7GB
Mail - Real Memory: 150.2MB, Virtual Memory: 1.4GB
Last.fm - Real Memory: 92.7MB, Virtual Memory: 1023.49MB
uTorrent - Real Memory: 16.28MB, Virtual Memory: 973.33MB
iTunes I understand, I have tons of music (library of 1699 tracks, 14.13 GB total) and most of them are tagged with album art, so it takes resource to load when I play songs. But on Windows, my iTunes usually floats at around 150MB of memory usage, not 220MB! So I quickly quit iTunes and restarted it. Surely, it dropped down to 70MB of real memory, and arond 1GB of virtual memory -- though, as I wrote these, it grew slowly to 85.52MB and 1.07GB already.
Firefox I understand... The prefetching "feature" and caching of tabs etc. does eat up quite a bit of resources... On Windows I've seen it gone up to as much as 600MB of memory, too... So I just killed it and restarted. It's coasting at around 107MB right now...
Mail - I wonder if it downloaded all my mails from gmail, even though I said IMAP, and tries to load them into memory over time... Mail is now consuming only 51MB and 1.0GB after quit and relaunch.
Last.fm - WHY?! It's a tiny icon that does nothing but scrob my musics! ... and I don't even listen to music from it. Restarted it and its now only eating 21MB and 986.49MB of memory.
uTorrent - This one is tiny, but still worth mentioning... Because I didn't do anything with it! I simply decided to download it to see if it is exactly the same as the Windows counter part. Forgot about it, and left it idling. No downloading, no seeding, no hash checking, nothing. Main window isn't even open (so I don't see it on expose)! Restarting it seem to have make it go down to 13.17MB, and 966.61MB though.
So, yeah... tip to make your OSX run faster? Just quit your apps and restart them every now and then! It's surprising to see their memory grows so rapidly, even if you're not doing anything with them...
Getting into the Mac world, I encountered two awesome tools from the same author; Nocturne, a tool which allows you to invert screen colors so your eyes doesn't go blind in dark places, and Quicksilver, a rapid application launcher allowing you to perform complex tasks with just a few key strokes. However, they don't integrate well together.... I can't seem to use Quicksilver to toggle Nocturne.... not until I wrote a quick AppleScript for it... And you can do it too!
Here's how I did it.
First, start Nocturne normally, and go to the preferences panel. Disable sensor auto switch... that will bump you right out of invert mode if you are in a bright enough place.
Then, enter night mode, and quit the application... it will auto revert back to day mode upon exit, but when you launch it again, it will start in night mode, which is what we want.
Next, go to script editor (Quicksilver > Script Editor, Enter) and create this script (copy & paste should do the trick):
tell application "System Events"
set TheList to get name of every process
repeat with i from 1 to the count of TheList
if item i of TheList contains "Nocturne" then
tell application "Nocturne" to quit
set Disabled to true
end if
end repeat
if Disabled is false then
tell application "Nocturne" to activate
end if
end tell
Save the script you've just created into ~/Library/Application Support/Quicksilver/Actions as Nocturne.scpt and you're almost ready to rock! Trigger your Quicksilver, use Command + R to force refresh of your catalog, and type Nocturne into the first box of Quicksilver. Because Quicksilver weights the application more heavily than your script, you need to hit down a few times to find the script instead of launching the application directly. I gave it three times and then Quicksilver learned that I want to use the script instead of real app... it might take you lesser or more, depending on how many times you've launched Nocturne via Quicksilver. But once it learns that, its all good.
Now, each time you want to toggle mode, just trigger Quicksilver, type Nocturne, and it'll switch day and night mode for you. Pretty neat huh?
Got it to work? Please let me know how things are working out for you via comments section :)