Skip to content

{ Category Archives } Web Design

Nearly Free Speech

I've used 1&1 since I started mucking about on the web; they had a cheap plan for $3/month with one domain name and a simple LAMP stack. But the price has been going up (now $5/month; still comparatively cheap!), and I'm starting to chafe at the limitations (no SSH shell access, proprietary 404 pages, no [...]

New Amazon Advertising API

Just got an email from Amazon reminding me that "As part of our continued effort to ensure that the Product Advertising API is an efficient and effective advertising tool, we’ve identified opportunities to streamline the API", which is their way of saying that the API exists to make them money. Anything that doesn't serve that [...]

Writing CGI scripts

nearlyfreespeech runs with safe mode and safe_mode_gid on, so you can't run shell scripts or other cool things. Usually that's not an issue, but if you do, they let you run CGI scripts, in any of a number of languages. You just have to treat it as a shell script, with a shebang notation of [...]

Things I Learned About .htaccess, part 2

I've learned some things about .htaccess, but mostly I've learned that programming it is deep black magic. The most important thing is "Don't use mod-rewrite unless you absolutely need to". All the fancy stuff is better off done by the PHP (or whatever language you're using) code. Don't do: RewriteEngine On RewriteBase / RewriteRule ^([^/\.]+)/$ [...]

A New Twist in Comment Spam

I get lots of comment spam, either obvious ads for dubious products or boilerplate praise in almost understandable Engfish ("This is the most coherent soliloquy on this germane topic in the recent memory") with links to the ads. But I'd never seen comment spam that went out of its way to insult me: The subsequent [...]

Trying to Search with Bing and Failing

I'm not a fan of having to create a Google Custom Search Engine to limit searches to one site with an HTML form (which seems to be necessary for mobile sites), so let's play with Bing: <form method="get" action="http://www.bing.com/search" > <input name="q" type="text"/> <input type="submit" value="Search with Bing"/> <input name="q1" value="site:http://bililite.nfshost.com/blog" type="hidden"/> </form> And it [...]

Back to a Simple Google Search Form

Earlier, I noted that the old, simple Google search: <form method="get" action="http://www.google.com/search" > <input name="q" type="text"/> <input type="submit" value="Search with Google"/> <input name="sitesearch" value="http://bililite.nfshost.com/blog" type="hidden"/> </form> is deprecated and doesn't work from Google's mobile site. Google does have an API for custom searches that has all sorts of fancy parameters to manipulate, but it requires [...]

A Google Bug (no, not really)

For the search on the Young Israel site, I use Google with a form that creates links like http://www.google.com/search?q=foo&sitesearch=http://youngisrael-stl.org to limit the search to the one site. It works fine in normal browsers, but on my iPhone it detects the browser and changes it to a mobile-optimized site that ignores the sitesearch=http://youngisrael-stl.org and returns results [...]

Custom CSS for iPhone

I decided to make the Young Israel site iPhone-friendly, and there are lots of good sites for tips on creating custom CSS for the small screen. The best I found was on CSS wizardry. It doesn't focus on the how so much (using media queries or checking the User-Agent string (evil!)) as the what—making sure [...]

Playing with Syntax Highlighters

I wanted to try different syntax highlighters so I wrote a little WordPress plugin that let me switch between different highlighters (email me if you would like that code). I wanted syntax highlighters that were javascript-based (ruling out GeSHi), and that allowed me to highlight inline code elements as well as code elements within block-level [...]