Modifying the Leopard-Default “/home” Directory (Not the User’s Home)

Tech No Comments »

Disclaimer: REALLLLLLY boring topic (but this took me a while to figure out so I hope it helps someone):

Leopard uses a directory in the root called "home." This is different than a user’s home directory, and it has something to do with NFS shares and/or a new “autofs” feature. I’m not going to pretend I know what this does Update: autofs makes using network shares a lot more stable, but it doesn’t really affect me–I’m really just a designer/developer, and don’t get into the inner-works of the OS much.

What I do know is that I don’t want it using that "/home" directory because in one of my development projects I had used that directory to store a website. Now that Leopard has been installed, I can’t write to that directory, and I need to to avoid changing up my development project.

Long story short: To fix this “problem,” you can edit the "auto_master" file in your /etc directory.

auto_master

Change the line

/home auto_home -nobrowse

to

/your/directory/here auto_home -nobrowse

Reboot and you will have reclaimed your /home directory.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Around the Web: The Art of Hyperlinking

Tech, rants No Comments »

I try to stay away from just posting someone else’s work, but Coding Horror has a good article on the art of hyperlinking we could all benefit from. I posted it because it’s a good reminder to keep links simple and intuitive, and because I really really really (really) hate SnapShots-styled links like this:

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Upgrade Woes (Leopard)

rants No Comments »

First–Leopard is fine. This isn’t a rant about Leopard, more of a rant against myself for doing breaking a very simple rule (again): Never mess with your development machine when you’re trying to launch a product.

Leopard came to my doorstep at 10 AM on the 26th, and being the early-adopter I always am, it was promptly on my machines by 2 PM. It is now a week later, and I still haven’t gotten all my development stuff fixed that I broke as a result of the upgrade. Basically, if you already have

  • Name Based Virtual Hosts (NetInfo Manager, which made this easy, is gone…)
  • SSL
  • MySQL, and
  • GD support

a Leopard upgrade will probably hose it. MySQL was easy enough to get going, but it’s taken me an shameful amount of searches to get the first two issues fixed (see all the searches), and now I’ve just stumbled on a 30+ step guide to getting GD support back, which looks like will require recompiling Apache, and probably break the virtual hosts and SSL support I just got working.Again, it’s my fault–never do a major OS upgrade on your development server in the middle of a big project–it’ll cost you.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

See the Good in People

rants No Comments »

I was driving with my daughter today, and we passed a homeless man picking up cigarette butts. She said, “look–that man is picking up litter!”

Do you remember the time you lived without cynicism or prejudice?

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Get the Thumbnail from a YouTube Video

Tech, rants No Comments »

I’ve spent the better part of the frustrating day trying to figure out the new YouTube APIs in relation to PHP. I have a project where I need to retrieve thumbnails from various YouTube videos, and I’ve been making it too hard (I’ve tried integrating the Zend Framework with PHP, Javascript, SimplePie RSS–which is a good tool, it turns out, and all sorts of DOM-reading PHP plugins).

It turns out, the easiest way to retrieve the standard thumbnail for a YouTube video is:

http://img.youtube.com/vi/VIDEO_ID/2.jpg

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Earth Wins

General No Comments »

I know there’s a lot of talk about global warming, environmentalism, and conservation. And I believe we, especially U.S. Americans, are doing a lot to make things worse. It’s particularly unsettling to watch chunks of ice the size of buildings melt away into the oceans, but I’ve noticed something that gives me a little hope: Earth is pretty resilient.

Three years ago we built a home on a half-acre in a wooded area. We cleared a few trees, but in those three years since, the forest is exacting its regvenge. We’ve lost several feet of property line along the edge of the forest due to underbrush, saplings, bushes, and general foliage that is regrowing in the same spots we cleared. It’s actually very amazing to see the rapid advancement of the forest as it grows back.

An even bigger example is shown below. For over 20 years, a mall stood on several acres in my hometown. Like a lot of its type, the mall eventually found itself outdated and useless, and was closed about 10 years ago. For years, the building stood vacant–and was finally razed a few years back. During those few years, the piles of rock and rubble have been slowly removed, and as I drove by yesterday I noticed that the place where the drab, ordinary buildings once stood now is becoming verdant patches of bushes and weeds. All this in 3 years, with none of our help in planting or reforestation. In a few more years, this could be a great location for a park.

This first picture is from Microsoft’s Terra Server, taken in 1995. You can make see cars parked outside the buildings. The second (from Google Maps) was taken in the fall of 2006. The twisted rubble of stone and metal have all been removed, only dirt and a few patches of green show. I took the final picture today, from ground level, to show the density of the foliage.

Mall 1995
Mall 2006
Mall Ground Level

We’re becoming more and more aware of the damage we’re doing to our environment–and hopefully this awareness will help us curtail the destruction. But its good to know that while we’re all figuring out what to do to make things better, Earth just might be taking matters into its own hands.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Connect to your iPhone with Coda

Tech No Comments »

Coda is a lot of great things, including a nice SSH FTP tool. If you’ve got Coda, you know about it’s cool site selection interface. Why not add an icon for your iPhone? If you’ve got SSH installed on your iPhone, you can easily connect with Coda and copy files to / from your phone. I’ve used it to install NES Roms, ringtones, and graphics. The setup below is pretty generic, and my local directory is a “phonedmg” folder created under my user account, per some of the original iPhone hacking tutorials. You’ll need to know your exact IP address and root password but if you’ve gotten as far as installing SSH you probably know how to do that. Leave a comment if you need help:

Here’s an icon I used for the Sites page in Coda…

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Bypass iPhone Activation (Current AT&T Customers)

Tech No Comments »

This won’t apply to everyone, so I’ll begin by saying there are a lot of guides out there to help you “jailbreak” your iPhone to get it to do all sorts of cool things. If you need your iPhone to work on a network other than AT&T, this post probably isn’t for you.

I had a phone on a corporate account with AT&T, and found out that the iPhone wouldn’t transfer to the account–I would have to buy new service. No thanks. This modification is fairly harmless, there are no hardware mods necessary, and if it messes up you can probably do a software restore through iTunes and be just fine. Follow the steps in this tutorial (there are 18 in all) and you’re likely to be on your way (PS you’ll need an Intel Mac for this to work).

http://www.hacktheiphone.com/iphone_using_cingular_for_intel_mac_easy.html

Those instructions start on step 11… but there is a link to steps 1-10, which are essentially steps to download the software you’ll need (it’s all free).

That should be it. Hopefully you have an iPhone using your old AT&T/Cingular SIM. If not, read on…

I didn’t initially have success with the hack, but got it figured out. They’re actually very clear instructions, but as with any technology there are variables to everyones’ situations. Here are some things that got me through:
1. It’s ok if you have the latest version of iPhone’s software (1.0.2 at the time of this post). I didn’t think it was and spent hours trying to install 1.0.1 but I found out it works fine with 1.0.2.

2. Take the iPhone SIM out and replace it with the SIM from your old phone. There is a 16-digit ICCID number on you SIM you’ll need. Write it down before you put it into the iPhone. I went through all the steps and missed that one at first–bad move. I had to start all over.

3. If everything works good until step 17, and you get a “bus error” you may have to restore the iPod and start over from the beginning. “Bus error” usually indicates it had trouble copying a file, so use iActivator (I used version 1.1.4) to put the PEM file to your iPhone. That seemed to get around the bus error. Then hit the button that let’s you activate your phone–and your iPhone should give you that *ding* and an activation message you’ve been patiently waiting for.

4. Don’t forget to copy the Services.plist file on step 18. A lot of people forget this step because they’re so excited to see the “iPhone Activated” message and iTunes thinks your iPod only has a few hundred MBs of freespace left.

5. Final caveat: The iPhone won’t work on EDGE networks Update: It does work on the EDGE network, and surprisingly faster than I anticipated (works great on WiFi too), YouTube content won’t play (update: works now, see script at www.hacktheiphone.com), and I’m having trouble with email Update: I can get POP email fine, I’m having trouble setting up my Gmail account. SMS and everything else seem to be working just fine. This setup is just a crutch for me until Apple / AT&T decide to take care of their corporate customers. I can’t believe that wouldn’t be a priority, but they’ll get to it eventually. I’d rather have a slightly crippled iPhone than my ancient 2006-era RAZR anyway, so I’m fine for now…

Update (9/14/07): New hacks for the iPhone appear daily. Now that a software unlock is stable and freely downloadable (search for iUnlock), the steps to activate your phone are going to be a lot more simple. I think it’ll be possible to get visual voicemail working, too, we’ll just have to wait for them to do it.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Parallels vs. VMWare Fusion

Tech No Comments »

The short: Fusion delivers, Parallels chugs.

The long:

In a perfect world, websites and technologies would work the same on every platform. This world is far from perfect, as are the standards by which we interact with technology. As a developer, you need to be able to test your products on various systems–and that’s where a nice Intel Mac comes in quite handy.

Most of us don’t have access to a Mac, a PC, and a Unix box–it’s usually one of the three. Enter virtualization software, which allows you to run multiple operating systems on one machine. Two of the better software packages for this are Parallels Desktop and a new release of VMWare’s Fusion. I’ve been using Parallels for a while now, and while it does what I need (I test my pages on IE 6 & IE 7), it’s a huge memory hog and doesn’t really accommodate my multi-tasking disease. (I typically keep 6-10 programs open at once.) With Parallels it’s a risky venture running it along side much of anything. Even with 2GB of RAM my iMac gets sluggish–and even after I close Parallels it doesn’t fully recover until I reboot.

I’ve recently installed Fusion, and so far it blows away Parallels. I’m able to run everything I need along side it, and it’s “Unity” feature lets me run a Windows program right along side my Mac program as if it were literally running from OS 10. Here’s a screenshot of iTunes for Mac (left) running along iTunes for Windows (right). Click for the full image:

iTunes Mac vs iTunes Windows (via Fusion)

Parallels has a feature called “Coherence” that does the same thing–but it’s never been as smooth or seamless for me as Fusion. I took it another step further and downloaded one of the many available pre-built systems you can install from VMWare’s Appliance page. Just for fun I downloaded a LAMP-ready Ubuntu install and had Ubuntu running alongside Windows XP and Mac OS X. Here are three versions of the same website being run on three different OS’s (left to right: Ubuntu, OS X, and Windows XP) from one machine (click for larger):

The bottom line: With Fusion’s ease-of-use, relatively low memory overhead, and ability to quickly install pre-built operating systems, you’ve got no more excuses not to be developing on a Mac. Period. Pony up the extra money and dine on steak instead of that McDonald’s burger you’ve been languishing in for too long now.
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Facebook Code Leak

General, Tech No Comments »

On the 10th or 11th of August, a portion of Facebook’s PHP code was accidentally leaked. Facebook made an comment on a blog reporting the story that pointed to a problem with mod_php displaying their index page as plain-text.

“Some of Facebook’s source code was exposed to a small number of users due to a bug on a single server that was misconfigured and then fixed immediately. It was not a security breach and did not compromise user data in any way. The reprinting of this code violates several laws and we ask that people not distribute it further.�

As a developer, I have two equal but opposite thoughts. 1. I would hate for my code to leak and give away any hints as to the security or well-being of my sites. But, 2., since I develop alone, it’s always great for me to see how other developers go about writing code and developing their sites.

I have seen the code, and there’s nothing earth-shattering in there that should give the guys at Facebook much to worry about. They may have to change some directory structures, but the code uses so many includes and external functions that it’ll be very difficult for anyone to do anything too nefarious with it. Since I wouldn’t want people passing my code around, I’m not linking directly to it here. You can find it pretty easily without my help anyway.

Nik Cubrilovic has some good methods on trying to fix these kind of leaks, and I’ll be implementing them ASAP on my servers.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in