The Udacity iOS Development Nanodegree

I started auditing the first course in the Udacity Swift/iOS Nanodegree to get a feel for the concept, because I like the Nanodegree pitch: Leading technology companies design and teach Nanodegree programs with our help, and also endorse them. They know what technical skills they need to hire for and which new skills their employees need.1 The tone is very different than just college course that has been made available online (like the Stanford CS193P course).

BSD Resources for New Users

Yesterday, Digital Ocean launched support for FreeBSD on their cloud platform. They also launched a lot of FreeBSD content on their tutorials website, including a seven-part series that starts with A Comparative Introduction to FreeBSD for Linux Users. If you want to play around with FreeBSD locally, I suggest trying out PC-BSD, which is a distribution that makes FreeBSD more friendly to new desktop users (like what Ubuntu did for Debian).

Automation instead of Documentation when Provisioning Servers

Chef and Puppet each have a bit of a learning curve, and if you only need to provision a few servers, you might think the effort to learn either isn’t worth it. You can get far with just writing down your provisioning steps, manually executing them, imaging the resulting server and using that image as the basis for your testing, staging, production and failover. Besides, now you know that these environments are exactly the same, because they are from the same image.

How to create a bootable flash drive on OS X

On OS X, a few built-in terminal commands can be used to create a bootable flash drive from an ISO disk image (like a that of a Linux distro) instead of installing new software to get the job done. Preparing the flash drive diskutil is the command-line interface version of Disk Utility.app. After connecting a flash drive, a list of all available disk drives on the Mac can be viewed with the following command:

Big Ruby Conf 2014 Notes

Confreaks now has the Big Ruby 2014 videos available for viewing. Harry Potter and the Legacy Codebase is a good watch. “Think of working with legacy code like an archaeologist.” Testing the untestable Start with testing as though code is in a black box Heroku managed this by actually just git push/deploy/build to test build packs heroku run bash will put you in a terminal on your dyno If heroku can deploy 6 times and have at least 1 passing test suite, they consider it successful Heroku test speeds went from 5 minutes per test suite to 44 tests in 12 minutes.

Fixing 404 Errors in Apache and Nginx

I have reorganized the structure of this website so all blog posts are now under the /posts directory, leaving the root clean for other pages or groups of content (maybe photos). While the amount of content on this website is meager, there might be a few broken links due to the restructuring, and I wanted to quickly go over how to fix potential 404 “Not Found” errors in Apache and Nginx by redirecting an old url to a new one.

PHP Composer on OS X Mountain Lion

OS X 10.8 has PHP 5.3 installed with CLI support by default, so there isn’t any extra installation needed for Composer, a dependency manager for PHP, to be installed globally on a Mac. However, trying to install it via the guides results in an error. #!/usr/bin/env php Some settings on your machine make Composer unable to work properly. Make sure that you fix the issues listed below and run this script again: The detect_unicode setting must be disabled.

Serving PHP with Nginx on Ubuntu

Note: This was written for Ubuntu 12.04 and PHP 5. For PHP developers, the ideal stack is: Linux, Apache, MySQL and PHP (a LAMP server). However, being a Ruby developer, I tend to prefer Nginx over Apache – as well as Postgres over MySQL, but that’s another post. Nginx is gaining against IIS and Apache because it’s very good at being a web server and using less resources to do its job.

Command-line Tricks

I’m a fan of doing work in the terminal. Here are about a dozen one-liners that I keep around. Files and directories Change DOS line endings to Unix line endings find . -type f -exec dos2unix {} \; Note: on Ubuntu install with apt-get install dos2unix or on OS X with brew install dos2unix for the above command. Change the permissions on files to 644 find . -type f -exec chmod 644 {} \; Change the permissions on sub directories to 755

Server Foundation for Ubuntu LTS

This is a guide roughly outlining how I would manually setup and configure a server after the first boot up. I tend to go with Ubuntu 12.04 LTS since it will be supported longer than the current version (12.10) of Ubuntu. On first boot On the first login via SSH, change the password of the root user. passwd If mounting a separate disk/image as /home, edit /etc/fstab and add the home partition.