Archive for the ‘ Tools ’ Category

Alternative to DigitalColor Meter in Lion (Updated)

Friday, October 14th, 2011

Update: With the release of 10.7.2, this issue is resolved. The Apple engineers have reverted the code back to its pre-Lion state complete with the ability to copy hex values.

Original post: Digital With the launch of Lion came the replacement of a little utility I use(d) every day, Apple’s DigitalColor Meter. This tool allowed (note tense) you to hover over any color visible on your screen and copy its corresponding hex value to your clipboard for use in your web development work.

With Lion, DigitalColor Meter’s ability to select hex values and copy them to the clipboard are both gone. This isn’t a bug; this was a deliberate choice by someone at Apple.  Why this person thought it was necessary to turn this decade old, one-trick-pony of a utility into, well, a hobbled old nag destined for the glue factory is beyond me.

Anyway, I’m never one to be deterred so I found a work-around.  It’s not perfect, but it’s working for now:

  1. Download and install this free extension to Apple’s built-in Color Picker from Waffle Software. You may need to reboot.
  2. Open AppleScript Editor
  3. Add simply, “choose color”
  4. Run it just to test.  The color picker should launch in stand-alone mode.
  5. Save your script as an application.
To add some extra sauce, set up this script as an Automator Service with a keyboard shortcut, or, like I do, trigger the newly created applet with a Quicksilver trigger.
Enjoy.
Sphere: Related Content

MySQL PHP Extension to Be Deprecated; Free MySQL->MySQLi Code Converter

Monday, September 19th, 2011

Heads up, developers: the PHP folks have announced their intention to deprecate the old MySQL database extension.

As they say, “Don’t panic.”  It’s not like MySQL-extension-based sites are suddenly going to start throwing exceptions; this is more a documentation change and a community education effort.

Going forward, the PHP team recommend two alternative extensions for new site development: pdo_mysql and mysqli, with PDO being the PHP way and main focus of future [PHP team] endeavors.

If you’re currently a Dreamweaver user or are just using the old MySQL extension out of habit, I developed a free tool in MyQuery Builder that will convert your existing code to both procedural or class-based MySQLi code, your choice.

Sign up for free and click on the Tools tab once you’re in to use the “MySQL->MySQLi Converter.”

Sphere: Related Content

MyQuery Builder in Chrome Web Store.

Tuesday, September 6th, 2011

MyQuery Builder logoGood news, everyone! MyQuery Builder is now available as an app in the Chrome Web Store. Once you install it, an icon will appear on your new tab and/or home screens. Click on that icon, and it takes you directly to the Query Builder (assuming you’ve signed up, etc.).

MyQuery Builder, if you don’t know, is a visual MySQL query editor and php code building tool designed for php web developers. Try it for free or find out more information at myquerybuilder.com.

Sphere: Related Content

MyQuery Builder Makes Editing MySQL Queries Easy

Thursday, August 18th, 2011

MyQuery Builder logoI’m proud to announce the launch of my latest project, MyQueryBuilder.com!

MyQuery Builder is a visual tool for professional PHP developers who need to construct MySQL queries reliably and easily. If you have ever needed to build database functionality into your site, you’ll want to check MyQuery Builder out. The tool is a web-based app that can run either in the cloud or locally on your dev server. It is designed work in harmony with your existing tools (e.g. Dreamweaver, Coda, BBEdit, etc.) and to be an integral tool in your production pipeline.

At the heart of MQB is the SELECT Query Builder that lets you drag and drop tables and fields on one another to build your query up interactively. It’s a really slick way to build even complex queries with multiple JOINs and condition statements. Find out more and see the SELECT Query Builder in action.

Closeup of MyQuery Builder’s SELECT Query Builder

Its counterpart is the Utility Query Builder that lets you build UPDATE, INSERT, REPLACE, TRUNCATE, and DELETE queries with just a few clicks.

Both tools can throw their resulting queries over to the PHP Code Builder that construct functions and class methods (or stand-alone procedural code) with ease. If you’re working on multiple projects simultaneously, you can use saved Sets that create code to your custom coding standards. It even supports both the old MySQL and the newer MySQLi PHP extensions.

The starter account is free, so there’s no risk at all to kicking the tires. For more advanced developers or situations where you need to access secure data, there’s an option for you to download and install MQB on your local development server. Compare the features and pricing over at MyQueryBuilder.com.

MyQuery Builder is an integral part of my development workflow, and I hope it will be for you, too.

To help spread the word about MyQuery Builder, you’ll get a free month of the Pro or Locally Hosted plans for every user you sign up. Simply put your referral link up on your blog or site and you can conceivably never pay for the service.

Sphere: Related Content

Tutorial: Use DropBox to Share a Database (or any file)

Friday, January 14th, 2011

Admittedly, this is a niche problem, but it’s one I run into quite frequently. I have several development machines, and it used to be a huge pain in the but to keep my MySQL databases synced between them all so that I’m always working with the same data.

Enter DropBox and symbolic linking on the Mac (sorry Windows users).

In your DropBox folder, create a folder that will hold your shared databases. In recent versions of DropBox, you’ll want to ensure that this folder is not excluded from syncing on your target machines.

Quick steps:

  1. Back up your db files
  2. Move the db folder you want to share from your MySQL db directory to its DropBox counterpart
  3. Create a symbolic link from the DropBox version to your MySQL directory

Detailed steps:

On your primary development machine (or the one with the latest version of the database you wish to share), navigate to the folder containing your MySQL database files (For MAMP installations, this is typically /Applications/MAMP/db/mysql).

WARNING: BACK UP YOUR DATA BEFORE PROCEEDING!

Now move the folder containing the database you wish to share to your newly created counterpart in your DropBox folder. Move it, don’t copy it.

Fire up your terminal window. You’re going replace the folder you just moved with a symbolic link (not an alias!) from your DropBox version. DropBox folders can live anywhere you choose, so replace this example with your own paths:

ln -s /Users/Steve/Dropbox/Databases/example_db /Applications/MAMP/db/mysql/

Now you should see the DropBox version of your db folder there in the finder. Because it’s a symbolic link, MySQL is tricked into seeing the shared directory even though it’s no longer in your database directory.

Repeat this on every machine on which you wish to share this database.

Some caveats: this is a development solution only! Obviously, you will not use this technique on your live database! Also, this technique is susceptible to version control errors. Hence, it’s a good solution when you’re the only developer hitting the database files. My own use-case, for example, is syncing between my primary MacPro and my travel laptop. Your mileage may vary.

But wait! There’s more! This trick works with anything and any app, not just database files and MySQL. Give it a try. It’s yet another reason DropBox is one of the greatest services available on the Net today.

Sphere: Related Content

MapTechnica Updated With US City Boundary Maps

Saturday, May 15th, 2010

Lots going on over at my side-project, MapTechnica, lately. In addition to the US 5-Digit Zip Code Maps and US County Boundary Maps, I’ve just turned on City maps.

Looking back, I should have started with these given how cool they turned out to be.  In truth, though, I didn’t realize the data and shapefiles for the cities were in the vast Tiger/Line database since the US Census Bureau calls them “places,” not “cities.” Oh, well.

Serendipitously, the city boundaries work amazingly well with the city labels and information already embedded in the Google Map layer, so the effect is a truly additive mapping product without the need for map markers.

I’m still working on productizing the tile set and database, but that should be up in the next few days.  In the mean time, head over to the free US Cities Boundary Map Tool and play around.  As always, I’d love any feedback you might have.

Sphere: Related Content

Tutorial: Launching MAMP Silently on Startup

Monday, August 25th, 2008

MAMP Web ServerMAMP is a great tool for running and managing a development server when you require more than the basic PHP configuration included with Leopard. However, getting the web server to run typically involves launching MAMP, entering your root password, and quitting MAMP.

This tutorial walks through the simple steps needed to launch MAMP silently on startup so that you do not have to enter your root password every time.

The issue with MAMP is that launching Apache must be done as root, so there’s no way to simply add MAMP to your startup items via the system’s Accounts Preferences in a way that will launch the app silently. But you don’t need to. Here’s the deal: MAMP’s launcher is just a pretty UI that opens a shell script that, in turn, launches MAMP’s Apache and MySQL servers.

You can set up launch daemons that do the exact same thing without the need to launch MAMP or enter a password.

Step 1: Create the Start-up Items

Open up your favorite text editor and paste the following into an empty document:

Create another for the MySQL start-up item:

Be sure to replace “YOUR_USERNAME” with the username for your account.

Step 2: Save the Files

Save this file as (or move the file to) /Library/LaunchDaemons/info.mamp.start.apache.plist and /Library/LaunchDaemons/info.mamp.start.mysql.plist, respectively.

Step 3: Set Permissions

If you try to launch the daemons at the moment, you’ll get a “dubious permissions” error. To correct this problem, you’ll need to change your permissions.

In your terminal, type:

You’re done! Reboot your computer and test that your development server is running as expected by opening a served page in your browser.

Sphere: Related Content

Integrating the iPhone SDK Simulator into Dreamweaver

Sunday, August 24th, 2008

Are you doing iPhone development on a Mac? Do you use Dreamweaver as your IDE? If your answer to both questions is ‘yes,’ then try this simple tip.

The iPhone SDK has an iPhone simulator that is, effectively, a fully functioning, pixel-perfect iPhone on your Mac. But because it’s an app on your Mac, it is also just another browser on your system. So treating it as such in Dreamweaver is a snap.

First, download and install the free iPhone SDK from Apple’s iPhone Development Center. Since you are not releasing apps through the App Store, you do not need to pay to be a part of the Application Developer Program. You just need a free developer account on Apple’s site.

Once you download and install the SDK, open up Dreamweaver.

  1. Go File > Preferences > Preview in Browser
  2. Click the “plus” button to add a new browser to your list
  3. Navigate to /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/
  4. Select the iPhone Simulator.app
  5. Click Ok, and then close out your preferences
  6. Now the iPhone Simulator is in your list of browsers

There’s one quirk. The iPhone Simulator must be running in order for it to accept browser pages from Dreamweaver, so if you trigger it from Dreamwever and all you see is the iPhone’s Home Screen, then do it again in Dreamweaver. The second time, the page should come up in the iPhone’s browser.

Sphere: Related Content

Dreamweaver CS4 Public Beta

Monday, May 26th, 2008

Dreamweaver CS4The Dreamweaver team has been hard at work since the launch of CS3 to bring you…drum roll please…CS4!

That’s right! A bright and shiny new version is available as a public beta. Also available are the Bridge CS4, Fireworks CS4, and Soundbooth betas.

The biggest changes are in the interface. The OWL interface that you’ve come to know and love in Photoshop are now in Dreamweaver, as are a host of other refinements and improvements. My favorite UI enhancements by far are the Vertical Split View and Split Code View–the combination of which finally lets you work on the header and body of a document at the same time the way God intended. After all, why would she give us wide-screen monitors if she didn’t want us to see two pages side by side?

Also notable in the new Dreamweaver CS4 are the following:

  • Javascript Extractor – provides an easy to make your JavaScript unobtrusive by externalizing it and tying it to watcher events. This is very cool. (Note: Read all about Unobtrusive JavaScript in this post.)
  • Integrated Subversion Client – ties an SVN client into the site functionality.
  • Related Documents – provides instant access to any file that is immediately linked from the document you’re working in
  • New Spry Validation & Widgets – new and improved are the Spry validation widgets for passwords and radio groups, along with integrated support for the latest version of Spry.

Click the links below to get your copy hot off the digital presses:

Please direct any feedback, bug reports, and feature requests to the Dreamweaver Public Beta Forums.

Sphere: Related Content

Safari 3.1 Update Released: My Recommended Standards-Compliant Development Browser

Tuesday, March 18th, 2008

SafariSafari 3.1 has been released for both the Mac and the Windows. The update is available via the automatic Software Update on the Mac, or via a manual update on Windows. Of course, you can download a fresh clean install here.

Included in the update is a new Develop menu which contains various web development features, allows access to the web inspector and the network time line, allows CSS editing in the web inspector, and allows user agent spoofing.

On the standards side, Safari 3.1 adds support for CSS 3 web fonts, CSS transforms and transitions, HTML 5 <video> and <audio> elements, offline storage for Web applications in SQL databases, SVG images in <img> elements and CSS images, and SVG advanced text. (Ironically, none of these things are standards yet, but whatever.)

The full release notes can be read here.

Since the launch of Leopard and Safari 3, I’ve been using Safari as my primary development browser. The only thing I miss from firefox is the ability to view the source code on selected text. Other than that, Safari 3 with the debug menu enabled has been the best browser for development on the market, hands-down. With 3.1′s update, this will only improve.

Sphere: Related Content