Upgrading My Dev Box To PHP 5.4

First I tried recompiling, which I had done in the past to install mcrypt but this time it didn’t turn out pretty. I had all types of issues and after going down the google brick road for a few hours I resorted to MacPorts. That turned out better, but certain things we’re acting up (PDO socket connection to remote hosts via Laravel, if your curious).

So I partitioned a section of my harddrive, called it MAMP, and reinstalled snow leopard. Then I added xcode and MAMP PRO and now I’m golden! Not only can I choose between PHP 5.3 and 5.4 it also comes with a shiny control panel! I feel like the kid who’s never been to a restaurant and goes out to a steakhouse.

Installing xcode and mamp pro on snow leopard partition

Adobe Photoshop CS6 Mac OSX Snow Leopard

Adobe Photoshop CS6 Mac OSX “Snow Leopard”

Installing Homebrew for all your OSX command line goods

Getting your source on is a whole lot easier when using a package manager, for linux you might use Yum or APT, but on OSX Homebrew is my goto. It’s super easy to install, but to get full benefits and access to more software you will need to have an install disc or have the developer tools already installed. If you don’t you can download it from apple. Google it or comment if you need to know what I’m talking about.

Installing Homebrew on OSX in the Terminal

Installing Homebrew takes 5 seconds

Here’s how you install Homebrew:

ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)

of course using ruby is awesome, because it's installed by default on everyone's machine and has read write. Also notice that it's not using wget, which you won't have on a clean install w/out the dev tools. Underneath brew is pretty much an alias to GIT with some cool ruby helpers.

Once you have brew installed you can do things like:

brew install mongodb

My Favorite OSX Software

My first computer was the black pismo laptop, with the removable and interswappable batteries and CD-RW drives, it actually looks remarkably similar to my current MacBook. Soon I was using AOL to connect to the internet through our home phone and downloading scenarios and mods for my then favorite computer game, Command & Conquer. Over the years I have seen software evolve, many trends emerge, and ideas radically change the way software was not only used, but created as well. Anyways, what you’ve all been waiting for, my favorite OSX software!

Billings

The best looking invoicing solution I have ever witnessed. This app is full featured and works very well for a freelance contract worker. It supports multiple currencies, tax rates, gas milage, invoicing, statements, time tracking, and more. If you want to keep records of your billing with a breathtaking UI and workflow, it’s hard to beat Billings.

FileMaker Pro

My mom would be happy to know that I am including FileMaker Pro. She developed software using FileMaker for many years and introduced me into the world of programming and database design. FileMaker is a solid foundation for any type of business software you could imagine.

Sequel Pro

I used to use phpmyadmin, until I discovered Sequel Pro. Now I view my MySQL databases in a native cocoa app that is very thoughtfully designed and full featured. If your a web designer or developer I would not wait any longer, and just download it. You will thank me I am sure. Oh you really want to thank me? How about following me on twitter and finding something you really can’t resist retweeting.

TextMate

My favorite text editor for many years, even though I switched to Sublime Text 2, I recently reverted back to TextMate. The clean UI, lightning fast performance, and the huge array of helpers and tools called Bundles, it’s hard to beat. And ST2 has an ugly icon, and I can’t have an ugly icon in my dock.

Terminal

The only app included in my list that is a preinstalled app, the Terminal is the window into the system that powers your computer. It is based on unix and your terminal is by default a bash shell, so any commands that work on *nix bash should probably maybe work on your mac. It took me a long time to start using command line for common tasks, but now that I do it is a huge timesaver. Take for instance the common task of navigating to a specific file. Instead of 5 clicks and the time spent waiting for the UI to render, I type open /where/I/want/to/go and I’m there. It’s also the place where I can run…

GIT

If your not using version control or backing your stuff up, your not a professional. While using version control is not essential to building software, it definitely can save you and your teammates a lot of time and hassle and more importantly save you from a serious loss of data. Using GIT alone is not enough however, you need to backup your repo’s remotely, and I recommend BeanstalkApp for just that.

OSX Screenshot Utility Shortcuts & Hacks

Mac users have native screen capturing abilities through hotkeys or the Grab utility, underneath these are based off the screencapture software that ships with OSX.

If your like me you take multiple screenshots a day. Over the years I have collected a few helpful tricks that I would like to share with you.

Basic Commands:

Save full screen to a file:             ⌘ ⇧ 3                                         
Save selection to a file*               ⌘ ⇧ 4 + Click + Drag                      
Save selected window  to file           ⌘ ⇧ 4 + Spacebar + Click Camera               

Save full screen to clipboard           ⌘ ⇧ 3 + Ctrl:                                 
Save selection to clipboard*            ⌘ ⇧ 4 + Click + Drag + Ctrl:                  
Save window to clipboard                ⌘ ⇧ 4 + Spacebar + Ctrl + Click Camera        

*The following keys can be held down while selecting an area:

Spacebar, to lock the size of the selected region and move it with the mouse
Shift, lock either the width or height of the selected region
Option, to resize the selected region with its center as the anchor point

Going under the hood

We can change some defaults used by screencapture easily through the terminal by entering these commands.

# Save screenshots to a new location (My personal choice included)
defaults write com.apple.screencapture location ~/Pictures/Screenshots/

# Save screenshots in new format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"

# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true

# To enable any changes you must enter this
killall SystemUIServer

More command line geekery

You can take advantage of screencapture directly from the terminal as well, here are some commands to get you started.

# Take a screenshot and store it the current terminal directory
screencapture example.jpg

# You can change the place to store the file like so
screencapture ~/Desktop/screenshot.jpg

# The -x removes the shutter sound while the screenshot is taken
screencapture ~/Desktop/screenshot.jpg -x

# -h stands for help and will show you all the available options
screencapture -h

Have a lot of screenshots piling up?

This shell script will take your files, back them up, and then organize them into folders by day. Don’t know how to use a shell script? Your in luck, I just wrote a nice tutorial on creating and running your first shell script. Know a lot about shell scripting? Help me make this code better.

tar -czf backup.tar.gz *

for f in *; do
    dir=$(stat -f%SB -t%Y-%m-%d "$f")
    echo $f '->' $dir
    [ -d "$dir" ] || mkdir "$dir"
    mv "$f" "$dir"/
done

Once installed and named cleanup you can run the shell script via terminal like so:

cd ~/Pictures/Screenshots/
cleanup

5 widely unknown Mac OS X features.

Aside

Not My DeskI love Apple computers, they are in my opinion the best quality materials with the best Operating System. Based on unix, Mac OSX has tons of features, is very secure, and is intuitive and easy to use. But their are so many options and configurations it is easy to get lost or simple overlook some pretty cool features. I will keep adding more to this list so feel free to bookmark it or add it to your favorite social site using the Sharing link above.

  1. Make your mouse scrolling wheel slower
  2. Sometimes while reading a large article on a website you use your mouse scroll wheel which goes way past your spot and you have to search to get back to the place you left off. It is a pain and can ruin your concentration and train of thought. Some mice come with software to adjust the tracking and scrolling speed, but usually they only run on Windoze!

    Well, Apple thought of that and if you hold command (apple) while scrolling the page will go much slower than the default speed.

  3. Zoom into anything
  4. Apple has a really cool feature which allows you to zoom into anything with just a few keystrokes. It is a great way to get full screen video on sources that don’t allow it (I am looking at you, Quicktime Non-Pro).

    Simultaneously press Command (Apple) + Option (Alt) + 8 to toggle zooming on and off; Then to zoom in use Command (Apple) and Option (Alt) and = (the equal and + sign) to zoom out use Command (Apple) and Option (Alt) and - (the minus and hyphen sign)

  5. Make your mac a web server
  6. This was one of my favorite things before I had purchased hosting. This allows you to use all the power of the Apache Web Server to host html, css, and images to others through the internet. Install MAMP for PHP and MySQL and you have a functional development server.

    Go to System Preferences and Choose Sharing. Then turn on Personal Web Sharing.

  7. Quickly find files
  8. What used to be Command + F (Find), then Sherlock, has turned into spotlight. Spotlight is great at finding stuff (if you have a powerful computer if not, turn it off since it is a memory hog. But what if I don’t want to search through every folder or scroll all the way to the top right?

    Go to System Preferences and Choose Spotlight. From there you can choose which folders spotlight will search through by default. You can also create your own keystroke commands to highlight the Spotlight search field or bring up a Search box. They default as Command and Space or Command and Option and Space, accordingly.

  9. Make animations slow motion
  10. This is not so much as useful as it is cool, but is definitely one of my favorite features and sure to impress people who do not own a mac. You can see this in action in a movie with all the cool effects.

    Hold shift while minimizing windows, collapsing or expanding a stack from the dock, or anything else that is animated in OSX. Leave comments if you find any cool ones I may have overlooked.

10 OS X Terminal Commands

Aside

I was trying to flush my DNS cache on my apple since my host rerouted the IP address and found this page in the process: ten-os-x-command-line-utilities-you-might-not-know.

My favorite ones on the list are definately TOP & screencapture, however I never knew about lipo or say.  Screencapture is definately useful for taking screenshots of my websites to email to clients.

Source:

Go to OSX Daily Website

Go to OSX Daily Website