I write code.
This is really kind of amazing. Clearly stepping over the ‘journalism’ line to use illustrations of reality to sell papers. I’m glad choices like this were off limits when I worked there!
Breathtaking But Fake
Leading today’s Washington Post print edition (you remember those, don’t you?) is this beautiful photo by Bill O’Leary of the 14th Street bridge, accompanying coverage of the 30th anniversary of the Air Florida disaster. But competing for interest with the image itself is the lengthy explanation in the caption that what you see isn’t entirely real:
A jetliner flies high over a tranquil scene at the 14th Street bridge, where 30 years ago winter weather and human error conspired to bring down Air Florida Flight 90 in a disaster that claimed 78 lives. This image is a composite created by taking several photos and combining them with computer software to transcend the visual limitations of standard photography.
It’s not exactly moving the pyramids, and the disclosure is front and center, but does it bother you that this is going on in the mainstream press?
(via nprradiopictures)
Imagine is a nice looking image manipulation library for PHP 5.3+ that supports GD2, ImageMagick, and GraphicsMagick in a clean, chainable API from Bulat Shakirzyanov:
<?php $imagine = new Imagine\Gd\Imagine(); // or $imagine = new Imagine\Imagick\Imagine(); // or $imagine = new Imagine\Gmagick\Imagine(); $size = new Imagine\Image\Box(40, 40); $mode = Imagine\Image\ImageInterface::THUMBNAIL_INSET; // or $mode = Imagine\Image\ImageInterface::THUMBNAIL_OUTBOUND; $imagine->open('/path/to/large_image.jpg') ->thumbnail($size, $mode) ->save('/path/to/thumbnail.png') ;Check out the extremely detailed project docs and examples for advanced usage.
Every once in a while I come across someone who either doesn’t have a github account and/or doesn’t know how to use git but I still need a way to get files to them. The easy-for-me way is to just download the tarball using github’s handy download links in the repo, but after a while that will not work due to bloat. Nobody wants an email with a 20mb file attached ;)
The solution: git + diff + tar.
git diff —name-only 123abcd HEAD | tar -T - -cvjf changes.tar.bz2
where ‘123abcd’ is the revision id before you started your edits. Nice thing about this is it also maintains directory structure.
The Internet is rising up to oppose the Stop Online Piracy Act, which is just a noble name wrapped around a dangerous package. It’s an overreaching bill being pushed in the name of Homeland Security, even going so far as to target Mozilla specifically for refusing to comply with past requests.
Today is American Censorship Day, and it happens to coincide with a hearing in the U.S. House about this censorship bill. To raise awareness of the importance of stopping SOPA, Tumblr has artfully censored everyone’s blog dashboards and linked to a petition form at the top of the page under the heading, “Stop The Law That Will Censor The Internet!”
I would love to do this. I think i’m gonna have to give it a shot in the coming weeks. Maybe on a short week like thanksgiving.
This is here more for my own reference, but in the hopes it will help someone else.
For my dev environment I set up virtual hosts for each project/app/site I’m working on. I set them up using the domain for the site with a subdomain of ‘local’, eg local.example.com. In the past I would use something like example.local but have since found it to be problematic when integrating with APIs that need need a callback or return URL for some operations.
Pop open the main Apache conf file:
mate /usr/local/apache2/conf/httpd.conf
Uncomment the virtual host config file include:
# Virtual hosts Include conf/extra/httpd-vhosts.conf
Now to add your virtual hosts, open the vhost conf file:
mate /usr/local/apache2/conf/extra/httpd-vhosts.conf
Replace the contents with the following:
Lastly you’ll want to add an entry to your host file and restart apache:
sudo echo '127.0.0.1 local.example.com' >> /etc/hosts sudo apachectl restart
Fire up your browser and visit local.example.com and you should see your index page served!
How I installed Apache 2.2.20 with shared objects, SSL, Proxy, and Rewrite on OS X 10.6.8.
I am well aware OS X comes with Apache, but sometimes you just need to compile your own for security or other reasons. This is here more for my reference, but if it helps others then double win!
Prerequisites:
In terminal:
Pop open your browser and go to http://localhost and/or http://127.0.0.1 and you should see a page like the one below.

That’s it!
Optionally, you can setup Apache to autoload at startup by adding it to launchd: