Apple Computers is finally developing a two-button mouse.
Apple enthusiasts have longed for an Apple-branded two-button mouse for over a decade
This cracks me up so much—they don't just want a two-button mouse, they want an Apple-branded one... Haha.
I had an interesting problem today: I had three text files containing about 20,000 email addresses I needed to sort and remove duplicates from. Behold the power of the UN*X shell:
cat file1 file2 file3 | sort | nodup > done
The resulting file, done now contains my sorted and duplicate-free list. sort comes standard, but nodup is my own program to remove duplicates. Here is the code:
#include <iostream>
#include <string>
int main(int argc, char *argv[]) {
std::string a = "";
std::string b = "";
while(std::getline(std::cin, b)) {
if(b != a) {
std::cout << b << std::endl;
a = b;
b.erase();
}
}
return 0;
}
Compile it with the following command:
g++ -o nodup nodup.c -lstdc++
Then copy it to /usr/local/bin or somewhere.
You can use it with pipes like my example above, or just by itself like this:
nodup < file > done
And people wonder why I love Linux...
It took me longer to write this post than it did to finish that job.
Apparently The Pogues got together for a Reunion Tour last year. This is the first I've heard of it, and while I would have considered going to see them, I wouldn't have driven too far out of my way. I listened to them a lot during my high school years, and actually saw Shane MacGowan and the Popes back around 2000. To be completely honest, I'm surprised that guy is still alive—he looked like a zombie on stage five years ago. And I mean living dead. The roadies were lighting cigarettes and putting them in his fingers for him while he was on stage. At one point, he threw down the microphone stand, and a roadie came out and picked it back up for him (he was swaying pretty bad without it to hold on to). I think their best album was Waiting For Herb. Most Pogues fans would disagree, but they're retarded punks that think Shane is cool. Shane is a little bit funny, and a lotta big sad.
