Recent Articles

MAMP + Xdebug + Lion

Aug 15, 2011   #mamp  #lion  #php  #xdebug 
In Part 1 of my MAMP + Lion series, I set up my MAMP installation so that I could use the included PECL installer. Then we installed OAuth. In Part 2, we installed MacPorts, then used PECL to install the ImageMagick “Imagick” extension. I decided to give you a breather and make this piece much simpler, so we’re going to install Xdebug. Originally this post was much longer since I didn’t think about checking for Xdebug until after I had already done a PECL install of the software. [Read more]

MAMP + ImageMagick + Lion

Aug 12, 2011   #MAMP  #Lion  #ImageMagick  #imagick  #php 
In Part 1 of my MAMP + Lion series, I set up my MAMP installation so that I could use the included PECL installer. In this piece, I am going to explain how to install the php imagick extension. It’s going to be a little more work, but it builds on the foundation established in part one. Install MacPorts To begin, I followed the advice given by Mike Leo @ Unreal Expectations on installing imagick on snow leopard. [Read more]

MAMP + OAuth + Lion

Aug 12, 2011   #oauth  #MAMP  #LION  #php 
I recently updated my MBP to Lion and decided that while I was upgrading applications, I might as well upgrade my MAMP to version 2.0.1. When installing MAMP 2, make sure to choose the appropriate install. Since this article focuses on Lion, you should just choose the 64 bit version. I had hesitated doing this in the past since there are some unusual steps I had to take in the past to set it up. [Read more]

Link: Filtering objects using annotations

Aug 11, 2011   #doctrine  #symfony2  #php  #annotation 
[Using annotations] is a very nice and clean way of handling validation, it allows all rules to be centered on the entities, making maintenance easy. A nice complement is that constraints can be added to the class so they use more then one variable, as well as allowing you to create your own contraints. » Doctrine and Symfony has opened my eyes to the power of annotations. Check out Rafael’s example of his filter class. [Read more]

Link: Not able to login to sftp server using key pair

Aug 9, 2011   #sftp  #phpstorm 
» Found this nugget after updating my EC2 instance and still being unable to log in via SFTP with PhpStorm.

Link: Uploading Personal SSH Keys to Amazon EC2

Aug 9, 2011   #ssh  #aws  #ec2  #ssh keys 
Amazon recently launched the ability to upload your own ssh public key to EC2 so that it can be passed to new instances when they are launched. Prior to this you always had to use an ssh keypair that was generated by Amazon. Ok, so it’s not recent any more, but it still seems pretty unknown. I use PhpStorm for my IDE and needed to have a private/public key in order to connect via SFTP. [Read more]

Link: Amazon EC2 Micro Instance and Stolen CPU

Aug 2, 2011   #ec2  #steal time 
What I’ve discovered is that when you tax the CPU more than a few seconds, you get throttled back almost to a standstill. I put together a brief video where I demonstrate this happening. In this video, I run a simple script that makes repeated calls to sysbench to tax the CPU for 2 seconds. After it runs for a few times, you’ll see an immediate and severe reduction in performance and you’ll see the steal time go to over 97% leaving very little left to run my job. [Read more]

Link: Read-After-Write Consistency in Amazon S3

Jul 28, 2011   #aws  #s3 
The engineering challenges in providing read-after-write consistency in a smaller geographical area are greatly magnified when that area is expanded. The fundamental physical limitation is the speed of light, which takes at least 16 milliseconds to cross the US coast-to-coast ( that’s in a vacuum – it takes at least four times as long over the internet due to the latency introduced by routers and switches along the way). [Read more]

Link: Apple is forcing a worse user experience on its customers

Jul 26, 2011   #ios subscriptions 
Now, Apple device owners will have to figure out on their own that they need to go to Amazon’s website in their Safari browser to buy stuff to read with their Kindle app. This is a worse customer experience. Apple’s devices are now slightly harder and clumsier to use. And it’s Apple’s fault. » Not sure what the right answer is here. On the one hand, I prefer being able to manage my subscriptions via iTunes. [Read more]

Link: Deleting object properties in Javascript

Jul 22, 2011   #php  #javascript 
I was looking for the proper way to delete an object property in Javascript and came upon this nice example. I figured it was worth sharing. I’ve also included a similar way of handling it in PHP. var obj = {asdf:''foo'',bar:''baz''}; obj.asdf = undefined; for ( var i in obj ) { console.log(i,obj[i]); } // outputs: // asdf undefined // bar baz var obj = {asdf:''foo'',bar:''baz''}; delete obj.asdf; for ( var i in obj ) { console. [Read more]