Technology

You are currently browsing the archive for the Technology category.

I played around a little bit with script.aculo.us the last few days and came up with some small Flickr photo browser called Folaroids.

It’s based on Ruby and JavaScript (Prototype and script.aculo.us). It’s the first time that I’ve done some real word application with erb and script.aculo.us (whose effects and support is just awesome).

Check it out (and leave comments).

Here’s the requested .plist file, insert your username (or the path where you’ve put the Apple Script) and save it to /Library/LaunchAgents/com.apple.tm-notification.plist. Then do

launchctl load /Library/LaunchAgents/com.apple.tm-notification.plist

Here’s the .plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>  
	<key>Label</key>
	<string>com.apple.tm-notification</string>
	<key>ProgramArguments</key>
	<array> 
		<string>/usr/bin/osascript</string>
		<string>/Users/[user]/Public/tm.scpt</string>
	</array>
	<key>LowPriorityIO</key>
	<true/>
	<key>Nice</key>
	<integer>1</integer>
	<key>StartInterval</key>
	<integer>300</integer>
</dict>
</plist>

Time machine is really a fine piece of software. The only thing which is missing is some kind of notification when a backup was done (you can open the preferences, but that’s not really satisfying).

So I crafted some little Apple Script:

set console_text to do shell script "syslog -F '$Message' -k Sender /System/Library/CoreServices/backupd -k Time ge -5m"
 
if console_text is not "" then
	tell application "GrowlHelperApp"
		set the allNotificationsList to {"Notification"}
		set the enabledNotificationsList to {"Notification"}
 
		register as application ¬
			"Time Machine Notification" all notifications allNotificationsList ¬
			default notifications enabledNotificationsList ¬
			icon of application "Time Machine"
 
		notify with name ¬
			"Notification" title ¬
			"Time Machine" description console_text ¬
			application name "Time Machine Notification"
 
	end tell
end if

Copy it to some folder and register a cronjob, something like this: */5 * * * * /usr/bin/osascript /Users/[username]/Public/tm.scpt

Here is the compiled script: Time Machine Notification

If you want to have a shorter/longer interval you need to change the cron line accordingly and the script (it’s the last parameter in the first line, now saying ‘5m’).

Edit: I did what a reader suggested, here is the .plist file.

WTF of the day

Can anybody tell me why I get “Ho Chi Minh City (VN)” as the first suggestion in a webform when the first (and only) letter I’ve typed is “S”? A colleague suggested that it might be phonetical suggestion, which I doubt for “Ho”, even for local language. And I also doubt that “Jekaterinburg” and “Lamezia” have an “S” as their first letter.

Webform suggestion

Love? Hate? Whatever…

// This won't work:
Process proc = new Process();
string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
 
proc.StartInfo.Filename = System.IO.Path.Combine(path, "myApp.exe");
proc.Start();
proc.WaitForExit(); // <-- Will crash here
 
// This does work:
Process proc = new Process();
 
proc.StartInfo.Filename = "myApp.exe";
proc.Start();
proc.WaitForExit();

Both samples will start myApp.exe just fine, but the first one seems to have some problems with Windows. Cost me four precious hours of my life.

btw, can anyone tell me why “new” in the code snippet above links to a google search for new and msdn.microsoft.com? No? That figures.

Yesterday I had some problems with a Vista PC whose Internet Explorer wouldn’t open any URI (including IP addresses). Strange thing is that I could ping the ip and the name, and even the check connectivity function could connect to the web. Installing Firefox fixed the problem, kind of.

And another one on my XP machine today (note that it says en-US in the address bar):

Windows Update

@Mr Jobs: Mac OS X Leopard, beginning of October?

Py-ISO8211

Does anybody know if the iso8211 library for Python have been updated to work with Python 2.5? I got them working rudimentary but I still found some issues.

Thunderbird Tip

My websites are all hosted on a Dreamhost account, so I use their IMAP servers for my mails. However, I do keep a local copy of my Inbox in Thunderbird if I’m offline and wanna have access to my last recently received messages (mails are moved away from the inbox to an archive folder after 30 days).

I recently noticed that the inbox file got extremely big (80mb, too much for a few hundred messages, most of them without attachements) and discovered an interesting option the properties page of my Inbox: Rebuild Index. It basically seems to delete your inbox and fetch it again from your imap server. Result: 5mb inbox file, instead of 80mb.

The last few days I had some time to create a lifestream, as you can find some here and there.

It was actually pretty simple thanks to Mark Pilgrim’s Universal Feed Parser. I simply stuffed all my personal feeds into a dict, including the source description for different styles, text,…; did the feed parsing, collected all entries, sorted them and wrote them to an html file (I was a bit shy about an online solution due to some speed, performance and privacy concerns - at least not everybody can see my virtual-personal actions for every second of my life).

All in all the hardest part was getting that damn thing running on Dreamhost via a cronjob (mainly because I’m using my own version of Python, own modules,…).

Since I deactivated Extended Live Archives for this blog (because nobody really used it and it adds code and style sheets to the page) I played around with some code from the web to generate a Wordpress archive page which would group together years and months of blog posts (yeah, I can really speak of “years” and “months”, Stopbeingcarbon.com is now over three years old).

One drawback I found by accident is the query number for this specific code. years*12+n (which results in about 600 queries for my blog). Not so good.

So I had a look at my mysql logs and found a reoccurring line which selects a single post via an id. Googling brought up some results with get_permalink() as the malefactor. The get_permalink() function takes an id of a blog post and returns the permalink. Which is nice, but I already had the post, I just needed the permalink.

By copying the function, removing one line (the post-loading-thing) and renaming the argument I had a new function which would give me the permalink from a post object. Outcome: query count is down to one tenth and I’m happy (as well as my db server).

« Older entries § Newer entries »

Eugene Rosales Institutional Announcement Amp Results Press Releases Sierra Leone Madonna Decorative Handle Most Popular Television Shows In 1964 Lake County Indiana Circuit Court Siegrid Krone Dream Scene Available Dc Hotel Rooms Taurine Rock Star Vera Knipping Paperboy Video Dell Latitude C640 Repair Manual Awol Baggage Atlantic Corporate Overview Fossil Inside Nuclear Decorating For Kids Room Connecticut Brothels Owner Financed Real Estate 78380 Miami Applicator Hdr Deb's Web Site Ears Disney Neverland Tinkerbell Lark Voorhies Ass Bethannie Huffman Autohaus On Edens Mercedes-benz Ian Cawsey Mp Shinheung Conifer Relocation Lake Hughes Castaic Mans Home Is His Castle Mp3 Connie's Cakes Mi Deq Permits Wyoming Side Of The Brain Emotion Vanessa Del Lie Consumer Marketing Practices Rights To The Neccessities Of Life Tear It Up Yung Wun Clean Nepal Affiliates Tim L Mmle Map Of Kalgoorlie Australia Deeper Than The Holler Play Song Martin Ray Grass Valley California Gps Mail-in Rebates Wet And Wild Cruise Bfgoodrich Power Radial Farm Tire Draw Porcupine Saint Francis Hospital Poughkeepsie What Is Normative Economics Focused On Abby Lincoln Cds Atlanta Apartment Leasing Jobs About Women Coldsweep Larry Mosley Murder Martel Real Estate Pacific Maple Marine Ply Time Sheet Excel Team Losi Lst Monster Truck Sho For Sale Vernon Dorhan Illinois Manchester Cinema Rock Hill Tasas De Contribucion Sobre Ingreso Argentina What Does Tobacco Sachse Singles Funny St Patrick Day Jokes Famous Cowboy Quotes What Is Third Party Imaging Saddam Husain Execution Viedo Mental Health Patient Workbooks Lancaster Archeological Sites Decorating Sweetheart Table Athearn 5-pack Csx Containers Control Systems For Gas Turbine Aeroengines La Villa Maillot Paris Tanja Maduzia Lake Forest Park City Management Vb6 Creating Event Handler Shine Newsboys Peter Furler Estate Planning Advisors Inc Sheffield Antique Hacksaw Padding Press With Chains What Is The Definition Of Errata Institude Of Power Engineers Toronto Multimode Single Fiber Difference Mother Of Vinegar Heartburn Rifle Sighting In Azaleas Festival In The Usa Manufactured Bamboo Flooring Autoparts Nanaimo Bc Association Of Business Support Services International Middle School Sciencs Projects Motorola Charging Razor With Usb Fannie Roan Abc 13 News Houston Texas Las Vegas Jumbo Mortgage Rate Sgs Css Join Server Baby And Mom Prenatal Yoga Cocktail Dress Designer Tall Famous Speecehs Outdoor Furniture Stores In Melbourne Marshall University Website Huntington Richaven Dawn