\s+\|\s*\n\|
This regular expression matches the pipes and spaces in mysql output like:
| $dq$$form |
| $dq$$module |
| $dq$$place |
| $dq$$site |
| $dq$$thing |
Sometimes it’s handy to extract just the values from a pasted query result.
Thanks to a post buried in the Google cache of Zend’s support boards, I give you the means to solve this annoying bug: set the svn and cvs paths to /dev/null.
I tried setting just the svn path to /dev/null, but ZDE.app was still loading source control data when opening the problem project. Then I set the cvs path to /dev/null, restarted, and no more loading.
According to the thread, this also works, changing ZDE/config_5.5/cvs_options.xml so that the value is false. Not sure if it works, I like the /dev/null solution too much.
<customized_property ID="cvs.enableCvsIntegration">
<boolean value="false"/>
Let’s say you have a symlink or two in your svn repository, and one day you decide to delete one of them. You use the svn rm command to do so.
$ ls -l tinymce-3.2.6
lrwxrwxrwx ... tinymce-3.2.6 -> ../../jslibs/tinymce-3.2.6
$ svn rm tinymce-3.2.6
D tinymce-3.2.6
$
But a minute later you realize that you actually need that symlink. You haven’t committed anything. Normally you would just svn revert and go about your business.
Alas, your working directory is in limbo now; svn revert won’t restore, and svn up ignores the missing symlink. The trick, apparently, is that you must commit the deletion before you can roll it back.
$ svn commit -m "Uh, accidentally deleted wrong version of tinymce"
Deleting tinymce-3.2.6
Committed revision 12679.
Then you copy (I kid you not) the link back in from a previous revision, and commit that.
$ svn copy -r 12678 http://svn.example.org/path/to/tinymce-3.2.6 \
./tinymce-3.2.6
A tinymce-3.2.6
$ svn commit -m "Respawned tinymce-3.2.6 from previous revision"
svn commit -m "'Resurrected' link from previous revision"
Adding tinymce-3.2.6
Committed revision 12680.
Now the symlink is back and you can carry on.
The SVN Book calls this “resurrection”, I call it “respawning.” Thanks to this post for the tip.
Great (no, really great!) summary of the many quirks to keep in mind when building an HTML email template:
http://24ways.org/2009/rock-solid-html-emails
I had to learn most of these the hard way recently, but I haven’t tested against Y! mail so I’m sure some of my work is broken.
The biggest disappointment, by the way, is Gmail. I mean, inline CSS only? Really? What kind of kludge is that? It bulks up message size considerably. I guess the alternative is to use… an iframe. Oh well.
The goal is to look over our shoulder and see Snow White and Pinocchio and Dumbo standing there saying, ‘Be this good.’ We shouldn’t be intimidated by them; they’re an arrow pointing someplace.
Using my shiny new multi-touch “magic” mouse now, and I love it. Scrolling is as natural now as it is on a trackpad, and right-click works flawlessly for a mouse with no buttons. But, oops! How do I send a middle-click (button 3)? You know, to open a link in a new tab?
Typical Apple: two steps forward and one step back. The traditional Mouse preference pane allows you to assign button 3 to the scroll wheel. But the new Mouse preference pane, for the magic mouse, doesn’t. It plays little videos to show you how to use the mouse, but the number of things you can do with it has been limited. Ugh.
Enter BetterTouchTool by Andreas Hegenberg, available at http://blog.boastr.net/. Launch it, map “three finger click” to MiddleClick, and you’re done. It ain’t pretty (yet?) but it works.
Here’s a recipe for redirecting by hostname in Apache. It’s like using Redirect but you can have more than one per VirtualHost container.
This is especially useful when you have a single SSL host with a lot of different sub-sites on it, and you want to provide the convenience of virutal host names to colleagues or clients. It’s obviously much easier for people to remember (and type) board.example.org than ssl.example.org/sites/board, and this technique makes it easy to provide that.
<VirtualHost *:80>
ServerAdmin webmaster@example.org
ServerName ops.example.org
ServerAlias board.example.org it.example.org
DocumentRoot /usr/share/apache2/htdocs
RewriteEngine On
RewriteCond %{HTTP_HOST} ops.example.org
RewriteRule ^(.*) https://ssl.example.org/sites/ops$1 [R=301]
RewriteCond %{HTTP_HOST} board.example.org
RewriteRule ^(.*) https://ssl.example.org/sites/board$1 [R=301]
RewriteCond %{HTTP_HOST} it.example.org
RewriteRule ^(.*) https://ssl.example.org/files/it$1 [R=301]
</VirtualHost>
These directives provide redirects for three different virtual hosts, subdomains of example.org. Each will redirect to a specific location at https://ssl.example.org/.
The $1 at the end of the RewriteRule causes the originally requested location to be appended to the redirect. In other words, a request for http://board.example.org/minutes.html will redirect to https://ssl.example.org/sites/board/minutes.html
Finally, the [R=301] flag causes Apache to issue a 301 Moved Permanently redirect, rather than the default 302. Some say this is better practice for search engines and such. That doesn’t really apply in this specific example (since these redirects are to secure sites) but it doesn’t hurt, either, and might save some browser overhead on subsequent requests for the virtual hostname.
Important Note/Update: Installing “Java Update for OS X 10.6 Update 1” through Software Update will put your system back to square one. But you should update, since there are vulnerabilities that have been fixed in the new version. One workaround: move /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 to a safe place before updating, then move it back later. Or as one commenter suggests, put it in a different place and link to it, then just restore the links after updating.
Original Howto:
A few other pages on the web give instructions for installing the Java 1.5 support that is (inexplicably) missing in OS X 10.6.0. Unfortunately they rely on an untrusted gzip file posted on a server at washington.edu that is getting hammered.
Here’s how you get it from Apple:
Download the official Java package from Apple, “Java for Mac OS X 10.5 Update 4” dated June 15, 2009.
Then use the excellent shareware utility Pacifist to open the downloaded JavaForMacOSX10.5Update4.pkg file.
How to install
1) First use Finder to go to System > Library > Frameworks > JavaVM.framework > Versions and delete the two aliases (symlinks) “1.5” and “1.5.0”. Don’t skip this step, because otherwise the extraction will follow the symlinks and overwrite the contents of the 1.6.0 folder, oops.
2) In Pacifist, drill down into Contents > System > Library > Frameworks > JavaVM.framework > Versions.
3) In Pacifist, select 1.5 and 1.5.0, right-click, and chose Install to Default Location
Now you can launch Zend Studio 5.5 or whatever else you needed Java 1.5 support for. Enjoy!
(And many thanks to Davey Shafik for pointing me in the right direction with his Fixing ZDE 5.5 in Snow Leopard post.)