Tuesday, November 16, 2010

Taking screen captures of websites

Here's a great way to programmatically create screen captures of sites. It uses a python script to access WebKit and generate a PNG. It would be fairly easy to add some logic to make it crawl a site to show clients. We had to use this to grab some shots of a site for a routing phase of a pharmaceutical project.

There is also another program called Paparazzi! It provides a GUI and allows a little bit of interactivity for clicking through.

Saturday, September 25, 2010

Reformatting XML with TextWrangler Script

Here's a great tip for reformatting XML. I'm reposting this. I use TextWrangler and use the UNIX Script.

Use Unix Filters and create the following script to use, Reformat XML.sh:

xmllint --c14n "$*" | XMLLINT_INDENT=$'\t' xmllint --format -

Thanks Magpie.

Thursday, September 02, 2010

Fixing Font Rendering Issues in Google Chrome for Mac OSX

While I'm writing this the Google Chrome browser is still a beta. But I still want to use it.

So the problem is that I open up Chrome and it runs into a font issue when I'm using fonts installed with my font management software (i.e. - Linotype FontExplorer X, FontAgent Pro, etc...).

I see the following characters:

The problem is that Chrome for Mac OSX is looking for font files at the following location:


Where these font management software programs install fonts to a different location. To remedy the problem simply change your font folder and Chrome should read the fonts fine.

On FontExplorer X 1.2.3, you can simply open up Preferences and go to the Advanced tab. Here you can change the location of font files. Yeah I run it because it's free.

Font Book which is provided by Apple on Leopard and up, seems to install for use with Chrome with out any issues. But then again, Font Book isn't exactly the best solution for font management when you have six thousand fonts.

Wednesday, September 01, 2010

How to Enable Flash Content Debugger Plugin on Google Chrome Browser for Mac OSX

This is applicable to Google Chrome 5.0.375.127 for Mac OSX.

To enable the Flash Content Debugger Plugin on Google Chrome. Simple disable the plugin distributed with Chrome. Of course, you'll also need to install the content debugger version of the plugin as well.

To disable the plugin distributed with Chrome open your Preferences and select the tab entitled "Under the Hood":

Then open Content Settings:

Now click on the link "Disable Individual Plugins":
On the plugins page both the plugin distributed with Chrome and the plugin installed from Adobe are listed. Simply disable the plugin located within the Chrome files at the location:

/Applications/Google Chrome.app/Contents/Versions/5.0.375.127/Flash Player Plugin for Chrome.plugin

On PC the distributed plugin can be disabled by opening the +Details button in the upper right and then disabling the plugin individually.

Friday, April 30, 2010

Samba write error in Mac OSX

I've been experiencing this write error for a long time.

And for the longest time I had no clue where it was occurring until I did some research and found a solution.

Here's the entry:

Basically, the solution is to turn off Unix extensions in Samba's smb.conf configuration file. Add the following to the [global] section

unix extensions = off

And restart your samba server.

Friday, January 15, 2010

Popular Programming Languages for 2010

Here's TIOBE's Programming Community index gives an indication of how popular some programming languages are becoming.

It is certainly surprising to see how fast some languages are rising up. Not to mention that Apple's Objective-C (which runs on the iPhone) is certainly up and rising at #12 and Google's Go language is right behind it at #13.

Also Adobe's Flash ActionScript is surprisingly rising the ranks now at #19.