Steve Kemp: Take a portable terminal, go out there and patch in manually.
I might regret this later, but until I recant:
This features several changes already, and a few more are pending.
ObFilm: Aliens
I might regret this later, but until I recant:
This features several changes already, and a few more are pending.
ObFilm: Aliens
One of html's deficiencies is that it doesn't have a tag to mark up a date.
If html had such a tag, then browsers could display dates using your time
zone, and in whatever format you like. Rather than in some random time
zone, that is often not even shown, and some random format.
My fav way to see a date is as relative date, such as "two days ago". With
a mouseover so I can see the exact, absolute date in the rare case I need
it.
It's possible to combine some javascript with html, so that, if
javascript is available, a nicely formatted relative date is displayed. And
with no javascript, an plain old absolute date is shown. Perhaps the
cleanest way to do it is using html like this, combined with javascript
that fires on page load, parses the date and replaces it with something nicer:
<span class="date">Fri Oct 17 16:17:02 2008 (EDT)</span>
But you might want to avoid using the ugly machine-parseable date, since it
will still display in any situation where javascript isn't available. To do
that, I added an attribute containing the machine-parseable date. I chose
to use the "title" attribute, so as a bonus you can hover over it to get
a popup with the raw date.
<span class="date" title="Fri Oct 17 16:17:02 2008 (EDT)">Friday afternoon, October 17th</span>
So, relatively clean html out of the way, now we just need some javascript
to munge in the relative dates. There are various examples out there. The
best one,
requires the prototype framework.
I try to stay away from javascript frameworks, since I'm not a javascript
programmer, and since I dislike page loads pulling in thousands of lines of
irrelevant code. So I came up with my own more bare metal implementation,
which handles both types of html above.
You can see it in action on my website, or by enabling the relativedate
plugin on your own ikiwiki.
(This code is in the public domain, but do note that I'm not a javascript
programmer, really.)
var dateElements;
window.onload = getDates;
function getDates()
dateElements = getElementsByClass('date');
for (var i = 0; i < dateElements.length; i++)
var elt = dateElements[i];
var title = elt.attributes.title;
var d = new Date(title ? title.value : elt.innerHTML);
if (! isNaN(d))
dateElements[i].date=d;
elt.title=elt.innerHTML;
showDates();
function showDates()
for (var i = 0; i < dateElements.length; i++)
var elt = dateElements[i];
var d = elt.date;
if (! isNaN(d))
elt.innerHTML=relativeDate(d);
setTimeout(showDates,30000); // keep updating every 30s
function getElementsByClass(cls, node, tag)
if (document.getElementsByClass)
return document.getElementsByClass(cls, node, tag);
if (! node) node = document;
if (! tag) tag = '*';
var ret = new Array();
var pattern = new RegExp("(^ \\s)"+cls+"(\\s $)");
var els = node.getElementsByTagName(tag);
for (i = 0; i < els.length; i++)
if ( pattern.test(els[i].className) )
ret.push(els[i]);
return ret;
var timeUnits = new Array;
timeUnits['minute'] = 60;
timeUnits['hour'] = timeUnits['minute'] * 60;
timeUnits['day'] = timeUnits['hour'] * 24;
timeUnits['month'] = timeUnits['day'] * 30;
timeUnits['year'] = timeUnits['day'] * 364;
var timeUnitOrder = ['year', 'month', 'day', 'hour', 'minute'];
function relativeDate(date)
var now = new Date();
var offset = date.getTime() - now.getTime();
var seconds = Math.round(Math.abs(offset) / 1000);
var ret = "";
var shown = 0;
for (i = 0; i < timeUnitOrder.length; i++)
var unit = timeUnitOrder[i];
if (seconds >= timeUnits[unit])
var num = Math.floor(seconds / timeUnits[unit]);
seconds -= num * timeUnits[unit];
if (ret)
ret += "and ";
ret += num + " " + unit + (num > 1 ? "s" : "") + " ";
if (++shown == 2)
break;
else if (shown)
break;
if (! ret)
ret = "less than a minute "
return ret + (offset < 0 ? "ago" : "from now");
I finally catched up with Gammu backlog from holidays and now it is time to
move it a bit further.
Automatic testing
During this week I set up CDash instance for acquiring results of
automatic nightly checks of Gammu. Each night Gammu is build on several hosts
(currently Debian x86_64, Debian x86, SUSE x86_64 and crosscompilation for
Windows on Debian) and results are posted to the dashboard. If you have
some other architecture which could participate in testing, you are welcome to
contribute! It is simple - just checkout svn, create build directory and
configure there Gammu using cmake. You can enable coverage tests
(-DCOVERAGE=ON). Then just run every night make Nightly for regular testing
or make NightlyMemoryCheck to do dynamic allocation analysis. There is more
detailed documentation in sources (INSTALL file).
Thanks to this, I can hopefully sooner spot regressions and possible problems
on different architectures.
Roadmap
With upgrade of Mantis, new feature called roadmaps arrived. I started to
use it for planning features in future Gammu releases, so you can see what
bugs should be fixed in future releases in Gammu roadmap. Currently there
are not much things planned, because till now I had to focus only on
bug fixing, but I think with 1.21.0 we have reached much better quality than
in past releases and now is time to do some important changes in the core.
Nokia phone required
As you can already see in roadmap, I plan some bigger changes to Gammu core.
I currently have on Sony-Ericsson phone and I would not be able to properly
test how these changes will affect Nokia drivers. So for start I will need at
least Nokia Series 40 3rd edition phone. Nokia 6233 (or 6234) currently looks
as a reasonable choice, but if you have any hints for cheaper one with
similar features, just drop me an email.
Perfect would be if somebody would have half broken phone (I do not intend to
use it for anything else than Gammu development, so broken camera, speaker,
microphone or display does not really matter) and will be willing to donate it
to me. If this will not work out, I'll have to buy used one and I will try to
collect funds for this. If you want to contribute, check my
donations page for possibilities.
Wow this Joe the Plumber phenomenon really seems to have Democrats spooked as they are now scrambling to find any possible dirt on the guy who dared to question Dear Leader. One might think people with a solid 6-10% lead wouldn't need to be so desperate but Adam is probably well aware of the Democratic partys penchant of snatching defeat from the jaws of victory. A lot of these progressive types are still nursing resentment for the "swiftboating" of John Kerry and wary that it will happen again so todays strategy is pre-emptive douchebaggery before Karl Roves evil minions can sully the pristine reputation of their fair candidate.
What they don't realize is that calling Kerry an America hating traitor worked because there was reasonable evidence that he threw his medals away, and made speeches denouncing his country which are typical of acts people associate in their minds with America hating traitors. The 527s exaggerated but the exaggeration would not have worked if there was not an element of truth behind it. Now no one is disputing that Obama actually did make the "share the wealth" remark. Whether the person he said it to is a republican plant or some other sort of nogoodnik is immaterial. Obama is a redistributionist and that is precisely the reason why liberals want to him to be president.
And how pathetic is the "dirt"? He owes backtaxes? Gee I wonder why someone who already owes money would be apprehensive about having to pay more? A lot of people owe money at one time or another and even have liens placed as a result. Perhaps it is relevant to mention that for someone in public office (like oh, say, Charles Rangel who I'm sure Adam will discuss in his next post.) but for a private citizen? Isn't that one of the "chilling effects on free speech" we were going to be subjected to in Bush's America?
The other one one was how is not a real plumber. Apparently he is not licensed but, sit down for this one, it is actually possible to do work without a piece of paper from the government. Really! I've seen it happen. Is it always a good idea to ignore licensing regulations? Well they often serve to protect the public from malpractice but then again they often prop up cartels. Here in the NY/NJ area plenty of people of all political persuasions seem to be willing to take the risk of hiring unlicensed plumbers and other tradesmen because at the end of the day, it's the, you know plumbing, that makes you a plumber nothing else. And none of this has any bearing on Obamas policies or what they mean for America.
So if you like socialism and think its what America needs, feel free to make the case to the voters and perhaps they will agree with you or perhaps not. But stop with with the ad hominems against people who point that out.
I haven’t been blogging this election at all recently — there are enough folks out there saying just about everything that should be said (and lots that shouldn’t), but I couldn’t let this little tidbit slip by without mention.Via the TaxProf blog:
apt-get install adept
Again, as with beta 2, there is no Hardy backport, since my time is tight. If
anyone is willing to do a backport please drop me a note: I will gladly publish
installation instructions.
Heroes of Beta 4
Making sure you get valid data from users is a constant headache. E-mail
addresses just happen to be a particular piece of data that causes me pain
and suffering at the day job, because when people put bad e-mail addresses
into web apps we host, my mail queues clog up, and that makes me a sad and
slightly (more) irritated sysadmin.
Since I work for a Rails hosting shop, and I like programming in Ruby, I
got all industrious this weekend and put together EmailAddressValidator,
a ruby class to validate an e-mail address via a regex or (optionally) DNS
lookups (to make sure something might accept mail for the domain)
and making (most of) a delivery attempt to an MX for the domain. It's not
foolproof, but it'll stop my mailqueues from getting clogged with a fair
percentage of the stuff that gives me ulcers. The fun part now is getting
the customer base to (a) use the class at all, and (b) run it over their
existing user address lists.
As an aside, if someone wanted to setup an SMTP server configured for a
catchall on gmial.com, I think he or she would have a lot of juicy
stuff in very short order.
Today is Blog Action Day about poverty. As a member of several cooperatives, I have a pretty strong hope that the responsible lending of credit unions can help people escape from poverty. The basic process of a credit union is that you save for a while, then when you’ve shown that you will put aside that amount of money regularly, you can borrow some multiple of it and repay at the same rate you were saving. In addition, you get a voice in controlling the credit union itself, although it is limited by financial services regulations and so on.
At yesterday’s meeting of the Cooperatives-SW board in Taunton, some members expressed concern about a “social enterprise” called South-West Pound backed by a company called South West Community Banking Partnership. Although it’s called that, apparently it’s not a bank and also not a credit union: its members don’t manage it. It’s working with credit unions, but I’m very unclear on how it’s regulated. From the few details on their website, it looks to me like it could even be running a Farepak-style scheme which happens to hold deposits in credit unions instead of banks. Why is concealing member-controlled unions allowable as a “social enterprise”? Why would anyone go to a “community banking partnership” instead of direct to a credit union? (Coo, I’m getting a bit angry again, both at the lack of information and the hide-them-to-promote-them idea.)
Tomorrow (Thu 16 Oct) is International Credit Union Day. If you’ve not already done so, please go open an account and help your local community to fund itself, then see if you can get involved in publicising them to communities who suffer financial exclusion.
So Facebook pretty much missed the German market. There is StudiVZ which
has about 10 times as many users in Germany than Facebook has, and which
is sometimes called "red facebook" because of the similarities. Then there
is "green facebook", Lokalisten, which had started quite regional (and
invitation-only), but expanded since, and also is like 2-3 times the size
of german Facebook.So apaprently Facebook now decided they need to compete more in the German
market, and started a marketing campaign. As part of this campaign, Mark
Zuckerberg, founder and CEO, gave a talk in Berlin and Munich. The
marketing company uses a strategy where they try to push these two cities
to compete for having the largest fb userbase in Germany.The talk was okay, I would have wished for more entrepreneural chat; but
only a few of the questions were along these lines (e.g.: "when did you
know you had something big?"), instead some usual feature requests came
up ("Why can't I prevent others from tagging me on photos?")But the largest kudos I have to give to facebook is for actually finding so
many "ambassadors" that will do advertisement for them for free.
Well, they got a T-Shirt (that does a word play on "blue" and "taking a day
off", although it should probably say "I'm doing free promotion for fb and
all I got is this T-Shirt")It probably only works because Facebook on one hand has always been free,
is a "hip web2.0 thing", and they're trying to play "good guys" just like
Google does ("don't be evil"). Many people don't understand how despite
the privacy functions in Facebook people can still get their data with
just some old-style social engineering very easily (so no actual data
manipulation or abuse required, but when you do it the right way, just
about everybody on facebook will just give you his data voluntarily).Sometimes all this Web2.0 fanboying can be quite scary, but I figure that
is just the way people and societies work.
I finally managed to use my Nokia N810 to do some GPS logging for OSM. The Nokia internal GPS is quite slow, so I used an external antenna and the well known Maemo Mapper tracking capability to log my first 60 kms in my area. I'm not too much happy with the result, because it seems the Nokia tablet is quite slow in tracking points: other trackers are someway configurable on those regards, but Mapper seems not taking in account any user preference about data sampling. Too bad, even if it is able to use OSM maps as default background, which is a great plus for a mapper. Definitively it needs a look to sources to understand what happens under the cover.
Procmail
This will be the last time I talk about this, but here's my anti-rubbish procmail filter.
It correctly copes with:
:0However, this didn't actually work with FireGPG and the way that it puts encrypted messages inline. I eventually found out that putting this in my ~/.muttrc would fix it:
* !^Content-Type: multipart/
* !^Content-Type: application/pgp
:0 fBw
* ^-----BEGIN PGP MESSAGE-----
* ^-----END PGP MESSAGE-----
formail \
-i "Content-Type: application/pgp; format=text; x-action=encrypt"
:0 fBw
* ^-----BEGIN PGP SIGNED MESSAGE-----
* ^-----BEGIN PGP SIGNATURE-----
* ^-----END PGP SIGNATURE-----
formail \
-i "Content-Type: application/pgp; format=text; x-action=sign"
set pgp_auto_decode=yes
Not much to say. Just that I am back, now with a mixed English-Spanish blog. I will try to keep entries written in Spanish out of syndicated feed on Planet Debian, but I won’t promise that some entry can slip. It has been long since I had no blog, so it will be a new challenge to try to update it somehow regularly.
Regarding my Debian work, I have to admit that I have become mostly a ‘package and upload’ guy. I don’t have enough spare time to devote to other tasks, so I will mostly try to keep my packages as clean as I can.
Not much to say. Just that I am back, now with a mixed English-Spanish blog. I will try to keep entries written in Spanish out of syndicated feed on Planet Debian, but I won’t promise that some entry can slip. It has been long since I had no blog, so it will be a new challenge to try to update it somehow regularly.
Regarding my Debian work, I have to admit that I have become mostly a ‘package and upload’ guy. I don’t have enough spare time to devote to other tasks, so I will mostly try to keep my packages as clean as I can.
Next.