<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michael Bianco&#039;s Blog &#187; General</title>
	<atom:link href="http://mabblog.com/blog/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://mabblog.com/blog</link>
	<description>Web, Software, and Design</description>
	<lastBuildDate>Thu, 17 May 2012 00:22:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Product Pricing in a Zero Marginal Cost Distribution Environment</title>
		<link>http://mabblog.com/blog/2012/04/product-pricing-in-a-zero-marginal-cost-distribution-environment/</link>
		<comments>http://mabblog.com/blog/2012/04/product-pricing-in-a-zero-marginal-cost-distribution-environment/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 17:33:21 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[pricing]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=556</guid>
		<description><![CDATA[Jarrod Drysdale on digital product pricing: Our strategies were very different. Sacha wrote a book and priced it relative to the cost of other books, which is the strategy just about everyone follows. Instead of that, I wrote a book and priced it based on the value it provides. Choosing a pricing strategy based on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.studiofellow.com/" target="_blank">Jarrod Drysdale</a> on <a href="http://blog.asmartbear.com/higher-pricing.htm" target="_blank">digital product pricing</a>:</p>
<blockquote><p>Our strategies were very different. Sacha wrote a book and priced it relative to the cost of other books, which is the strategy just about everyone follows. Instead of that, I wrote a book and priced it based on the value it provides.</p>
<p>Choosing a pricing strategy based on competition is a natural approach, but also a flawed one. Price competition implies scarcity—supply and demand market forces. There is no scarcity for ebooks because digital files are replicated practically for free.</p></blockquote>
<p>Seth Godin has <a href="http://www.thedominoproject.com/2011/12/how-much-should-an-ebook-cost.html" target="_blank">mentioned this before</a>: there seems to be a &#8216;race to the bottom&#8217; effect with a lot of eBooks, but many are doing fairly well with pricing way above the competition if they are in a market with scarce competition. Of course this is nothing new – small supply relative to demand results in a above market price.</p>
<p>If you not planning on growing a business or establishing a brand (including your own &#8216;personal brand&#8217; – your value in the marketplace) then selling a one-off book (or any sort of digital content) by estimating the intersection of supply and demand curves might work.</p>
<p>However, every product has some of auxiliary asset whose value is increased or decreased depending on a product is priced, designed and released.</p>
<p>Mailing list growth. Establishment of a respected voice in a niche market or field. Growth of enthusiastic fans. Possibility of a future acquisition.</p>
<p>All of these intangible assets are not easily valued because in most cases they are dependent on the future. However, they have a real value and possible growth in any of these assets can effect the short term pricing of a product or service. I think this is what makes digital good pricing challenging – why some books are on sale for <a href="http://www.amazon.com/gp/feature.html/ref=amb_link_361554162_2?ie=UTF8&amp;nav_sdd=aps&amp;docId=1000706171&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_s=center-1&amp;pf_rd_r=0Y6QGWE61JFYRBMG0594&amp;pf_rd_t=101&amp;pf_rd_p=1360243642&amp;pf_rd_i=507846" target="_blank">$3.99</a>, <a href="http://stopstealingdreams.com/" target="_blank">some free</a>, and some less that <a href="http://bootstrappingdesign.com/" target="_blank">150 pages and $50</a>. I don&#8217;t think there is ever going to be any one model that works – when you can slice and dice pricing into many different facets the possibilities are endless.</p>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2012/04/product-pricing-in-a-zero-marginal-cost-distribution-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Up QuickBooks on Windows XP Professional for Multi-user Environment</title>
		<link>http://mabblog.com/blog/2012/01/setting-up-quickbooks-on-windows-xp-professional-for-multi-user-environment/</link>
		<comments>http://mabblog.com/blog/2012/01/setting-up-quickbooks-on-windows-xp-professional-for-multi-user-environment/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 15:57:15 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=492</guid>
		<description><![CDATA[Recently I was involved in a project moving a company&#8217;s files from a old 2003 windows exchange server to a mac mini server setup. The first setup was to move from Exchange&#8217;s email and calendaring to Google Apps. After that step was complete we moved the shared files drive over to thunderbolt RAID 5 storage [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was involved in a project moving a company&#8217;s files from a old 2003 windows exchange server to a mac mini server setup. The first setup was to move from <a href="http://mabblog.com/blog/2012/01/migrating-rules-from-microsoft-exchange-to-google-apps/">Exchange&#8217;s email and calendaring to Google Apps</a>. After that step was complete we moved the shared files drive over to thunderbolt RAID 5 storage attached to a mac mini server device. The transition was pretty smooth, however there was one problem which wasted a significant amount of time.</p>
<p>The accountant&#8217;s in the organization use QuickBooks 2010 for all accounting purposes. Moving to a hosted solution was not an option, and they needed multi-user access to the file (2-3 people could be working on the same quickbooks file at any given moment). Our old 2003 server had quickbooks database server installed which seemed to work fine. Unfortunately, if you are not an &#8216;enterprise&#8217; quickbooks customer there is no linux version of the database server available. There was an old windows box lying around (fairly fast: dual core 2.8ghz, 3GB ram) that would be a perfect fit (or so I thought&#8230;) for a quickbooks server. Wiped the box, installed Windows XP with all updates, removed all crapware, installed quickbooks database software, but had significant trouble getting quickbooks database server to work correctly.</p>
<p>I ran the QuickBooks Network Diagnostic tool, but it did not report any errors. When opening the QuickBooks file from a client machine in multi-user machine the login prompt would come up fine, but after entering the correct login information it would time out with an error message stating a connection issue (H202) and suggesting using an &#8216;alternative&#8217; method (there was a significant delay in between initiating login and getting a response). Note that QuickBooks at this stage would correctly report an incorrect password.</p>
<p>The network setup in the location where this was occurring had a local server running DNS. The QuickBooks server had a static IP set.</p>
<p>Here are some general notes on setting up QuickBooks:</p>
<ul>
<li>Some mentioned that <a href="http://community.intuit.com/posts/opening-quickbooks-painfully-slow" target="_blank">anti-virus software on the client machine</a> causes slow operation. This didn&#8217;t seem to make in a difference in my case.</li>
<li>Tried turning firewall off on server + client machines: no difference (proper port settings were already in place)</li>
<li>Pulling data off of the shared QuickBooks folder on the XP machine wasn&#8217;t bad: 15MB/sec on a badly engineered 10/100 network (there are 5-port 10/100 switches in probably 5-10 locations around the office)</li>
<li>Opening the QuickBooks file in single-user mode from a client machine worked fine</li>
<li>Launching QuickBooks 2010 on the server and opening the file in multi-user mode, then opening the file from client machines worked fine as well</li>
<li>The significant delay between the login screen and the error messages pointed to some sort of look-up timeout, but given that file access to the machine was fine, this didn&#8217;t make a ton of sense. However, <a href="http://www.qbgarage.com/blog/what-does-error-code-h202-mean/" target="_blank">this seemed to be part of the issue</a>.</li>
<li>It is important that the daemon process for QuickBooks Database Server is <a href="http://support.quickbooks.intuit.com/support/articles/SLN40493" target="_blank">part of the administration group</a></li>
<li>On another note: <a href="http://serverfault.com/questions/80365/how-can-i-automate-the-backup-of-a-quickbooks-server" target="_blank">some great information on backing up QuickBooks</a></li>
<li>How to <a href="http://community.intuit.com/posts/automated-backup-of-quickbooks-db-when-running-qb-pro-in-server-mode" target="_blank">schedule backups</a> of QuickBooks from the QB Pro interface</li>
</ul>
<p>What finally fixed the problem was adding the computer-name (aka server name or BIOS name) to the hosts file. Opening up quickbooks is still painfully slow, but at this point it works.</p>
<h2>Update</h2>
<p>After moving (and completely eliminating the windows server from the network) problems ended up cropping up again. QuickBooks seemed to rely on the WINS (a crappy windows replacement for DNS) server to some extent. After editing the lmhosts file (same location as hosts file in windows) and manually adding the NetBIOS entries everything seemed to work. Note that there is <strong>not a lmhosts file by default!</strong> There is a <strong>lmhosts.sam </strong>(should for sam<strong>ple</strong>). To active the file you have to remove the extension (watch out for hidden extensions). On the machines that are using quickbooks both the hosts and lmhosts file have manual entries for the QB server. Not sure if this is necessary, but it worked.</p>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2012/01/setting-up-quickbooks-on-windows-xp-professional-for-multi-user-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating Rules From Microsoft Exchange to Google Apps</title>
		<link>http://mabblog.com/blog/2012/01/migrating-rules-from-microsoft-exchange-to-google-apps/</link>
		<comments>http://mabblog.com/blog/2012/01/migrating-rules-from-microsoft-exchange-to-google-apps/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 16:38:31 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=487</guid>
		<description><![CDATA[Recently I was part of transitioning the email system of a 20+ employee business off of a Microsoft Exchange 2003 server to Google Apps. Moving close to half a million emails to a new email service was a big decision. The transition tools that Google has in place are pretty good, albeit slow for that [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was part of transitioning the email system of a 20+ employee business off of a Microsoft Exchange 2003 server to Google Apps. Moving close to half a million emails to a new email service was a big decision. The transition tools that Google has in place are pretty good, albeit slow for that many emails, Google throttles email transfer to one each second after the first 500. However, the one piece that was missing was a good tool to transition outlook server rules. Many employees used those rules extensively and many had 50-100 rules. Outlook does not have any method in place for extracting those rules. There is no built in way to getting any sort of list or descriptions of the rules, if one wanted to transition the rules manually they would have to click on a rule, look at the pop-up window, and recreate the rules in Gmail using the filters functionality – repeating this two step process <em>for each rule</em>. Horrible.</p>
<p>This would waste many hours of valuable time so I started hunting for a better solution. There is <a href="http://support.microsoft.com/kb/324568" target="_blank">an API </a>in Outlook 2007 or higher that enabled access to rules. There isn&#8217;t much example code available, and to my surprise I couldn&#8217;t find any VB script to export a CSV of all the rules associated with an outlook account! I hacked together a really rough <a href="https://github.com/iloveitaly/outlook-gmail-rules-migration" target="_blank">VB script which exports Outlook rules</a> (only one rule type right now, thats all I needed for my use case) as a CSV and then wrote a small ruby script to generate a XML doc of the rules for import via Gmail&#8217;s import / export available through Gmail labs. It works fairly well assuming you have an updated version of Outlook 2007 or higher.</p>
<h3>Google Apps Transition Notes</h3>
<ul>
<li>The server migration tool pulled in some calendar events that employees claimed they deleted long ago.</li>
<li>The Google Mail Uploader application for Mac is not consistent. It wouldn&#8217;t pickup mail on some computers. Doesn&#8217;t handle folder hierarchy (flattens everything). Use the server migration tool instead.</li>
<li>Mail.app folder doesn&#8217;t update folder&#8217;s unread count immediately. This might be an isolated issue with Lion.</li>
<li>I had a problem with one Mac machine (10.6) where the inbox would randomly appear blank. Clearing all Mail.app support / cache files and adding the mailbox with message + attachment cache disabled fixed the issue (after mail downloaded I enabled cache again).</li>
<li>Gmail doesn&#8217;t seem to handle lots of folders (labels) well. Mail.app seems to be a lot slower with multiple folders.</li>
<li><a href="http://www.jasonhendriks.com/2011/05/using-gmail-with-apple-mail/" target="_blank">Hiding the automatic All Mail, Misc, Follow-up, etc folders </a>was helpful for those who were not familiar with gmail.</li>
<li><a href="http://blog.xiao-ma.com/2011/02/20/make-apple-mail-app-likes-gmail/" target="_blank">Changing some of the local settings</a> on Mail.app makes Gmail play a bit nicer.</li>
<li>Still can&#8217;t find a good solution to allowing a user that is an administrator of another user&#8217;s calendar to create an event with the organizer being marked as the calendar&#8217;s creator. Use case: administrative assistant managing an executive&#8217;s calendar.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2012/01/migrating-rules-from-microsoft-exchange-to-google-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MacRuby Deployment + Load Order</title>
		<link>http://mabblog.com/blog/2011/11/macruby-deployment-lion-cocoa/</link>
		<comments>http://mabblog.com/blog/2011/11/macruby-deployment-lion-cocoa/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 17:56:58 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=475</guid>
		<description><![CDATA[After reading the official MacRuby docs on deployment, I read over this guide. Although the deployment build seemed to be working fine on my local machine when I dropped it on my laptop with a standard Lion install it crashed, claiming that there was an defined constant – but that constant was a class. How [...]]]></description>
			<content:encoded><![CDATA[<p>After reading the official MacRuby docs on deployment, I read over <a href="http://redwoodapp.posterous.com/macruby-and-xcode-4-build-a-self-contained-ma" target="_blank">this guide</a>. Although the deployment build seemed to be working fine on my local machine when I dropped it on my laptop with a standard Lion install it crashed, claiming that there was an defined constant – but that constant was a class. How could it be undefined if it ran fine locally?</p>
<p>Looking into it a bit more the class that was undefined was being used as a superclass for another ruby class. Taking a look at rb_main.rb revealed that there is no specific load order. Since the load order was undefined, the class requiring the other ruby class as a superclass was being loaded before the superclass was loaded. I ended up tweaking the rb_main.rb file to allow for a manual load order, followed by the standard automatic load.</p>
<div class="codecolorer-container ruby dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;"># Loading the Cocoa framework. If you need to load more frameworks, you can</span><br />
<span style="color:#008000; font-style:italic;"># do that here too.</span><br />
framework <span style="color:#996600;">'Cocoa'</span><br />
<br />
<span style="color:#008000; font-style:italic;"># Loading all the Ruby project files.</span><br />
<br />
<span style="color:#008000; font-style:italic;"># manual load allows up to specify the load order for some of the classes</span><br />
manualLoad = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;VTiTunesHeader&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><br />
<span style="color:#9966CC; font-weight:bold;">for</span> file <span style="color:#9966CC; font-weight:bold;">in</span> manualLoad<br />
<span style="color:#CC0066; font-weight:bold;">require</span> file<br />
<span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
manualLoad <span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">basename</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span>, <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">extname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
<br />
<span style="color:#008000; font-style:italic;"># Auto load the direct of the files in the dir</span><br />
dir_path = NSBundle.<span style="color:#9900CC;">mainBundle</span>.<span style="color:#9900CC;">resourcePath</span><br />
<span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">glob</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#40;</span>dir_path, <span style="color:#996600;">'*.{rb,rbo}'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">map</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">basename</span><span style="color:#006600; font-weight:bold;">&#40;</span>x, <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">extname</span><span style="color:#006600; font-weight:bold;">&#40;</span>x<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>.<span style="color:#9900CC;">uniq</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>path<span style="color:#006600; font-weight:bold;">|</span><br />
<span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#9966CC; font-weight:bold;">not</span> manualLoad.<span style="color:#9966CC; font-weight:bold;">include</span>? path<br />
<span style="color:#CC0066; font-weight:bold;">require</span><span style="color:#006600; font-weight:bold;">&#40;</span>path<span style="color:#006600; font-weight:bold;">&#41;</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
<span style="color:#008000; font-style:italic;"># Starting the Cocoa main loop.</span><br />
NSApplicationMain<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">0</span>, <span style="color:#0000FF; font-weight:bold;">nil</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></div>
<p>You can grab the gist <a href="https://gist.github.com/1331293" target="_blank">here.</a></p>
<h2>Cocoa Resources</h2>
<p>Some Cocoa libraries / snippet repos that I found during my latest dev session.</p>
<ul>
<li><a href="https://github.com/jrc/Cocoa-Snippets" target="_blank">jrc&#8217;s Cocoa Snippets</a></li>
<li><a href="https://github.com/johnezang/JSONKit">JSON Kit</a> – awesome objc JSON library</li>
<li><a href="http://cocoaobjects.com/" target="_blank">Cocoa Objects</a> – useful index of pluggable Cocoa code</li>
<li><a href="https://github.com/AlanQuatermain/aqtoolkit" target="_blank">AQToolkit</a> &#8211; great collection of useful pluggable categories / classes. Contains useful NSFileManager category for managing temporary files.</li>
<li><a href="https://gist.github.com/972328" target="_blank">NSString category</a> for generating a query string from a NSDictionary</li>
<li><a href="http://allseeing-i.com/ASIHTTPRequest/" target="_blank">ASIHTTPRequest</a> &#8211; comprehensive HTTP request library</li>
</ul>
<h2>Random Tidbits</h2>
<ul>
<li>Although old news to most, you can grab the the last n <em>bytes </em>of a file using tail -c. Very useful for cutting down on the size of large text log files.</li>
<li>I pulled the build versioning code out from a project I was working on. Take a look at this <a href="https://gist.github.com/1326457">build numbering gist</a>, provides source to pull version number from git or svn and write it in your Info.plist</li>
<li>The Ruby <a href="http://logging.rubyforge.org/" target="_blank">logging</a> class is more robust than the Log4r class and the built in logger class.</li>
<li>attr_accessor :variable makes a instance variable Key Value Coding compliant. Just set @variable in your initializer.</li>
<li>Awesome <a href="http://hyperpolyglot.org/scripting#getter-setter" target="_blank">side-by-side reference</a> sheet for PHP, Ruby, Perl, and Python. Handy reference to python to ruby conversion.</li>
<li><a href="https://gist.github.com/974340" target="_blank">Obj-c blocks in MacRuby</a></li>
<li>Although you can `macgem install json`, macruby comes with a json library built in that seems to have tweaks for deployment. Don&#8217;t install the json gem</li>
<li>The Open3 Ruby library does not return subprocess status correctly when using MacRuby</li>
<li><a href="http://ofps.oreilly.com/titles/9781449380373/index.html" target="_blank">Online version</a> of &#8220;MacRuby: The Definitive Guide&#8221;</li>
<li>PyObjc on Lion is <a href="http://stackoverflow.com/questions/5843508/pyobjc-on-xcode-4" target="_blank">dead</a>. Although you might get an application to run, there are so many bugs it really isn&#8217;t usable for production</li>
<li>Although macrubyd exists, it doesn&#8217;t seem to work with full-fledged Cocoa + MacRuby apps. <a href="http://stackoverflow.com/questions/5757536/use-macruby-debugger-in-xcode" target="_blank">There isn&#8217;t any Xcode integration</a>. Ruby-Debug also doesn&#8217;t seem to be compatible with MacRuby. Bottom line: no strong debugging tools for MacRuby&#8230; yet.</li>
<li>The &#8220;throw your dotfiles on github&#8221; trend has been an interested <a href="https://github.com/iloveitaly/dotfiles" target="_blank">learning experience</a> for me</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2011/11/macruby-deployment-lion-cocoa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextMate 2 Alpha Before Christmas</title>
		<link>http://mabblog.com/blog/2011/09/textmate-2-alpha-before-christmas/</link>
		<comments>http://mabblog.com/blog/2011/09/textmate-2-alpha-before-christmas/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 23:47:49 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=468</guid>
		<description><![CDATA[Just saw this on the macromates twitter today: @kylefox It does however work better in 2.0 provided soft-wrap is on, there will be a public alpha before Christmas. I&#8217;ve been a long time TextMate user anxiously awaiting a new version (Allan did such a great job with V1, I&#8217;m curious to see what he will [...]]]></description>
			<content:encoded><![CDATA[<p>Just saw this on the <a href="https://twitter.com/#!/macromates/status/117734542005116928">macromates twitter today</a>:</p>
<blockquote><p>@kylefox It does however work better in 2.0 provided soft-wrap is on, there will be a public alpha before Christmas.</p></blockquote>
<p>I&#8217;ve been a long time TextMate user anxiously awaiting a new version (Allan did such a great job with V1, I&#8217;m curious to see what he will come up with for V2).</p>
<p>Couple new TextMate related links / things I&#8217;ve found recently:</p>
<ul>
<li><a href="https://github.com/textmate" target="_blank">TextMate GitHub profile</a> &#8211; Although the SVN repos are mentioned + linked to in the official wiki, this is where you can find the latest updated bundles</li>
<li><a href="http://ethanschoonover.com/solarized" target="_blank">Solarize Theme</a> &#8211; Great theme for</li>
<li><a href="https://github.com/kneath/github_textmate_preview" target="_blank">GitHub MarkDown Preview</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2011/09/textmate-2-alpha-before-christmas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lion, SMTP Postfix Relay, and Dreamhost</title>
		<link>http://mabblog.com/blog/2011/09/lion-smtp-postfix-relay-and-dreamhost/</link>
		<comments>http://mabblog.com/blog/2011/09/lion-smtp-postfix-relay-and-dreamhost/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 14:54:38 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=461</guid>
		<description><![CDATA[When developing web-apps locally it is useful to have a fully functional smtp server to test automated emails associated with your application. Many times the network you are developing on will not allow you to simply start up postfix and and run your own local smtp server. However, this doesn&#8217;t imply that you can&#8217;t use [...]]]></description>
			<content:encoded><![CDATA[<p>When developing web-apps locally it is useful to have a fully functional smtp server to test automated emails associated with your application. Many times the network you are developing on will not allow you to simply start up postfix and and run your own local smtp server. However, this doesn&#8217;t imply that you can&#8217;t use postfix – modifying postfix to relay all outgoing mail to an external / offsite smtp server that you have control of will enable you to develop &amp; test the parts of your application that require a local outgoing smtp server without an issue.</p>
<p>Many times port 25 (the default smtp port) will be blocked somewhere along the line in your network connection. You can figure out if your network configuration or ISP is blocking port 25 by running</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">telnet smtp.server.com 25.</div></div>
<p>Edit <strong>/etc/postfix/main.cf</strong></p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">relayhost = [mail.domain.com]:587<br />
smtp_sasl_auth_enable = yes<br />
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd<br />
smtp_sasl_security_options = noanonymous<br />
smtp_use_tls = yes</div></div>
<p>Create/edit /etc/postfix/sasl_passwd</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[mail.domain.com]:587 username@domain.com:password</div></div>
<p>Run this command in your shell once the above two files are created/modified:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo chmod 600 /etc/postfix/sasl_passwd<br />
sudo postmap /etc/postfix/sasl_passwd<br />
sudo launchctl stop org.postfix.master<br />
sudo launchctl start org.postfix.master<br />
<br />
# test postfix, cmd+d after typing message content to send message<br />
mail -s &quot;Testing, Testing&quot; you@domain.com</div></div>
<h2>References:</h2>
<ul>
<li><a href="http://wiki.debian.org/Postfix" target="_blank">Debian Postfix Docs</a></li>
<li><a href="http://www.zulius.com/how-to/set-up-postfix-with-a-remote-smtp-relay-host/" target="_blank">Remote SMTP on Linux</a></li>
<li><a href="http://bensbits.com/blog/2005/09/06/postfix_smtp_auth_support_for_relayhost/" target="_blank">Postfix SMTP Auth Support for Relayhost</a></li>
<li><a href="http://wiki.dreamhost.com/Port_25_Blocking" target="_blank">Port 25 Blocking</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2011/09/lion-smtp-postfix-relay-and-dreamhost/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Part 2: Thoughts on Buzzmarketing</title>
		<link>http://mabblog.com/blog/2011/03/part-2-thoughts-on-buzzmarketing/</link>
		<comments>http://mabblog.com/blog/2011/03/part-2-thoughts-on-buzzmarketing/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:21:41 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=389</guid>
		<description><![CDATA[Empowered Interactivity A while ago I read an article on the lessons to learn from the DropBox marketing model. After reading the chapter on empowered interactivity I immediately recalled that article and how incentivizing referals increased signups by something like 60%. People generally want to share what is useful to them, and they really want [...]]]></description>
			<content:encoded><![CDATA[<h2>Empowered Interactivity</h2>
<p>A while ago I <a href="http://blog.hubspot.com/blog/tabid/6307/bid/5956/5-Viral-Marketing-Lessons-From-Dropbox.aspx" target="_blank">read an article</a> on the lessons to learn from the DropBox marketing model. After reading the chapter on empowered interactivity I immediately recalled that article and how incentivizing referals increased signups by something like 60%. People generally want to share what is useful to them, and they <em>really</em> want to share something if it can benefit them in someway. When thinking of what the word &#8216;benefit&#8217; (or more specifically, economic incentive) means to a given person I immediately think of the RSA Animate video about <a href="http://www.youtube.com/watch?v=u6XAPnuFjJc" target="_blank">what motivates us</a> and the example they give about Wikipedia: experienced professions and academics who could easily use hours spend researching and writing Wikipedia articles working for sizable monetary reward instead choose to work for free. Why? Because it is satisfying: there is a social currency that one receives when achieving something that a community of persons respects and affirms. This is why the FAQ model that Stackoverflow employs works so well (although the model has changed a bit since they tied site reputation to the ability to interact with the Careers site).  This is why monetary referrals without social recognition don&#8217;t <em>always</em> work so well.</p>
<h2>Secrecy</h2>
<p>These couple lines rung true with a couple recent products / marketing efforts I&#8217;ve seen:</p>
<blockquote><p>Secrets are currency. Revealing a secret is a definite conversation starter&#8230; Limit those in the know of a secret, those not in the know want the currency of knowing – they want to be part of the exclusive circle. (Buzzmarketing, P.37)</p></blockquote>
<p><a href="http://pushpoppress.com/" target="_blank">Push Pop Press</a> immediately came to mind while reading this. They haven&#8217;t released anything yet, they have only demoed the product to a <a href="http://daringfireball.net/2011/02/push_pop_press" target="_blank">select</a> <a href="http://networkeffect.allthingsd.com/20110303/bubbli-push-pop-press-and-bluefin-delight-at-ted/" target="_blank">few</a>, and there are no publicly available demo videos. They are near 6,000 followers on twitter and really haven&#8217;t put any money into marketing their product. I&#8217;m interested in what they are coming out with, and I&#8217;m sure many others are too. They are definitely playing the secrecy card correctly. The MacHeist bundle was successful because of exclusivity and secrecy that they built up around the bundle. Apple (obviously) does this with almost all their product releases. Gmail did this with the invite system when gmail originally launched. Being in the know is attractive, and people will &#8216;spread the word&#8217; if they know something others don&#8217;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2011/03/part-2-thoughts-on-buzzmarketing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Buzzmarketing</title>
		<link>http://mabblog.com/blog/2011/03/thoughts-on-buzzmarketing/</link>
		<comments>http://mabblog.com/blog/2011/03/thoughts-on-buzzmarketing/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 15:22:46 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=378</guid>
		<description><![CDATA[I&#8217;m currently reading Buzzmarketing by Mark Hughes, a book about word-of-mouth advertising. I&#8217;m only about a 1/4 way through the book but as I&#8217;m reading through the book I keep comparing the ideas that he is presenting to experiences in my own life in order to understand the practical application of his ideas. I&#8217;m not [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently reading <a href="http://www.amazon.com/Buzzmarketing-People-Talk-About-Stuff/dp/1591840929" target="_blank">Buzzmarketing</a> by Mark Hughes, a book about word-of-mouth advertising. I&#8217;m only about a 1/4 way through the book but as I&#8217;m reading through the book I keep comparing the ideas that he is presenting to experiences in my own life in order to understand the practical application of his ideas. I&#8217;m not a marketer by trade, this book is the first step in my goal to achieve a better understanding of marketing methods (especially marketing via social networking channels).</p>
<p>The two key concepts I&#8217;ve pulled from the first section of the book are: 1) the human desire of having something worthy of the interest of others 2) the effectiveness of creating a &#8216;pre-packaged conversation&#8217; that people <em>want </em>to share with others. As I was reflecting on these two key concepts I&#8217;ve thought of a couple examples which show how these concepts play out in the &#8216;real world&#8217;.</p>
<h3>The &#8216;Bed Intruder&#8217; Song</h3>
<p>The <a href="http://www.youtube.com/watch?v=hMtZfW2z9dw" target="_blank">bed intruder song</a>, virtually overnight, became the funniest <a href="http://www.npr.org/blogs/thetwo-way/2010/12/13/132027922/-bed-intruder-song-tops-youtube-s-most-watched-list-in-2010" target="_blank">most watched</a> &#8220;have you see this?&#8221; video on YouTube pushing the song to the top 100 chart in iTunes. This video definitely pressed the &#8216;hilarious button&#8217; that Mark talks about in his book.</p>
<h3>Failed Door-to-Door Marketing</h3>
<p><a href="http://www.openrangecomm.com" target="_blank">Open Range</a> is a new internet service being rolled out in the town I&#8217;m currently living in. I don&#8217;t know much about the service other than it is lest costly than the standard cable + internet combo offered by Comcast. There is a door-to-door marketing effort going on in our neighborhood. I don&#8217;t like door-to-door marketers, I don&#8217;t want to talk to them and avoid conversation if at all possible. Mark recounts a story about a car company that used a &#8216;moose button&#8217; to start the conversation between store employees and customers about a new brake product / sale. Each employee had a big button with the image of a moose pinned to their shirt. Something wierd or different that inspires <em>the customer </em><strong>not </strong>the sales person to start the conversation. If this open range salesman had something interesting or weird to attract me to him I probably would of asked him what was going on, instead he approached me with the classic boring line &#8220;Have you heard of open range?&#8221;.</p>
<p>Having something worth sharing makes you feel as though you have some sort of unique worth, giving others this worth or &#8216;buzz currency&#8217; in a way that is connected to what you are marketing seems to be the key to effective social / word-of-mouth marketing. The interesting thing about this marketing model is it preys on the insecurity of the human race, it assumes that people want to be noticed and approved of by others.</p>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2011/03/thoughts-on-buzzmarketing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Economic Analysis &amp; The App Store</title>
		<link>http://mabblog.com/blog/2010/09/economic-analysis-the-app-store/</link>
		<comments>http://mabblog.com/blog/2010/09/economic-analysis-the-app-store/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 20:42:02 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=365</guid>
		<description><![CDATA[I read two articles &#8211; the app bubble and bad news about iphone economics &#8211; which surprised me a bit. Their analysis, which doesn&#8217;t account for gain in human capital and the value of lock-in (or alternatively the cost of switching), seems to posit that the App Store is bad for everyone. I could be completely [...]]]></description>
			<content:encoded><![CDATA[<p>I read two articles &#8211; <a href="http://www.fastcompany.com/1684020/the-great-app-bubble">the app bubble</a> and <a href="http://communities-dominate.blogs.com/brands/2010/06/full-analysis-of-iphone-economics-its-bad-news-and-then-it-gets-worse.html">bad news about iphone economics</a> &#8211; which surprised me a bit.</p>
<p>Their analysis, which doesn&#8217;t account for gain in <a href="http://en.wikipedia.org/wiki/Human_capital" target="_blank">human capital</a> and the <a href="http://en.wikipedia.org/wiki/Vendor_lock-in" target="_blank">value of lock-in</a> (or alternatively the <a href="http://en.wikipedia.org/wiki/Switching_barriers" target="_blank">cost of switching</a>), seems to posit that the App Store is bad for everyone. I could be completely misevaluating the arguments presented, but I believe that if you dig into the arguments presented significant benefits are not being accounted for.</p>
<h2>Apple is Paid to Advertise</h2>
<blockquote><p><strong>Apps aren&#8217;t very profitable for Apple either.</strong> According to <a href="http://www.appleinsider.com/articles/10/01/26/app_store_wildly_successful_but_not_hugely_profitable_for_apple.html">Apple Insider</a>, &#8220;Apple has long maintained that the App Store isn&#8217;t meant to be a profit generator, as much as a means of attracting customers to the iPhone and iPod touch.&#8221; The <a href="http://www.appleinsider.com/articles/10/06/23/19_of_software_on_apples_app_store_is_paid_with_1_49_average_price.html">App Store&#8217;s gross profits</a> amount to just 1 percent of Apple&#8217;s total gross profits.</p></blockquote>
<p>If something is a &#8216;means of attracting customers&#8217; then it is a valuable asset, a marketing tool. Even if Apple were losing money running the App Store they would still continue to operate the store because it is incredible marketing tool. The fact is that Apple is <em>being paid to advertise the iOS platform.</em> There is alot of time and money being pumped into advertising individual iOS applications and the more those applications are being designed and developed vendor lock-in takes place which is <em>extremely valuable </em>(vendor lock-in is what makes Microsoft so valuable, valuable enough that <a href="http://daringfireball.net/linked/2010/08/19/intel-mcafee" target="_blank">Intel just bet 7.68 billion</a> on a more-or-less Microsoft specific technology). Many smaller companies have to choose between the iOS platform and the Android phone (it really isn&#8217;t a platform&#8230; yet) and most &#8211; in my opinion &#8211; are choosing the iPhone. Every application that is released on the App Store increases the marketing value of the App Store.</p>
<h2>iOS Apps Keep Customers Happy</h2>
<p>The decision to adopt a technology sometimes depends on whether or not your current hardware will support it. This is why <a href="http://www.squarespace.com/iphone" target="_blank">Square Space</a> developed an iOS app &#8211; it keeps customers happy and helps future customers more easily make the choice to using Square Space. Additionally, developing an App Store application to tie in with your product prevents a second-mover from jumping into the uncaptured market and pulling customers into a separate service which integrates with your free / paid iOS application (ex: some sort of Square Space competitor).</p>
<h2>Experience is Valuable</h2>
<p>Developers don&#8217;t develop open source applications such as <a href="http://seashore.sourceforge.net/The_Seashore_Project/About.html" target="_blank">Seashore</a>, <a href="http://www.sequelpro.com/" target="_blank">Sequel Pro</a>, and <a href="http://www.sequelpro.com/" target="_blank">Adium</a> for profit. Open source applications are developed for the experience and for the gratification that comes with knowing you are the master of something (<a href="http://www.youtube.com/watch?v=A3oIiH7BLmg" target="_blank">this video</a> has some thought provoking ideas about the reason people spend time on tasks which do not result in a direct monetary gain). Developers are more valuable when they can bring an idea from conception to release and when they can prove their ability to quickly master new technologies. Having an iOS application published on the App Store gives concrete evidence to an employer that an employee has those skills &#8211; it is a <a href="http://en.wikipedia.org/wiki/Screening_(economics)" target="_blank">screening device</a>. Yes, an individual developer may not make a profit on an app they developed, but if it allows them to earn 20% over the next 5 years then there is most definitely a net gain.</p>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2010/09/economic-analysis-the-app-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppleScript Tips &amp; Tricks</title>
		<link>http://mabblog.com/blog/2010/07/applescript-tips-tricks/</link>
		<comments>http://mabblog.com/blog/2010/07/applescript-tips-tricks/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 20:14:03 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mabblog.com/blog/?p=332</guid>
		<description><![CDATA[I&#8217;ve done a fair amount of applescript work (mostly automation &#38; UI scripting related projects) over the last couple months and &#8211; although very frustrating &#8211; applescript can allow you to achieve some incredible automation tasks. I&#8217;ve compiled a disjointed lists of tips, tricks, and source code that some trying to wade through applescript (specifically [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve done a fair amount of applescript work (mostly automation &amp; UI scripting related projects) over the last couple months and &#8211; although very frustrating &#8211; applescript can allow you to achieve some incredible automation tasks. I&#8217;ve compiled a disjointed lists of tips, tricks, and source code that some trying to wade through applescript (specifically ui scripting which can be especially tricky) might find useful.</p>
<h2>Enable Access for Assistive Devices</h2>
<div class="codecolorer-container applescript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Events&quot;</span><br />
<span style="color: #ff0033; font-weight: bold;">set</span> UI elements enabled <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">true</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></div></div>
<h2>When &#8220;set value of text field&#8221; Won&#8217;t Work</h2>
<div class="codecolorer-container applescript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">set</span> value <span style="color: #ff0033; font-weight: bold;">of</span> attribute <span style="color: #009900;">&quot;AXValue&quot;</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">text</span> field <span style="color: #000000;">1</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;String&quot;</span></div></div>
<h2>How To Iterate Through Rows in a Table</h2>
<div class="codecolorer-container applescript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">with</span> r <span style="color: #ff0033; font-weight: bold;">in</span> rows <span style="color: #ff0033; font-weight: bold;">of</span> table <span style="color: #000000;">1</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">window</span> <span style="color: #000000;">1</span><br />
log r<br />
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span></div></div>
<h2>Retrieve Every UI Element Available in a Window</h2>
<div class="codecolorer-container applescript dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Events&quot;</span><br />
<span style="color: #ff0033; font-weight: bold;">tell</span> process <span style="color: #009900;">&quot;Process Name&quot;</span><br />
<span style="color: #ff0033; font-weight: bold;">set</span> visible <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">true</span><br />
<span style="color: #ff0033; font-weight: bold;">return</span> <span style="color: #ff0033;">every</span> UI element <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #ff0033;">front</span> <span style="color: #0066ff;">window</span><br />
<span style="color: #ff0033; font-weight: bold;">return</span> <span style="color: #0066ff;">name</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #ff0033;">every</span> UI element <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #ff0033;">front</span> <span style="color: #0066ff;">window</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></div></div>
<h2>Get a List of the Children of a UI Element</h2>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">return value of attribute &quot;AXChildren&quot; of UI element 1</div></div>
<h2>Create / Update / Connect Network Preferences VPN Services</h2>
<p>Although since OS X 10.5 we have been given better applescript access to network preference settings, it still isn&#8217;t possible to create / update services / interfaces through applescript. With some tricky UI scripting and the help of the <a href="http://developer.apple.com/mac/library/samplecode/UIElementInspector/Introduction/Intro.html" target="_blank">UI Element Inspector</a> (or the advanced <a href="http://pfiddlesoft.com/uibrowser/" target="_blank">UI Browser</a>) it is possible to create and update VPN service information. I also wrote a couple functions that allow you to check the existence of a VPN service and the connection status. You can check out the source code <a href="http://gist.github.com/462760" target="_blank">here</a>. Note that although the code is VPN service specific it wouldn&#8217;t be terribly hard to modify the code for use in automating the creation of aiport, ethernet, etc services.</p>
<h2>Take a Screenshot of a SWF</h2>
<p>This is a bit more complex that one would expect. Because the Flash Player isn&#8217;t built using cocoa it doesn&#8217;t support alot of native applescript methods and getting a screenshot of the actual content (not containing the title bar!) of the swf is actually pretty challenging. The script will take a screenshot of <em>only the content</em> of the actual swf. This is useful if you have a flash app that has loadable swf components that the user should be able to preview through a thumbnail. Coupling <a href="http://gist.github.com/399121" target="_blank">the script</a> with the following bash script allows you to easily generate thumbnails for all the swfs in the specified directory.</p>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> normalize_path<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
<span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #ff0000;">&quot;NORMALIZED_PATH=$1&quot;</span><br />
<span style="color: #007800;">NORMALIZED_PATH</span>=<span style="color: #000000; font-weight: bold;">`</span>php <span style="color: #660033;">-r</span> <span style="color: #ff0000;">&quot;echo realpath('<span style="color: #007800;">$NORMALIZED_PATH</span>');&quot;</span><span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">find</span> ..<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>swfdirectory <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.swf&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> line; <span style="color: #000000; font-weight: bold;">do</span><br />
<span style="color: #666666; font-style: italic;"># remove the relative reference</span><br />
normalize_path <span style="color: #ff0000;">&quot;<span style="color: #007800;">$line</span>&quot;</span><br />
<span style="color: #007800;">line</span>=<span style="color: #007800;">$NORMALIZED_PATH</span><br />
<br />
<span style="color: #666666; font-style: italic;"># open the flas</span><br />
open <span style="color: #660033;">-a</span> <span style="color: #ff0000;">&quot;Flash Player&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$line</span>&quot;</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span><br />
<br />
<span style="color: #007800;">thumbnailPath</span>=<span style="color: #800000;">${line/.swf/.jpg}</span><br />
osascript slide_preview.scpt <span style="color: #ff0000;">&quot;<span style="color: #007800;">$thumbnailPath</span>&quot;</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">killall</span> <span style="color: #ff0000;">&quot;Flash Player&quot;</span><br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></div></div>
<h2>Other Applescript Code Snippets:</h2>
<ul>
<li><a href="http://snipplr.com/view/36666/quit-application-by-process-name/" target="_blank">Quit Application by Process Name</a></li>
<li><a href="http://snipplr.com/view/15606/xcode-build-and-run-using-applescript/" target="_blank">XCode Build &amp; Run</a></li>
<li><a href="http://snipplr.com/view/36665/toggle-vpn-connection/" target="_blank">Toggle First VPN Connection in Network Preferences</a></li>
<li><a href="http://snipplr.com/view/24208/os-x-mail-mark-as-replied/" target="_blank">Mark Selected Message as Replied</a></li>
</ul>
<h2>Helpful Applescript Articles</h2>
<ul>
<li><a href="http://aurelio.net/doc/as4pp.html" target="_blank">Applescript for Python Programmers</a></li>
<li><a href="http://www.mactech.com/articles/mactech/Vol.22/22.03/AdvAppleScript/index.html" target="_blank">Details on Applescript Variable Types</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mabblog.com/blog/2010/07/applescript-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

