Turn a plain text URL into a hyperlink wrapped in an LI
Saturday, November 18th, 2006Add these lines to your .emacs:
(fset 'list-hyperlink-from-URL
[? ? ?\C-y ? ? down ?\C-a])
Add these lines to your .emacs:
(fset 'list-hyperlink-from-URL
[? ? ?\C-y ? ? down ?\C-a])
I’ve been using NetVibes for a while. But I just discovered the Web Page Module. And that has greatly increased NetVibes’ usefulness to me.
First, there are several visualizations (newsmap, delicious map, delicious LiveMarks and digg spy ) which cannot be replaced by an RSS feed. Web Page Module allows me to view each of these interfaces from within Netvibes, each in its own tab. NewsMap is so flexible that it fits into one column of a 3-column layout.
Netvibes is a smooth interface for reading 10 or 20 important feeds. Beyond that, I either have to scroll deeper than I’d like, or I have to start breaking up my feeds into tabs; and then I have to go back to BlogLines. Reading a bunch of little boxes spread across many tabs, does not appeal to me. I cannot make a good case for just why that is, however.
In any case, tonight I realized that the Web Page Module means that I can put BlogLines inside Netvibes. So now I truly do have all my feed-reading on one page.
I wrote my first reporting script yesterday. It crawls a source tree and reports each occurrence of a specific regular expression.
Today I will be trying out SSMTP under Cygwin. I’m not sure where I can send mail from. I guess I can use one the SMTP that’s already running on one of the servers.
Automated reporting has been a dream of mine for a long time. The trouble has been building a work environment where it was possible to develop a best practices document. Forming a list, of consensus best practices, took a long time. However, the reporting script was written within 24 hours of completion of the first draft of the best practices document.
(more…)
Assuming we are in a directory that contains a file called
myfile.
>perl -e “open(FOO,’cat myfile |’)|| die ‘cat failed’; while (){ print }”
Now I can treat FOO just like I would any other filehandle.
I just picked up the 5th edition of David Flanagan’s JavaScript, the Definitive Guide. I find it amusing that that book is the only JavaScript book officially recommended at comp.lang.javascript.
Closures are a powerful feature of JavaScript. However it’s often hard to explain in a few words, just what is useful about closures. Well, here on page 131 of the Rhino book, is the recipe for a unique ID generator that doesn’t require a global counter.
One thing that I personally enjoy about the Flanagan book is that he says things like “don’t pollute the global namespace.”
This technique does not pollute the global namespace.
var uid = (
function(){
var id=0;
return function(){
return id++ ;
};
}
)();
//then just say:
alert(uid());
var uid = (function(){var id=0; return function(){return id++ ;};})();
Here is the simplest example of recursion that I can think of:
(function (arr, count) {
alert[count];
if(count
Why is this important?
(more…)
In 2001, I wrote a Perl script to put id3v1 tags into mp3 files that didn’t have any tag information; using MP3::Info to get and set tag information.
(more…)
In the comp.lang.javascript Javascript Best Practices document, I came across an interesting discussion of the reasons for preferring square bracket notation to eval().
The consensus seems to be that eval is evil, and that “if it exists in your page, there is almost always a more correct way to accomplish what you are doing.”
I remember watching Vic on Larry King with the vice president. Al Gore is a huge dude, and Larry’s desk is small, so they were all crammed in right next to each other. Vic did what he could to bring up the difficult questions ![]()
I would love to find the video of this so I could post it on YouTube. This is just some of the transcript.
The transcript is mirrored after the jump.
(more…)