Bloglines has resisted adding an XML-RPC ping interface in favor of simply polling feeds for updates. That has finally changed with the announcement of a new ping interface. You can find the details on the API documentation page under the Ping API section.
Monthly Archives: April 2006
William Paul Charles Simpson, 17 Sep 1982 – 24 Apr 2006
Last Monday my brother-in-law (Sarah’s brother) Billy Simpson died in a car crash in Texas at the age of 23. I’m not exactly sure what to say, this came as such a shock and surprise.
The first time I met Billy he must have been 11 or 12, when he came to live with his dad and Sarah’s mom. He grew up to be an intelligent and athletic individual. After high school he served an LDS mission to Portugal. After coming home from Portugal he joined the Air Force as a linguist. He graduated as a Serbo-Croatian Linguist and was hoping to learn as many 10 languages. He certainly had a gift for learning different languages.
Take care Billy, you will be missed. God be with you till we meet again.
Slashdot Protection
The ability for Slashdot to bring down sites that they link to has been well documented. This sort of thing is no longer limited to Slashdot, it seems Digg managed to do this pretty well also. So how does the average person protect themselves from the sudden onslaught of visitors? Mix Apache‘s mod_rewrite with the Coral Content Distribution Network and you get Slashdot protection.
Slashdot protection uses mod_rewrite to look at the referring websites (like Slashdot and Digg) of visitors and redirecting them to the Coral cached versions of your site:
Replace aaa.bbb.ccc.ddd with your own IP (so you always get to your site).
Replace www.yourdomain.com with your actual domain.Just don’t mess with the user_agent and query_string lines. Those ensure that the Coral servers themselves can retrieve your page when they need to.
(Shamelessly stolen from http://ottodestruct.com/diggprotectionrules.txt)
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^aaa.bbb.ccc.ddd$
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
RewriteCond %{HTTP_REFERER} ^http://(www\.)?digg\.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?slashdot\.org [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?slashdot\.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?fark\.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?somethingawful\.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?kuro5hin\.org [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?engadget\.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?boingboing\.net [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?del\.icio\.us
RewriteRule ^(.*)$ http://www.yourdomain.com.nyud.net:8080$1 [R,L]
In addition to the docs for mod_rewrite, you may want to check out the mod_rewrite cheat sheet.
Sesame Street Video Clips
I was one of those kids who grew up watching Sesame Street, so this list of Sesame Street video clips filled my mind with memories. Here are some of my favorites:
AJAX Edit In Place With Prototype
UPDATE Thu 29 Nov 2007 @ 5:30pm : The Edit In Place code has a new home at editinplace.org
UPDATE Wed 7 Jun 2006 @ 11:45pm : Before you get too attached to what is described here there is a new version you should look at: AJAX Edit In Place With Prototype, Version 0.2.0.
Late last year Drew McLellan posted a great article on 24ways.org called Edit-in-Place with Ajax. Using Flickr as an example and Prototype to do the heavy lifting he showed how to edit text inline. Like many other people I’ve been fascinated by this approach to altering text. After playing with Drew’s example off and on I finally sat down and decided to generalize it a bit more to make it easier to use.
Before I get into the code let me say that I’m a complete amateur when it comes to JavaScript. If you are looking for someone with serious JavaScript fu go talk to Simon Willison.
First go get a copy Prototype. Then you’ll need the Edit In Place javascript file. There is an example page that you can play with. I tried to make it as simple as possible while still providing a reasonable amount of flexibility.
Here are the interesting bits from the example page:
<style type="text/css">
.editable {
background-color: #ffff99;
padding: 3px;
}
.savebutton {
background-color: #36f;
color: #fff;
}
.cancelbutton {
background-color: #000;
color: #fff;
}
.saving {
background-color: #930;
color: #fff;
padding: 3px;
}
</style>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="eip.js"></script>
<script type="text/javascript">
Event.observe(window, 'load', init, false);
function init() {
makeInputEdit('editme', 'edit.php', 'editable', 50);
makeTextEdit('bigedit', 'edit.php', 'editable', 15, 75);
}
</script>
<!-- ... -->
<span id="editme">
This is just a one line title.
</span>
<p id="bigedit">
Dashing through the snow on a one-horse open sleigh, over the fields we go,
laughing all the way; bells on bob-tail ring, making spirits bright, what fun
it is to ride and sing a sleighing song tonight. Jingle bells, jingle bells,
Jingle all the way! O what fun it is to ride in a one-horse open sleigh. Oh!
Jingle bells, jingle bells, Jingle all the way! O what fun it is to ride in a
one-horse open sleigh.
</p>
The CSS classes are used to make a few things stand out. The editable class is to applied to elements that are editable (bet you saw that coming) when the mouse goes over it. When the mouse leaves the element the class is removed. The example above is similar to the style that Flickr uses. The savebutton and cancelbutton classes are applied to the save and cancel form buttons (I know, another big surprise) and the saving class is applied to the text ‘Saving…’ that is displayed while text is being saved.
After the CSS we pull in the Prototype and Edit In Place code. The Event.observe code will call the init function when the page is loaded. The init function in this case is used to call our makeInputEdit() and makeTextEdit() functions that specify which elements we want editable. The first three arguments to both functions are the same: 1) the id of the element to be made editable, 2) the page to call for updating the text and 3) the class to apply on mouse over to indicate to the user that the text is editable. The fourth argument for makeInputEdit() is the length of the input form field. The fourth argument for makeTextEdit() is the number of rows for the textarea form field and the fifth argument is the number of columns for the textarea.
There is an example edit.php with EIP that should be enough to get you started (this is the same example that Drew used):
<?php
$id = $_POST["id"];
$content = $_POST["content"];
print(htmlspecialchars($content, ENT_QUOTES));
?>
Combined this with Prototype, the Edit in Place (EIP) code and the example page and you have enough to start playing with. Find ways to add it to your own apps and let me know if you find bugs or better ways of doing the same thing.
Now that you’ve read this whole thing don’t forget to look at AJAX Edit In Place With Prototype, Version 0.2.0.
More Humorous TV Commercials: TBS & G4
I generally skip commercials (+1 for DVRs), but lately some of them have been entertaining in their own right. I’ve already mentioned the VISA break dancing worm commercial, which was pretty good. Now the TV channels TBS and G4 have come with a few funny commercials of their own.
The folks at TBS have commercials for Lord of the Rings up on their website. There are six of these: secret lovers, white horse, Frodo, Gollum, hunks and wizard of orc. Most of these are just goofy, consisting of remixed scenes to present a different take on the Lord of the Rings movies. The secret lovers commercial is a good example of this.
G4 takes a different approach in their commercials, instead of remixing existing scenes they are using Star Trek “action figures” in different scenes to promote their Star Trek 2.0 show. There is poolside, coffee house and my personal favorite karaoke.
Perhaps this is the future of commercials in the age of DVRs. With the ability to skip commercials at will for recorded shows there isn’t much motivation to watch them. By making the commercials more entertaining I *might* be more inclined to watch some of them, at least until I get bored of them.
How Fast Can A Turtle Move?
Chalk this one to the just plain bizarre. I was mowing the lawn in the backyard today and I came across a turtle. Now I suppose that there are some places in the world where that would seem pretty normal, but my backyard is not one of them. I looked around and could not figure out where this turtle may have come from. No one in the neighborhood has mentioned anything about missing a turtle, so I was very puzzled has to exactly how this turtle got here.
After I showed the turtle to Sarah and Alice we left it alone to hide. It moved forward a bit, but seemed happy enough to hide in some of the taller grass. So I finished mowing the lawn and started pulling weeds around the corner. After doing that for awhile I went to go check on the turtle. He (how do you determine the gender of a turtle?) was gone! I looked up and and down the yard, nothing. The only thing more puzzling than how he got there in the first place was how he disappeared from the yard later on.
I’ll confess to not knowing a lot about turtles (other than they don’t walk very fast), so at this point I started to look for more creative ways that this turtle could have made his escape. Do turtles dig tunnels by any chance? Although I didn’t see any signs of a turtle tunnel in the area of the yard that he was in, that seemed like a reasonable possibility. Is there a secret network of turtle tunnels under my house?
I’m going to be extra careful when walking around the yard, would want to step on the poor guy if he decides to show up again.
Star Wars In Ascii
Hard to imagine that someone has taken the time to remake Star Wars in ascii. The quality is pretty good considering the limitations of the medium.
Just telnet to towel.blinkenlights.nl and enjoy.
Bloglines Beta
Good to see Bloglines back up after their problems this morning. Then another surprise, traffic coming from beta.bloglines.com. The site is password protected so I don’t know what it looks like, but I would assume that their are trying out a new interface.
The first hit from beta.bloglines.com was on 1 Feb 2006, then nothing again until today (11 Apr 2006). A quick Google search didn’t turn up much, one reference on a Bloglines forum and a few blog posts here and there, but no details.
So Mark, when are we going to get to play with this new beta?
When Will Bloglines Be Back?
This is sad, Bloglines has been offline since early this morning. No word yet on what has happened, I just hope it gets fixed soon.