Performing a ‘like’ match in MongoDB

Posted by & filed under Development.

So looking through the Doctrine ODM docs on Query Building, I didn’t see anything that lent itself to a like query such as that is found in MySQL. There isn’t a like, option, but using Regular Expressions will work just fine for me. $queryBuilder->field(’title’)->equals(new \MongoRegex(’/keyword/i’)); That will perform a case-insensative query for the term ‘keyword‘… Read more »

Thoughts on Zend Framework & Doctrine 2 Design

Posted by & filed under Development.

I usually structure my Zend Framework projects like the image on the right. This comes almost straight from the ZF documentation for recommended project structures http://framework.zend.com/manual/en/project-structure.project.html I’ve been stressing using PHPunit more and more in my projects and endevour to include tests for all my classes. When you are connected to a DB, it’s harder to… Read more »

The continuing Saga of Lion

Posted by & filed under Development.

Should you upgrade to OS X Lion??? Meh…. it’s presented more problems than previous upgrades.

Maybe I should have waited until 10.7.1, so this is my punishment for being bleeding edge.

Another issue I saw was the continual nag when I opened some apps (Billings and Cyberduck) that “This program was downloaded from the Internet… blah blah blah” This normally happens once for a program then goes away after you say “OK”, but this was happening everytime I opened those two programs.

The solution.


sudo xattr -d com.apple.quarantine /Applications/Billings.app

This shut the bugger up.

Resources
https://discussions.apple.com/message/6930135#6930135

Unlocking iPhone 2G for Apple Firmware 3.1.2

Posted by & filed under Development.

Here are some instructions for unlocking the Apple iPhone 2G model with firmware version 3.1.2. I ran into a few problems, but having unlocked dozens of these from day one, I’ve yet to brick one.

  1. Download the firmware version from apple. You want the 3.1.2 version 250MB
  2. Connect the phone to iTunes
  3. Hold down the OPTION button and click the “Restore” button. This will prompt you for a firmware file, located the file you just downloaded
  4. Sometimes the upgrade gives an error message after its done, I’ve yet to have a problem so you can safely ignore it if you get one.
  5. Download blackra1n by geohot
  6. Unzip and run blackra1n with the iPHone plugged into the computer. It only takes a minute and after it reboots the iPhone will be jailbroken with a new app on the springboard
    IMG_0202.PNG
  7. Run blackra1n on the iPhone and install Cydia
  8. Run Cydia… it will update it self several times, you just want graphical mode and essential updates
  9. When this is done you’ll want to install BootNeuter using Cydia

    BootNeuter2.png

  10. Run the BootNeuter app and you’ll see this screen, then click ‘flash’. When I performed this, the phone seemed to freeze. I tried rebooting the phone, but it became 100% unresponsive. After 5 minutes it rebooted and it seems it worked.

    bootneuter.png

Italic fonts in Firefox Interface [solved]

Posted by & filed under Development.

A coworker had this problem. After installing a plugin-update, the fonts on her Firefox interface were all italic. We combed over the preferences to no avail, then a simple Google search revealed the answer.

  1. Open Font Book
  2. Find Lucida Grand Regular
  3. Right Click > Reveal in Finder
  4. Delete it. AAHHHHH!!!! Yes, I’m sure, delete it,
  5. Witness the true power of a fully operational Mac Station, it suddenly recreates the font for you. Amazing

Now of course you need to restart Firefox, and everything was cool.

Credit:

Rebuilding the iPhoto library

Posted by & filed under Development.

The number of photos I have in iPhoto is around 10,000. I like the new faces feature, but it just kept grinding my CPU for hours and hours and days and days. I stumbled on a way to rebuild the iPhoto library, but it’s really hidden and I’ve never run across this type of a setup from Apple Software.

Essentially you need to hold down Option + Command while starting iPhoto and keep them held down until you get a window asking you what you want to rebuild. Interesting.

Time Machine Network Backup

Posted by & filed under Development.

Fate has not blessed you with a tower of money such as Uncle Scrooge, so a Time Capsule is not an option, but you have a network share either at work or home you can. Enter the Time machine hack that will let you backup your Mac to a network share.

Pros

  • No need to plug in an external drive to your Macbook Pro
  • You can back up multiple computers to the same file server
  • Utilize the power of Wifi

Cons

Color Picker Application for Apple Mac OS X

Posted by & filed under Development, Drupal.

To create websites and graphics being able to pick colors is important. Many times you see a great color and you want to sample and get the [HEX](http://en.wikipedia.org/wiki/Web_colors#Hex_triplet “Web colors – Wikipedia, the free encyclopedia”) number of the color to use. In the past I’ve used the [ColorZilla](http://www.iosart.com/firefox/colorzilla/ “ColorZilla Extension for Firefox and Mozilla”) extension for [Firefox](http://www.mozilla.com/firefox/ “Firefox web browser | Faster, more secure, & customizable”).