Garbage In Garbage Out

Tech tips & other words

Page 5 of 14

Can’t display content hosted by Mac OS X server in an iframe? Here’s how!

Apache on Mac OS X is configured with security in mind. Apple has chosen to ship it with a setting that causes the x-frame-options header to be sent, which has the effect of causing content hosted on a Mac OS X server to not show up inside and iframe on another site.

Well-written web apps (like WordPress) already send the x-frame-options header. My personal preference is to turn this off globally and then ensure that my web apps send it as needed.

Here’s how to disable it:
Continue reading

How We Fail: Middle America’s Inability to Gauge Wealth

We’re taught to think of wealth in absolute terms. But doing so prevents us from understanding the relative difference in the costs of living between ourselves and the fantastically over compensated.

Instead, we’ve got to think of wealth in relative terms.

You know what stuff costs you relative to your salary. What you don’t know is what stuff would cost you if you earned double (half), triple (1/3), ten times (10%), one hundred times (1%) your current salary.

So, I did the math for you.

If you earn $50,000 a year, gas costs you $4 a gallon. If you earn $5 million a year, gas costs just 4 cents a gallon. Relatively speaking, why would the rich care if it goes up a dollar a gallon. To the wealthy, that’s only a penny more.

That Harley you want? $20k. A $5M man pays just $200.

That $400,000 dream house you’re looking at? Super affordable at $40,000.

Why’d I pick $5M to compare? Because the CEOs of 171 publicly traded companies all earn at least $5M a year in 2010.

The best-compensated CEO earned $84.5M. Relative to someone earning $50,000 a year, he pays 2/10ths of one cent per gallon of gas. This guy will only start to feel your pain when gas reaches $2000/gallon! But of course, he’s an insider sitting on boards of directors and leveraging his obscene salary to build more, so his wealth has ballooned beyond imagination long before that’s happened. Meanwhile, you’re still waiting on that cost of living adjustment that adds $85/month to your takehome.

PS. You’re what we refer to as the middle class.

Add MySQL to terminal shell in Mac OS X

Mac OS X 10.6 snow leopard uses the bash shell by default. If you install MySQL from the disk image (dmg) from http://dev.mysql.com/downloads/, you can make it easy to access the mysql binary from the command line by adding it to your bash path.

Here’s how:

Open terminal, and type:

echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile

This adds the default location of the MySQL binary to your shell environment.

Then, you need to force the system to reload your .bash_profile file. Again, from terminal, enter:

. ~/.bash_profile

You can check your environment variables by typing in terminal:

env

Now, to access MySQL from the command line, you only need enter:

mysql

Install memcache and APC on Mac OS X Server (snow leopard 10.6, Lion 10.7, Mountain Lion 10.8)

Looking to speed up your SocialEngine, Drupal, or other PHP/MySQL web site? The combination of APC and Memcache can really speed up sites based on these platforms. If you’re an admin of a server running Mac OS X Server (10.6), here’s how to install APC and memcache on Mac OS X server:

Download and install MacPorts from http://macports.org.

Continue reading

Remove MySQL from Mac OS X

I wanted to test the new MySQL 5.5.6 on Mac OS X 10.6.4. It’s got problems, so I chose to downgrade to the current stable release of MySQL (5.1.51-community). I ran into bad news though, as the installer refused to progress, complaining that a newer version was already installed.

Here’s how I got rid of the old one:

Continue reading

Install and run Maya 2009 on Snow Leopard

Did you upgrade to Maya 2010 because you found that you couldn’t install Maya 2009 on Snow Leopard 10.6? Are you finding that Maya 2010 on Snow Leopard is flakey, giving you lots of rainbow beach balls? No worries. Ian Herzog over on MacLearning.org has the answer, and it’s simple as tweaking the Maya 2009 installer to work on Mac OS X Snow Leopard. Check it out.

« Older posts Newer posts »