wesley tanaka

Tech

Drupal Search Single Result Redirect

()

A snippet of code that will automatically redirect searches that would display only one search result so that they do not show the search results page but instead immediately and automatically redirect to the first result.

To use it, add it to your active theme's template.php file and replace themename with the name of your theme.

China Telecom Auto-blocker

()

About a month ago, the China Telecom here started blocking my DSL account from downloading web pages. One of their network techs told me they stopped allowing the

Spammer-Powered Distributed Denial of Service

()

Don't stuff beans up your nose, and I definitely do not condone anyone trying anything like this, but it seems like you could use the

Y Combinator Interview Result

()

Dev interviewed for us at Y Combinator today, but they declined to invest. It sounded like they wanted us to reposition more toward technology, which makes sense because they invest in a lot of technology solutions for technology users -- that's where their expertise is. I'm glad we got the (binary) feedback that our story could still use work, but my internal jury is still out on their particular suggestion.

tinyurl command line tool

()
Create an executable file called "tinyurl" in your executable path which contains something like:
#!/bin/sh
wget -q -O - \
-U "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8" \
--header="Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1" \
--header="Accept-Language: en" \
--header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" \

Ego Baiting

()
  1. Post inflamatory comment about someone egotistical enough to have their own "blog", and include link to their "blog".
  2. Since they are egotistical, they will be checking their preferred blog indexing and serching services for links to and mentions of themself.
  3. They will link back to the post of yours that mentioned them with probability 0 < p < 1
  4. ?
  5. Profit!

And I am ashamed that I've had so much exposure to the circle-jerk-osphere that this idea would even occur to me in the first place.

Bonferroni's Principle

()

The U.S. Terrorist Watch List appears to be growing in some kind of automated fashion. Given the current size, it seems to have run into Bonferroni's Principle.

How to post to metaweblog with Drupal's xmlrpc()

()

Example code showing how to use Drupal API's support for xml rpc to post an item to a blog which supports the metaweblog XML-RPC api:

xmlrpc('http://blogs.www.friendster.com/t/api', 'metaWeblog.newPost', '31337', 'example@example.com', 'sample password', array('title' => 'drupal xmlrpc and metaweblog.newpost tutorial', 'link' => 'http://wtanaka.com/node/7746', 'description' => 'sample code for using xmlrpc and metaweblog.newpost in drupal'));

Emergency Brake vs. Parking Brake vs. Hand Brake

()

Someone should make a more general purpose version of pop vs. soda that accepts user-submitted polls. They should make it worldwide, for the non-U.S. english speakers. Then that person should add the poll "Emergency Brake vs Parking Brake vs Hand Brake". Then they should get a lot of people to take that poll. Then they should tell me when they have some results.

And if more people called it "Parking Brake" (which is the correct term, by the way), they wouldn't forget to set it when they parked.

Google to focus on mobile Internet in China

()

Interesting observation:

"China has a large mobile opportunity, with so many mobile users who will become mobile Internet users in the next few years as 3G and other technologies become pervasive," Lee said in an interview.

"These mobile users have very different usage patterns from the American users. Most Chinese users who touch mobile Internet will have no PC at all.

And this

Syndicate content
by Wesley Tanaka