avocado shake (dot) net

greg@foobarist.com

Syndicate content
Updated: 3 weeks 2 days ago

How to Watermark Images Using ImageMagick (composite) on the Command Line

Tue, 07/01/2008 - 14:55

These instructions are for watermarking images on the command line using the ImageMagick command "composite".  So you'll need to have SSH access to your images.  (To watermark images off-server -- ie., on your desktop in Windows -- check out this list of programs.)

1. Create a PNG watermark image

Using PNG, you can avoid distortion of the watermark when its composited

If your original images are dark, you should use white text for the watermark.  If your images are light, use black text.  Don't worry about shades of the text color for now.  You can adjust how brightness of the watermark on the command line.

I used Photoshop to create a small image with the watermark text, then save it as PNG.

2. Run the command: composite

The full command with options is:

composite \
  -dissolve 80 \
  -gravity southeast \
  watermark.png \
  original-image.jpg \
  new-watermarked-image.jpg

This command applies the watermark image to the original image, and creates a new composite image.  It sets the watermark to be 80% of its brightness, and places the watermark in the southeast corner (bottom right) of the image.

Notes for each element of the command:

read more

Categories: Greg talking

How to fix favicon.ico page not found in Drupal

Sun, 06/08/2008 - 22:35

Problem / Symptoms

Your Drupal 5.x or 6.x installation is throwing "Page not found" errors for favicon.ico.  (You can see this in Admin > Logs > Recent Log Entries > Page Not Found)

What's going on?

There is no favicon.ico in the Drupal root directory. 

Drupal's themeing system inserts the following line into your website's source.  This is why when you view your site, you see a favicon in your browser, even though there is no favicon.ico in Drupal's root directory.

<link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />

But not everyone pays attention to the shortcut link in the page head section.  Some browsers (eg., on bookmarks) or websites (eg., del.icio.us) look for http://example.com/favicon.ico directly.  These requests result in a full Drupal bootstrap, only to have Drupal return a 404 and log the page not found.  Wasted resources.

What we want is to avoid Drupal altogether for direct requests for /favico

Solution(s)

A. Quickest fix for simple installations

If you're using Drupal for a single site, you can just upload a copy of your favicon.ico to your site's root directory. 

B. Multi-site installations

However, if you have a multi-site installation, dropping the favicon in the root directory will cause it to be used for all your sites.  That's no good.  To get around that, you can use the following rewrite rules to point requests for /favicon.ico to the real location. 

read more

Categories: Greg talking

Extend 2WIRE wireless range using a Linksys WRT54G-TM

Wed, 06/04/2008 - 18:28

This article provides a step-by-step guide to extending the wireless network range of a 2WIRE DSL/cable wireless modem, using a Linksys WRT54G-TM.

The important bits:

* The router connected to the internet is the 2WIRE DSL modem that was provided by AT&T. It is a popular wireless modem that DSL providers give to their customers. The problem with the 2WIRE modems is their weak signal strength.

[Note: If you just want to try to boost the signal strength of your 2WIRE modem, go to the administration screen and change the. Using a web browser connected to your network, go to the Web based admin panel of the 2WIRE. I found this at http://gateway.2wire.net. You can also try the default IP address of the 2WIRE modem -- http://192.168.1.64. Under the "Wireless Settings" screen, look for the option called "Power Setting". My 2WIRE defaults to a setting of 4/10. You can increase it to see if it helps extend your wireless network range. Note that this doesn't do anything about the 2WIRE being able to receive transmissions from a weak wireless card on a faraway laptop. The power setting only applies to the transmitting (sending) power of the 2WIRE.]

The problem: The 2WIRE's wireless signal sucks. The wireless signal is extremely flaky beyond 60 feet or so. I want to extend it to the offices next door -- about 120 feet from the router, past metal shelving and one concrete wall.

The solution: Repurpose an unused Linksys WRT54G-TM router as a second access point to the wireless network. So the end result is one unified wireless network, using two access points. You basically have to connect the 2nd router (Linksys) to the 1st router, then disable the router functionality of the 2nd router.

Step-by-step Instructions:

1. Using an ethernet cable, connect the Linksys WRT54G-TM to the 2WIRE. DO NOT use the internet/uplink port. Use a regular LAN port on both sides of the cable.

read more

Categories: Greg talking

Avocado Shake (dot net) is the personal website of Gregory Go, co-founder of Killer Aces Media and Drupal fanboy.

Full text blog feed

My Tumblog

FriendFeed Stream

Essential Skills of a Community Manager
From Google Reader, posted Saturday, July 26, 2008 - 21:12.
Cartoon: Fannie Mae & Freddie Mac
From Mixx, posted Saturday, July 26, 2008 - 21:04.
Essential Skills of a Community Manager
From Google Reader, posted Saturday, July 26, 2008 - 20:24.
Picturing Casualties In Iraq: Slide Show
From Mixx, posted Saturday, July 26, 2008 - 20:20.
Submitted: 19 Tips for Cheering Yourself Up -- From 200 Years Ago
From Mixx, posted Saturday, July 26, 2008 - 20:03.
Submitted: 3 Tips for Losing Weight on a Budget
From Mixx, posted Saturday, July 26, 2008 - 19:50.
Submitted: How to Deal with a Partner That Hides Money Problems
From Mixx, posted Saturday, July 26, 2008 - 18:10.
Blogging's Glass Ceiling (Kara Jesella/New York Times)
From Google Reader, posted Saturday, July 26, 2008 - 18:02.
How to increase submit speed from 45s to a fraction while keeping Akismet anti-spam - Pligg Forum
From del.icio.us, posted Saturday, July 26, 2008 - 17:26.
Lazy Linux: 10 essential tricks for admins
From del.icio.us, posted Saturday, July 26, 2008 - 16:21.