Finely Cultured Eric Danielson's Personal Blog

13Nov/090

Mac OS X Tip: Use a solid color background of any color

I've been annoyed by the inability to easily set a solid color background since I started using OS X. Apple ships a couple "Solid background" png files, but they're without fail Not the colors I want.

Turns out, there's a nice, easy way to get a solid color background of your choice that doesn't involve making a new image for each color you want. OS X supports transparency in PNGs used as wallpaper, showing the desktop color through the transparent parts. If you use a small transparent PNG and set it to "Center", you'll get a solid color desktop, and you can change the color using the color picker next to the "Center" pull-down.

I've conveniently attached a 128x128 totally transparent png file below:

Save me and use me as wallpaper!

Right-click above me!

Save this file to your "Pictures" folder, open up System Preferences, pick Desktop & Screensaver, select the blank picture, and choose "Center" from the orientation pulldown menu. A color selection will appear to the left - click it, and select the color you want your desktop to be.

Simple, but this has been periodically bugging the hell out of me for about a decade now.

Note: This is based on a tip on MacOSXHints, found here:
http://www.macosxhints.com/article.php?story=20021002055217828

1Sep/095

Using Apache2’s Digest authentication

I finally got Apache's Digest authentication, and since there's a serious dearth of information online about getting Digest working, I decided I'd write up a bit. It's not difficult, but I've had far more trouble than I should have, and most of that's due to nonexistant documentation.

Why Digest?

Standard HTTP auth sends the password in plaintext, which is generally bad. On sites with an SSL cert, this is less of a problem, since the traffic is encrypted to begin with, but on smaller sites, it's a lot of overhead to set up SSL.
Digest authentication hashes the password before sending it - it's an MD5, which isn't great, but it's also not your password flapping in the breeze, so to speak. It's a good intermediate step to make sure you're not transmitting plaintext passwords anywhere.

What's the drawback?

There's a very small performance hit, and it's not as easy to set up, but the biggest drawback is that you have to rebuild your apache users file.

So how do I do it?

Digest is very similar to standard Apache access configuration, with just a couple changes.

  1. Make sure you have digest enabled - if you have shell access, type:
    a2enmod auth_digest
    otherwise, in your httpd.conf or apache2.conf file, include the line:
    LoadModule auth_digest_module modules/mod_auth_digest.so
  2. Create your new Digest authentication file. At the shell, type:

    cd /var/www/
    htdigest -c .digest Internal Admin

    Note: This code creates a user named Admin in the realm "Internal" - we'll get to realms later.
    You'll be asked for a password, and then asked to confirm the password.
  3. Create your .htaccess file in the directory you want to protect - in this case, we'll assume it's http://(yourdomain)/Private:

    BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
    AuthType Digest
    AuthName "Internal"
    AuthDigestDomain /Private
    AuthUserFile /var/www/.digest
    Require user valid-user

    The first line is necessary to make Digest work for IE6. IE7 seems fine.
    AuthName is the realm you chose earlier - Digest allows you to make multiple "realms" to protect different directories.
    Also, note the AuthUserFile line - Apache docs swear that line should read AuthDigestFile. It shouldn't.

That's it - you're using Digest!
The code is interchangeable anywhere you'd normally use standard Apache password auth, and you can use all the other normal .htaccess commands as well. It's just a mildly more secure, and horrendously documented, alternative to standard HTTP authentication.

Apache.org: Authentication, Authorization and Access Control
Apache.org: Apache Module mod_auth_digest

Filed under: Featured, How-To, Tech 5 Comments
25Dec/080

It’s the Enforcement, Stupid.

One man in this picture did his job properly.

One man in this picture did his job properly.

Three months into the financial collapse, much of the debate is centering around the role of regulation in the crisis. Democrats are claiming the deregulatory atmosphere in Washington over the last 8 years caused much of the fraud and other criminal behavior that's come to light. Republicans are arguing that the push for low-income home ownership and the expansion of Fannie Mae and Freddie Mac caused the subprime housing bubble. In the balance lies the layout of whatever eventual fiscal stimulus should pass: Will it be a market-centric solution, focusing on tax breaks and consumer spending, or an infrastructure-centric solution, focused on government spending and programs?

Ultimately, though, regulation was never the cause of the crisis. The question of "too much" or "too little" is moot - Nobody was enforcing the regulations left on the books. The three biggest culprits in the fiasco are the SEC, the Federal Reserve, and the Ratings Agencies.

   

Pages

Categories

Blogroll

Archive

Meta