<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>A web consulting and development company focused on LAMP technologies</description><title>Thoom Technologies</title><generator>Tumblr (3.0; @thoomtech)</generator><link>http://thoomtech.com/</link><item><title>"We are happy to confirm that Android Studio, the new IDE for Android development that Google is..."</title><description>“We are happy to confirm that Android Studio, the new IDE for Android development that Google is developing in cooperation with JetBrains, is based on the IntelliJ Platform and the existing functionality of IntelliJ IDEA Community Edition.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://blog.jetbrains.com/blog/2013/05/15/intellij-idea-is-the-base-for-android-studio-the-new-ide-for-android-developers/?utm_source=JetBrains%20Newsletter&amp;utm_campaign=73211b94cc-2013_May&amp;utm_medium=email&amp;utm_term=0_ce1be48b56-73211b94cc-8165437"&gt;IntelliJ IDEA is the base for Android Studio, the new IDE for Android developers | JetBrains Company Blog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;JetBrains is one of the best developer tools companies out there IMO. I have happily paid for PHPStorm and RubyMine out of my own pocket as the apps are just worth it.&lt;/p&gt;
&lt;p&gt;Congrats to the JetBrains team and Android developers everywhere. You no longer have to use Eclipse!&lt;/p&gt;&lt;/em&gt;</description><link>http://thoomtech.com/post/50580641174</link><guid>http://thoomtech.com/post/50580641174</guid><pubDate>Thu, 16 May 2013 09:32:09 -0600</pubDate><category>jetbrains</category><category>android</category><category>development</category></item><item><title>"The problem comes from the fact that the new Ruby 1.9 installation doesn’t find the certification..."</title><description>“The problem comes from the fact that the new Ruby 1.9 installation doesn’t find the certification authority certificates (CA Certs) used to verify the authenticity of secured web servers.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://martinottenwaelter.fr/2010/12/ruby19-and-the-ssl-error/"&gt;Ruby 1.9 and the SSL error « Martin Ottenwaelter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If using Homebrew instead of port:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;brew install curl-ca-bundle
&lt;/pre&gt;&lt;/em&gt;</description><link>http://thoomtech.com/post/50559548505</link><guid>http://thoomtech.com/post/50559548505</guid><pubDate>Wed, 15 May 2013 23:29:00 -0600</pubDate><category>ssl</category><category>mac os x</category><category>ruby</category><category>homebrew</category></item><item><title>PHP is meant to die, continued</title><description>&lt;p&gt;&lt;a class="tumblr_blog" href="http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued"&gt;software-gunslinger&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: PHP is still a poor choice for continually-running processes. See &lt;a href="/post/47131406821/php-is-meant-to-die"&gt;this post&lt;/a&gt; for context. Read on for more proof.&lt;/p&gt;
&lt;p&gt;There’s been some reaction to the &lt;a href="/post/47131406821/php-is-meant-to-die"&gt;previous entry&lt;/a&gt;. Some people &lt;a href="https://twitter.com/search/realtime?q=http%3A%2F%2Fsoftware-gunslinger.tumblr.com%2Fpost%2F47131406821%2Fphp-is-meant-to-die"&gt;agreed&lt;/a&gt;, mostly seasoned PHP folks, some others &lt;a href="/r/programming/comments/1bor6q/php_is_meant_to_die/"&gt;just didn’t&lt;/a&gt;. Yeah, apparently it pleased or infuriated more than two folks in the entire Internet.&lt;/p&gt;
&lt;p&gt;First and foremost, &lt;a href="http://www.reddit.com/r/programming/comments/1bor6q/php_is_meant_to_die/c98unmf"&gt;a correction&lt;/a&gt; to previous statements: PHP’s 5.3+ enables garbage collection &lt;a href="http://php.net/manual/en/info.configuration.php"&gt;by default&lt;/a&gt;, it’s an opt-out feature, not opt-in. So it’s probably enabled in all your scripts, even the fast-dying ones, if your PHP version is recent enough and you didn’t do anything funny to your &lt;em&gt;php.ini&lt;/em&gt; file.&lt;/p&gt;
&lt;p&gt;Yes, I already acknowledged that PHP has a garbage collection implementation starting 5.3.0 and up (opt-in or opt-out, that’s not the problem). I also acknowledge that garbage collection works, and is able to take care of most &lt;em&gt;circular references&lt;/em&gt; just fine. However, if you’re one of the many that think “hey, no one should be using anything below PHP 5.4 nowadays”, you’re clearly &lt;strong&gt;too young to remember how much blood, sweat and &lt;em&gt;years&lt;/em&gt; it took to get rid of PHP 4&lt;/strong&gt;, even when PHP 5.0 was reaching end-of-life, 5.1 was healthy, and 5.2 was already in the works.&lt;/p&gt;
&lt;p&gt;Anyway, as previously stated too, garbage collection is a great thing, but not enough for PHP. It’s a borrowed feature that does not play well with old fundamental decisions inherited from the original design. &lt;strong&gt;Garbage collection is not a magical solution for every problem, like many tried to argue about.&lt;/strong&gt; Let’s illustrate with another example.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued"&gt;Read More&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Very interesting read. PHP dying at the end of every request is a feature of the language, but can lead to some problems if you want to use it for long-running processes.&lt;/p&gt;</description><link>http://thoomtech.com/post/48937089967</link><guid>http://thoomtech.com/post/48937089967</guid><pubDate>Fri, 26 Apr 2013 10:53:02 -0600</pubDate></item><item><title>Created a new server today. Continuing my Doctor Who theme, this...</title><description>&lt;img src="http://24.media.tumblr.com/06074a206f40c2d076a67f2a6f7113d1/tumblr_mliwzafOyZ1qlpktoo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Created a new server today. Continuing my Doctor Who theme, this time I have a Dalek. EXTERRRRRMINAAAATE.&lt;/p&gt;</description><link>http://thoomtech.com/post/48386883942</link><guid>http://thoomtech.com/post/48386883942</guid><pubDate>Fri, 19 Apr 2013 16:25:58 -0600</pubDate><category>doctor who</category><category>dalek</category><category>ascii art</category><category>nerd</category></item><item><title>Deployment projects</title><description>&lt;p&gt;Recently, I&amp;#8217;ve been looking at various deployment strategies. I&amp;#8217;ve spent a lot of my career doing some configuration management, mostly out of necessity where I&amp;#8217;ve been the lead developer on a small team. Over the years, I&amp;#8217;ve written several deployment scripts. For employers, they&amp;#8217;ve always been built on top of SVN and Fabric. Since I didn&amp;#8217;t want to use SVN for my personal projects but was familiar with Fabric, this morphed into a project called &lt;a href="http://github.com/thoom/fabox" title="Fabox"&gt;Fabox&lt;/a&gt;, which used Dropbox as a VCS, and Fabric as the CLI to deploy the code. I&amp;#8217;ve &lt;a href="http://thoomtech.com/post/15688195221/using-dropbox-as-a-vcs-and-in-deployment" title="Fabox Deployment"&gt;talked&lt;/a&gt; about Fabox before. I used it for awhile but it was too involved for my simple personal projects (Fabric was overkill for my single-server environment). I&amp;#8217;ve also soured a bit on Dropbox lately, since their customer support has been completely non-existent.&lt;/p&gt;
&lt;p&gt;After Fabox, I wrote a PHP-based deployment server called &lt;a href="https://github.com/thoom/giply-server" title="Giply"&gt;Giply&lt;/a&gt;. It is built on top of Git, and utilizes a common feature with popular Git hosting services Github and Bitbucket where you can POST a payload to a URL. As a web service, Giply consumes these payloads and updates the Git repo automatically.&lt;/p&gt;
&lt;p&gt;I took the concepts I learned while writing Giply and vastly improved it with &lt;a href="https://github.com/thoom/ripple" title="Ripple"&gt;Ripple&lt;/a&gt;. Ripple is built in Ruby and includes basic authentication support, easy restoration to previous deployments, and a full featured CLI. It includes a web service like Giply, but it can also be completely managed through the console script.&lt;/p&gt;
&lt;p&gt;Since I&amp;#8217;ve begun using Ruby for all of my personal projects, I find it really great. Obviously if you don&amp;#8217;t have your server environment set up for hosting Ruby (specifically Sinatra), it would probably be a more complicated setup than you&amp;#8217;d want. This is the only area where Giply excels. Giply is dead simple to use in a server environment if you have a LAMP stack already created.&lt;/p&gt;
&lt;p&gt;There are obviously many other ways to deploy code. Ripple has worked for me in my single-server, no fuss environment. When I want to update the server code, I just push to my Bitbucket repo which POSTs to the Ripple URL I set up in Bitbucket and the rest is handled automatically. It will update projects written in any language, but I&amp;#8217;ve added hooks for Bundler in Ruby and Composer in PHP since I use both in my side projects.&lt;/p&gt;
&lt;p&gt;For multiple-server environments, there are many options. If you want your scripts written in a particular language, you have several popular options: &lt;a href="http://fabfile.org" title="Fabfile"&gt;Fabric&lt;/a&gt; (Python), &lt;a href="https://github.com/capistrano/capistrano" title="Capistrano"&gt;Capistrano&lt;/a&gt; (Ruby), and &lt;a href="http://www.phing.info" title="Phing"&gt;Phing&lt;/a&gt; (PHP). These projects all work using SSH to connect to the servers they manage. I&amp;#8217;ve personally used Fabric the most, and wouldn&amp;#8217;t touch Phing unless I was paid to. Since I love Ruby, I want to try Capistrano but haven&amp;#8217;t had the need.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re interested in any of these deployment projects, they&amp;#8217;re in my &lt;a href="https://github.com/thoom"&gt;Github&lt;/a&gt;. Feel free to use them in your own projects.&lt;/p&gt;</description><link>http://thoomtech.com/post/48049120028</link><guid>http://thoomtech.com/post/48049120028</guid><pubDate>Mon, 15 Apr 2013 11:01:05 -0600</pubDate><category>deployment</category><category>php</category><category>ruby</category><category>fabric</category><category>python</category><category>fabox</category><category>ripple</category><category>giply</category></item><item><title>Setting up correct permissions for VirtualBox shared folders</title><description>&lt;p&gt;With the launch of Mountain Lion and after suffering a hard drive failure, I decided to investigate other options for my local development environment than using MAMP. MAMP has served me well over the years, but considering the number of visitors to my MAMP + Lion tutorials, it&amp;#8217;s obviously not as easy to use as a LAMP server.&lt;/p&gt;
&lt;p&gt;Virtual machines are great. I know many people that use commercial products like Parallels and VMWare Fusion to run Windows instances alongside their OS X environments. I&amp;#8217;m not here today to compare the various products, just know that for me, the open source VirtualBox more than adequately fills my need.&lt;/p&gt;
&lt;p&gt;After discussing my VM desires with some other developers I work with, I discovered that Shared Folders were the killer feature I needed.&lt;/p&gt;
&lt;p&gt;Shared folders allow me to take my ~/Sites directory and map it to the /var/www directory on my LAMP-based VM. For the most part this has worked well for me. Obviously, though if all was well, I wouldn&amp;#8217;t be writing this post.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve got some code that generates cached templates. With some recent changes I made to an underlying templating engine I&amp;#8217;m working on, the engine always creates cached files, but if you are in a development environment (or debug state), it will just overwrite the files with every request.&lt;/p&gt;
&lt;p&gt;This led to a problem where the permissions of my mounted folder prevented me from writing these critical files to the shared folder. I got to a point where I could create the file the first time, but the template could not overwrite the file on subsequent saves.&lt;/p&gt;
&lt;p&gt;Doing some searching led to a &lt;a href="http://askubuntu.com/questions/123025/what-is-the-correct-way-to-share-directories-in-mac-and-ubuntu-with-correct-perm" target="_blank"&gt;post&lt;/a&gt; on the ubuntu stack exchange, which led me to the correct solution. It&amp;#8217;s different enough (at least for my setup) that I wanted to chronicle the changes I made.&lt;/p&gt;
&lt;p&gt;Since I am mounting a folder that needs to be written to by my Apache user, I needed to set up the mounted point so that it mounts being owned by &lt;em&gt;www-data&lt;/em&gt;. To find this information, on the VM command line, I typed:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;$ id www-data&lt;/pre&gt;
&lt;p&gt;This returns the &lt;em&gt;gid&lt;/em&gt; and &lt;em&gt;uid&lt;/em&gt; of 33 for my VM. Using this information, I was able to update my rc.local file so that the line I use to automatically mount my shared folder reads:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;sudo mount -t  vboxsf -o umask=002,gid=33,uid=33 www /var/www&lt;/pre&gt;
&lt;p&gt;After doing a reboot, the shared folder now mounts using www-data as the owner. Now I can write and overwrite to my cached folder without problems!&lt;/p&gt;
&lt;p&gt;I may write up an overall how-to on setting up a headless LAMP VM with VirtualBox, but that&amp;#8217;ll be for another time.&lt;/p&gt;</description><link>http://thoomtech.com/post/33445547579</link><guid>http://thoomtech.com/post/33445547579</guid><pubDate>Fri, 12 Oct 2012 14:08:31 -0600</pubDate><category>VirtualBox</category><category>OS X</category><category>permissions</category><category>development</category></item><item><title>You know you’re a nerd when you:
Have your own linux...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_m9zyazmv2r1qlpktoo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;You know you’re a nerd when you:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Have your own linux server&lt;/li&gt;
&lt;li&gt;Name that server after a nerdy cultural icon like Doctor Who&lt;/li&gt;
&lt;li&gt;Take the laborious process of updating your Ubuntu MOTD so that you can have awesome TARDIS ASCII art greet you whenever you SSH&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;And yes, that’s me.&lt;/p&gt;</description><link>http://thoomtech.com/post/31072874468</link><guid>http://thoomtech.com/post/31072874468</guid><pubDate>Fri, 07 Sep 2012 14:30:00 -0600</pubDate><category>TARDIS</category><category>ASCII ART</category><category>doctor who</category></item><item><title>Packages: The Way Forward for PHP</title><description>&lt;a href="http://philsturgeon.co.uk/blog/2012/03/packages-the-way-forward-for-php"&gt;Packages: The Way Forward for PHP&lt;/a&gt;: &lt;p&gt;» Great article articulating what I’ve experienced recently.&lt;/p&gt;
&lt;p&gt;Having played around with Composer lately, I’ve gone from a &lt;em&gt;meh&lt;/em&gt; to a &lt;em&gt;This is frickin’ awesome&lt;/em&gt; mentality. For my new projects, I’m building them around Composer for managing my dependencies and autoloading.&lt;/p&gt;</description><link>http://thoomtech.com/post/21407705011</link><guid>http://thoomtech.com/post/21407705011</guid><pubDate>Thu, 19 Apr 2012 18:12:54 -0600</pubDate><category>php</category><category>packagist</category><category>composer</category></item><item><title>"Modern MVC web frameworks often involve a lot of boilerplate code just to support the primary client..."</title><description>“Modern MVC web frameworks often involve a lot of boilerplate code just to support the primary client type of User Agents. This boilerplate code typically does little to help with supporting the other client types of Admin Processes and Unit Tests. As a result of the overhead introduced by this extra boilerplate code, developers often find themselves creating Fat Controllers (a side-effect of The MVC Paradox). Controllers take on too many responsibilities, both vertically and horizontally. Vertically, Controllers start to handle domain logic that should be pushed down to the Model layer. Horizontally, multiple concerns get stuffed into a handful of Controllers. These different horizontal concerns should be separated out into multiple Controllers (the Single Responsibility Principle). The overhead introduced by modern MVC web frameworks leads directly to these problems.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://bradley-holt.com/2012/04/the-mvc-paradox/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:%20bradley-holt%20(Bradley%20Holt)"&gt;The MVC Paradox – Bradley Holt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;» This article is a great read and something I’ve been pondering myself recently. The author references the &lt;a href="http://www.slimframework.com/"&gt;Slim micro framework&lt;/a&gt; which, at least from a cursory glance, is very similar to &lt;a href="http://silex.sensiolabs.org/"&gt;Silex&lt;/a&gt;. I love Silex for the same reasons he mentions Slim:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There is very little boilerplate code involved in handling a User Agent’s request. Minting and handling new routes is incredibly simple. Placing your entire front-end application layer in one file may seem absurd at first. However, it has the nice side-effect of making it painfully obvious if you start to handle domain logic outside of your Model layer or if one route is doing too many things.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I’d recommend checking out these micro-frameworks. Silex has opened my eyes to a new way of designing web applications and services. Where Zend Framework has complexity, Silex offers simplicity.&lt;/p&gt;&lt;/em&gt;</description><link>http://thoomtech.com/post/20539289871</link><guid>http://thoomtech.com/post/20539289871</guid><pubDate>Thu, 05 Apr 2012 13:14:00 -0600</pubDate><category>micro frameworks</category><category>mvc paradox</category><category>silex</category><category>slim</category><category>php</category></item><item><title>"Today I ran into a problem where my PHP Application would throw this fatal error:

Fatal error:..."</title><description>“&lt;p&gt;Today I ran into a problem where my PHP Application would throw this fatal error:&lt;/p&gt;

&lt;p&gt;Fatal error: Exception thrown without a stack frame in Unknown on line 0&lt;/p&gt;

&lt;p&gt;… After a few minutes I found the problem: I had a class that would save itself to the Session, and that class also had a __sleep method which is invoked on serialization.&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://www.justincarmony.com/blog/2012/03/23/php-sessions-__sleep-and-exceptions/comment-page-1/#comment-49638"&gt;PHP, Sessions, __sleep, and Exceptions | Justin Carmony&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I had a similar problem not too long ago. My solution was to call:&lt;/p&gt;
&lt;pre class="brush:php"&gt;register_shutdown_function('session_write_close');&lt;/pre&gt;
&lt;p&gt;at the beginning of the bootstrap process.&lt;/p&gt;&lt;/em&gt;</description><link>http://thoomtech.com/post/19789424957</link><guid>http://thoomtech.com/post/19789424957</guid><pubDate>Fri, 23 Mar 2012 12:15:00 -0600</pubDate><category>php</category><category>serialize</category><category>session</category></item><item><title>"Google warned several developers in recent months that if they continued to use other payment..."</title><description>“Google warned several developers in recent months that if they continued to use other payment methods - such as PayPal, Zong and Boku - their apps would be removed from Android Market, now known as Google Play”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://www.reuters.com/article/2012/03/08/us-google-idUSBRE8271CJ20120308"&gt;Exclusive: Google leans on developers to use payment service | Reuters&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;» I’ve got conflicting feelings on this one. As a developer, I’ve encountered severe limitations dealing with Apple’s in-app offerings, especially as it relates to our subscription services. It’s been nice not having to worry about similar problems with Android, where we continue to use Paypal.&lt;/p&gt;
&lt;p&gt;If it becomes required to use Google Wallet, we’ll have to support Apple’s in-app subscription for iOS, Google Wallet for Google Play, Paypal for web, and ??? for Amazon Kindle.&lt;/p&gt;
&lt;p&gt;But on the other side, the consumer side, I like being able to easily purchase using my iTunes account. I am conflicted…&lt;/p&gt;&lt;/em&gt;</description><link>http://thoomtech.com/post/18995700192</link><guid>http://thoomtech.com/post/18995700192</guid><pubDate>Fri, 09 Mar 2012 01:48:00 -0700</pubDate><category>Google Wallet</category><category>Apple In-App</category></item><item><title>Depending on packages without composer.json in Composer (PHP dependency manager) | burgiblog</title><description>&lt;a href="http://burgiblog.com/2012/03/08/depending-on-packages-without-composer-json-in-composer-php-dependency-manager/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed: symfony/planet (symfony Blog Planet)"&gt;Depending on packages without composer.json in Composer (PHP dependency manager) | burgiblog&lt;/a&gt;: &lt;p&gt;» Great information for using &lt;a href="http://getcomposer.org/"&gt;Composer&lt;/a&gt; with repos that aren’t on Packagist. I look forward to when the composer is more stable and usable.&lt;/p&gt;</description><link>http://thoomtech.com/post/18965308297</link><guid>http://thoomtech.com/post/18965308297</guid><pubDate>Thu, 08 Mar 2012 15:06:25 -0700</pubDate><category>composer</category><category>packagist</category><category>dependency management</category></item><item><title>Using Dropbox as a VCS and in deployment</title><description>&lt;p&gt;I was working on some personal projects the other day, and I wanted to add my code to version control. I&amp;#8217;ve gotten so used to ensuring that my code is backed up (primarily using SVN) that it makes me nervous to only rely on Time Machine for my backups.&lt;/p&gt;
&lt;p&gt;While I was investigating free/cheap svn and git solutions (github was not an option because I don&amp;#8217;t want a public repo for this work), I realized that I had the perfect backup solution already: &lt;em&gt;Dropbox&lt;/em&gt;. I&amp;#8217;m sure I&amp;#8217;m like most people and have at least a free Dropbox account. If not feel free to get a free 2GB account using this &lt;a href="http://db.tt/MSfDXv9p"&gt;referral link and get an extra 250MB&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Why Dropbox?&lt;/h2&gt;
&lt;p&gt;Dropbox is a popular way to share files across computers and mobile devices. I have had an account for years and appreciate its simplicity. I have several other people that I share folders with and use it frequently to move files to my iPhone and iPad.&lt;/p&gt;
&lt;p&gt;What you may not know is that Dropbox comes standard with a 30 day version history. This means that every time you save a file, Dropbox will keep a copy of the old version available for you for a month. If you want, you can also upgrade your account to have unlimited version history but for most use cases I think 30 days is plenty.&lt;/p&gt;
&lt;p&gt;Since I&amp;#8217;m the primary or sole developer on many of my side projects, this simple versioning system was perfect for my needs. I don&amp;#8217;t anticipate needing anything like tags or branching, though honestly it wouldn&amp;#8217;t be hard to just create a copy of the code and stick it in another folder for a pseudo-tagging system. (See the deployment section for an example of how this might work).&lt;/p&gt;
&lt;h2&gt;Using Dropbox as a Deployment tool&lt;/h2&gt;
&lt;p&gt;After the initial idea of using Dropbox as a VCS, my thoughts went to using it as part of a deployment tool. One of my areas of expertise involves configuration management and deployment. Since most of the code I&amp;#8217;ve worked with used SVN, I&amp;#8217;ve written several deployment tools based on it. I figured that I could build a similar system with Dropbox and my favorite deployment tool: &lt;a href="http://fabfile.org"&gt;&lt;em&gt;Python&amp;#8217;s fabric&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Dropbox on the server&lt;/h3&gt;
&lt;p&gt;Setting up Dropbox on my server was pretty simple but required a little bit of preparation since I had very specific goals.&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Only sync specific folders&lt;/li&gt;
&lt;li&gt;Always have an up-to-date copy of code&lt;/li&gt;
&lt;/ol&gt;&lt;h4&gt;Enabling specific folders&lt;/h4&gt;
&lt;p&gt;There are a few ways to synchronize specific folders with Dropbox. The easiest way, and the way that I went is to create a new Dropbox account. Then I share the folders I want on the server with this new account.&lt;/p&gt;
&lt;p&gt;Now when I installed the Dropbox command line client, I attach it to this new account. The great thing with using a separate account is that I can use the account to store backups of my deployment bundles. This keeps the bundles out of personal Dropbox, but also allows me to potentially share the backups with other web servers.&lt;/p&gt;
&lt;h4&gt;Up-to-date code&lt;/h4&gt;
&lt;p&gt;Dropbox provides a nice python script to manage the daemon. If you are using Ubuntu, you can enable autostart simply:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;python dropbox.py autostart
&lt;/pre&gt;
&lt;p&gt;Using Amazon&amp;#8217;s Linux, you can use cron to enable the daemon on start. Just add the following to your user&amp;#8217;s crontab:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;@reboot $HOME/.dropbox-dist/dropboxd
&lt;/pre&gt;
&lt;h3&gt;Deployment tool&lt;/h3&gt;
&lt;p&gt;The deployment tool that we&amp;#8217;re going to build is based on Fabric. Since the set up right now is pretty basic, I&amp;#8217;m not using much of its power, but by building on top of it, I can extend it easily as I need.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Install fabric&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Since I&amp;#8217;m currently running on Amazon Linux, I&amp;#8217;ll explain what I did. Ubuntu/Debian installs will probably differ.&lt;/p&gt;
&lt;p&gt;To install fabric, we&amp;#8217;re going to use Python&amp;#8217;s &lt;strong&gt;easy_install&lt;/strong&gt;. We need to do the following:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;yum install gcc python-devel
easy_install fabric
&lt;/pre&gt;
&lt;h4&gt;Fabfile.py&lt;/h4&gt;
&lt;p&gt;We need to create a fabfile.py wherever we plan on running fabric. Since I am just creating a simple local deployment, I want my fabfile to do the following:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Present a list of web applications available for deployment&lt;/li&gt;
&lt;li&gt;Create a tar of the application I want deployed with a unique identifier&lt;/li&gt;
&lt;li&gt;Add the tarred files to my Dropbox server repo&lt;/li&gt;
&lt;li&gt;Present a list of tarred files available for deployment&lt;/li&gt;
&lt;li&gt;Create a backup of the existing code that is easy to rollback&lt;/li&gt;
&lt;li&gt;Move the tarred code to the correct location&lt;/li&gt;
&lt;li&gt;Perform application specific tasks&lt;ol&gt;&lt;li&gt;Warm-up any caches&lt;/li&gt;
&lt;li&gt;Create any symlinks&lt;/li&gt;
&lt;li&gt;Repair permissions&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;h4&gt;Deployment&lt;/h4&gt;
&lt;p&gt;Rather than explain all of the features of my fabfile, I&amp;#8217;ve posted it to my &lt;a href="https://github.com/thoom/fabox"&gt;github&lt;/a&gt; for download and tweaking. I&amp;#8217;ve tried to make it generic enough to where you can just put the file in your Dropbox user&amp;#8217;s home folder and run it.&lt;/p&gt;
&lt;p&gt;Any of your personal application options would go into the _deploy function.&lt;/p&gt;
&lt;p&gt;Deployments are pretty simple. It is currently a two step process:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;fab tag
fab prod deploy
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Tag&lt;/em&gt; will take the folder you want deployed and create a tarred gz file. &lt;em&gt;Deploy&lt;/em&gt; will take the tarred gz file and put it in the /var/www directory along with creating the backup, etc. There are a few other options available. just type&lt;/p&gt;
&lt;pre class="brush:bash"&gt;fab help
&lt;/pre&gt;
&lt;p&gt;to learn about any other options available.&lt;/p&gt;</description><link>http://thoomtech.com/post/15688195221</link><guid>http://thoomtech.com/post/15688195221</guid><pubDate>Wed, 11 Jan 2012 15:18:00 -0700</pubDate><category>dropbox</category><category>vcs</category><category>fabric</category><category>python</category><category>svn</category><category>git</category></item><item><title>MAMP + Intl + Lion</title><description>&lt;p&gt;Since I have started using Symfony2 on some projects I have been meaning to install the intl extension that Symfony recommends you install. I have tried several different methods, but believe that the one I listed below is &lt;a href="http://www.eperezdesigns.com/blog/web-development/php/install-php-extension-intl-on-osx-lion/"&gt;easier&lt;/a&gt; and makes less of a mess than &lt;a href="http://blog.geertvd.be/2011/05/18/installing-the-intl-extension-on-mamp/"&gt;others&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First, get the &lt;a href="http://site.icu-project.org/download/48#ICU4C-Download" title="ICU source"&gt;ICU libraries&lt;/a&gt;. Then expand them and build the library:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;tar xzvf icu4c-4_8_1_1-src.tgz
cd icu/source
./runConfigureICU MacOSX
make
sudo make install
&lt;/pre&gt;
&lt;p&gt;If you have followed from my &lt;a href="http://thoomtech.com/tagged/mamp" title="MAMP tutorials"&gt;previous steps&lt;/a&gt;, you should have the php headers installed in the standard MAMP directory. We need to go to the intl ext folder:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;cd /Applications/MAMP/bin/php/php5.3.6/include/php/ext/intl
&lt;/pre&gt;
&lt;p&gt;From here, let&amp;#8217;s build the intl.so file that we need to enable the extension:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;phpize
./configure --enable-intl
make
&lt;/pre&gt;
&lt;p&gt;Now we just need to copy the extension to the correct location and add an entry to our php.ini file:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;cp modules/intl.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/
echo "extension=intl.so" &amp;gt;&amp;gt; /Applications/MAMP/bin/php/php5.3.6/conf/php.ini
&lt;/pre&gt;
&lt;p&gt;Restart the MAMP servers and now you have the intl extension enabled!&lt;/p&gt;</description><link>http://thoomtech.com/post/15366294744</link><guid>http://thoomtech.com/post/15366294744</guid><pubDate>Thu, 05 Jan 2012 16:12:20 -0700</pubDate><category>mamp</category><category>symfony2</category><category>intl</category></item><item><title>Upgrading MAMP 2.0.x to MAMP 2.0.5</title><description>&lt;p&gt;In previous articles, I upgraded my computer to Lion and took the time to install MAMP 2. I discovered while using some Zend Framework components that prior to MAMP 2.0.2, there was a &lt;a href="http://forum.mamp.info/viewtopic.php?f=6&amp;amp;t=10846#p28292" title="Iconv Bug" target="_blank"&gt;bug&lt;/a&gt; with the iconv functions. This bug basically caused several pieces of the framework to timeout.&lt;/p&gt;
&lt;p&gt;I had unfortunately installed MAMP 2.0.1, so I needed to update to the newest version so that I could again develop ZF-based applications on my local environment.&lt;/p&gt;
&lt;p&gt;While following the &lt;a href="http://thoomtech.com/tagged/mamp" title="MAMP tutorials"&gt;previous MAMP tutorials I wrote&lt;/a&gt;, I realized that there are several changes to the default configuration that I needed to keep backups of so that I could make the same changes on the new version&amp;#8230; MAMP apparently just copies over the old directory completely, it doesn&amp;#8217;t make any intelligent updates (so you could lose VHOST, PHP, etc changes).&lt;/p&gt;
&lt;p&gt;I kept the following backups:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;/Applications/MAMP/conf/apache/httpd.conf&lt;/li&gt;
&lt;li&gt;/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf&lt;/li&gt;
&lt;li&gt;/Applications/MAMP/bin/php/php5.3.6/conf/php.ini&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;It was a decently easy upgrade all things considered, but remember to keep backups of your local changes!&lt;/p&gt;</description><link>http://thoomtech.com/post/15330336455</link><guid>http://thoomtech.com/post/15330336455</guid><pubDate>Wed, 04 Jan 2012 21:22:00 -0700</pubDate><category>mamp</category><category>php 5.3</category></item><item><title>‘fuser’ Using 100% CPU in Ubuntu 11.10 | Flynsarmy</title><description>&lt;a href="http://www.flynsarmy.com/2011/11/fuser-using-100-cpu-in-ubuntu-11-10/"&gt;‘fuser’ Using 100% CPU in Ubuntu 11.10 | Flynsarmy&lt;/a&gt;: &lt;p&gt;» I have several servers running on Ubuntu 11.10 and yet I only see this bug on one of the servers; on that server, I get the AWS CloudWatch messages at least once a day!&lt;/p&gt;
&lt;p&gt;Since the site was just a small one, I figured it’d be ok to go with the latest and greatest Ubuntu image. I’m really beginning to regret that decision!&lt;/p&gt;
&lt;p&gt;Combine this with an EC2 micro instance and you can easily take a site down once the micro instance starts to implement it’s steal time.&lt;/p&gt;</description><link>http://thoomtech.com/post/14627449571</link><guid>http://thoomtech.com/post/14627449571</guid><pubDate>Thu, 22 Dec 2011 12:30:00 -0700</pubDate><category>ubuntu 11.10</category><category>fuser cpu hogger</category></item><item><title>Hello world Facebook App Using Silex on Heroku</title><description>&lt;a href="http://test.ical.ly/2011/09/29/deploy-your-silex-and-twig-powered-facebook-app-using-git-onto-free-heroku-cloud-hosting/"&gt;Hello world Facebook App Using Silex on Heroku&lt;/a&gt;: &lt;p&gt;This is a slick and simple Hello World app built on the Facebook platform. Facebook is really lowering the bar to entry on building apps.&lt;/p&gt;</description><link>http://thoomtech.com/post/11289769335</link><guid>http://thoomtech.com/post/11289769335</guid><pubDate>Mon, 10 Oct 2011 16:20:42 -0600</pubDate><category>Facebook</category><category>heroku</category><category>silex</category></item><item><title>Using MySQL Workbench with MAMP « Internet Strategy Guide</title><description>&lt;a href="http://phpprotip.com/2011/10/using-mysql-workbench-with-mamp/"&gt;Using MySQL Workbench with MAMP « Internet Strategy Guide&lt;/a&gt;: &lt;p&gt;» I’ve been meaning to write a similar article. Now I won’t have to!&lt;/p&gt;</description><link>http://thoomtech.com/post/11143836292</link><guid>http://thoomtech.com/post/11143836292</guid><pubDate>Fri, 07 Oct 2011 10:48:37 -0600</pubDate><category>MAMP</category><category>MySQL Workbench</category></item><item><title>ps_files_cleanup_dir: opendir(/var/lib/php5) failed</title><description>&lt;a href="http://somethingemporium.com/2007/06/obscure-error-with-php5-on-debian-ubuntu-session-phpini-garbage"&gt;ps_files_cleanup_dir: opendir(/var/lib/php5) failed&lt;/a&gt;: &lt;p&gt;» I’ve seen this error occasionally, but recently it has caused me some grief, so I finally decided to look it up.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In Debian and Ubuntu, /var/lib/php5, where the session data is stored, has permissions of drwx-wx-wt and should only be cleaned by a cron script. So, the package maintainers disable automatic session garbage collection.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The article linked gives some great background, and the answer seems to be setting session.gc_probability = 0.&lt;/p&gt;</description><link>http://thoomtech.com/post/11107690606</link><guid>http://thoomtech.com/post/11107690606</guid><pubDate>Thu, 06 Oct 2011 13:10:00 -0600</pubDate><category>php</category><category>ubuntu</category></item><item><title>"To remove the exif data you need to call Imagick::stripImage() on the populated Imagick object and..."</title><description>“To remove the exif data you need to call Imagick::stripImage() on the populated Imagick object and then call Imagick::writeImage() to save your changes.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://blog.jmoz.co.uk/imagick-strip-exif-data"&gt;How to strip exif data using Imagick - James Morris - JMOZ&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;» If you need to resize an image, you can also use Imagick::resizeThumbnail to strip the exif data in one call!&lt;/p&gt;&lt;/em&gt;</description><link>http://thoomtech.com/post/9388702571</link><guid>http://thoomtech.com/post/9388702571</guid><pubDate>Thu, 25 Aug 2011 15:48:54 -0600</pubDate><category>php</category><category>imagick</category><category>strip exif</category></item></channel></rss>
