download_url = "http://www.exaile.org/plugins/plugins.py?version=%s&plugin=%s" \
% (self.app.get_plugin_location(), file)
xlmisc.log('Downloading %s from %s' % (file, download_url))
Let us hope they never lose control of that domain, (and never implement automatic plugin updates) otherwise all current users will hit the site, be persuaded there are newer plugins available and be compromised en masse...
In other news, even with my planet-searching script, I cannot find the blog entry I wanted to refer people to. It involved people looking pretty and acting miserable. Possibly on buses?
http://www.red-bean.com/~decklin/userscripts/unembedtube.user.js(I get a perverse sort of nostalgia out of bringing back the "puzzle piece" for links, and mocking people with it.) YouTube embeds will appear to work like any other, but the URL is changed from the Flash wrapper to the FLV file, which can be opened in MPlayer/Totem/whatever. Since we can figure out this URL, it is also, of course, possible to make such the link back into an embed usable by mplayer-mozilla or a similar plugin. Unfortunately, I don't have time to look up how to add a configuration menu, but this line of JS does have a certain charm to it:
var evil = 0; // need to make this user-settableYou know what to do. If you want true evil, there are some pointers in the comments. For YouTube videos embedded from other sites, the best I can kludge for now is link to the video's original YouTube page. If someone would like to write a routine to snarf that page with XMLHTTPRequest and yank the necessary arguments out, I would love to add it. (Insert five-page think piece here about the lost dream of MIME and the sad fact that the rise of Web 2.0 has been driven more by the fact that native installation is irreparably broken and pointless anyway on most PCs than it is by the fact that JavaScript actually works now and the implications of this for the Free Software movement especially in light of the fact that we are still human beings who occasionally do social things like sign up for Twitter even though they're running on some proprietary code base.)
"I really appreciate finding somewhere that's giving info' on where to find the coverage on t.v. I've just looked through Sky t.v listings and coudn't find a damn thing at 9a.m. on Saturday.........unless I'm blind and stupid. So ITV4 sounds the best, then. I'm not subscribed to the larger SKY packages. It's such an excting time!!!! The Tour De France starting HERE in England!!!!"I've also linked CTC's listing in the last few days, which is more complete. I'm not subscribed to Sky either and I don't think British Eurosport's coverage was as good as International Eurosport in the past. I would be quite annoyed if I paid for Sky's sports package and still only got such limited coverage when better is available free-to-air. Get a dish, point it at 19 east and enjoy the German, or 5 west and enjoy French. Maybe today, the weather here will be good enough for me to fix my dish. I'm still surprised by itv's bizarre decision not to promote their tour coverage properly and not to put the highlights on itv1. Wouldn't 2 million fans be worth sacrificing a little of their much-hated late-night phone-in game show that currently hogs itv1 after midnight?
A modern bronze statue of the Bishop of San Juan and three torch-bearing women stands in the Plazuela de la Rogativa. A good spot for scenic views, due to is fine location overlooking the bay. The beautiful bronze statue is the work of Lindsay Daen, created in 1971 to mark the old city’s 450th anniversary. Plazuela de la Rogativa (plaza of the procession) features a modern sculpture depicting a procession of religious women and a bishop. It commemorates an event that took place on the site in 1797. During the spring of that year, a fleet of British ships led by under Sir Ralph Ambercrombie sailed into San Juan Bay, meaning to launch an assault on the city and take control of the colony. When the attack was foiled, they undertook a naval blockade of San Juan, hoping to starve the residents into submission. As the town s people began to despair of any help from soldiers garrisoned in the inland towns, the governor ordered a rogativa, or plea, to ask the saints for assistance. The women of the town formed a procession through the streets, carrying torches and ringing bells. The British, hearing the commotion and seeing the moving lights, decided that reinforcements had arrived and quickly sailed off.
use Data::Dumper;
use List::Util (reduce);
@p = (580, 420, 355, 335, 275, 215);
$target = 1505;
$A[0] = [0, [], 0];
foreach $i (1 .. $target)
my @tmp;
foreach $a (@A)
next unless defined($a);
push @tmp, [$a->[0], $a->[1], $i];
push @tmp, [$a->[0] + $_, [@ $a->[1] , $_], $i] foreach (@p);
@tmp = grep( $_->[0] == $i; @tmp);
# ok, prefer the shortes solution for no other reason
# than 7 times mixed fruit is so boring.
$A[$i] = reduce if ($a->[0] == $b->[0])
@ $a->[1] @ $b->[1] ? $a : $b
else
$a->[0] > $b->[0] ? $a : $b
@tmp;
print Dumper($A[$target]);
Mixed fruit? You probally have to read this xkcd strip
Update: Changing the grep statement from testing for less than or equal to strict equality seems to be about 30 times faster with the same result.
case somevar
when 17
do_something_here()
end
Because, you know, if statements are for people who know how to
program, or something.
To summarize, I left DebConf on Saturday morning, arrived NYC on the afternoon where Raquel was waiting for me. By Sunday, we had the very nice chance to meet with abrotman, rcox and stew. We stayed at stew and rcox’s place until Tuesday, when we got back. We also had the chance to meet with people that we have been working for remotely.
We were walking around in NYC, and suddenly, the 5th avenue became multicolor. It was the gay pride parade. You can take a look at the pics on the gallery, lots of gay people. Our visit to NYC was pretty gayish actually, since we spent our first night in Chelsea, presenced an electronic music festival or similar for lesbians, and the next day, first row on the parade
And that’s it, since we came back until like yesterday, life was a mess; lots of work pending to deliver and many other issues. Finally, we are right now settled up again, enjoying a cold rainy nice weather in Mexico City with very cheap beer (compared with UK pints!) and loved people
Thanks to all who made such a wonderful DebConf, even that, in my case, I arrived late and left early, it was just great (thanks also to MJ Ray, specially; and also to all people who was worried about my arrival, you know who you are, thanks). Thanks also to Mike and Rachel who hosted us, they are a very nice couple. And also, thanks to Alex who joined us in NYC, coming from Philadelphia, spent a nice day with us, took us to Chinatown and Little Italy and gave me a Phillies baseball cap (just as exchange of the worldwide famous umbrella hat).
git-hash-object that helps you creating a hash for a particular object (though it’s also trivial to do with sha1sum). For regular files, git-hash-object -t blob $filename is enough. For symbolic links, you have to read the link destination, and give it without a trailing character (be it the NULL character or a carriage return) to git-hash-object -t blob --stdin. For directories, you have to generate a tree “structure” by yourself and pass it to git-hash-object -t tree --stdin. I haven’t bothered looking at other file types.
The tree structure can be guessed by either looking at mktree.c or at the output of git-cat-file tree $sha1 where $sha1 is the SHA-1 hash for a tree object. It contains 3 informations for each node in the tree : the file mode, with the same format as what stat() returns, except for some reason, permissions are 000 for directories and symbolic links ; the file name ; and the SHA-1 hash. These informations are written with the following format : file mode in octal ascii and no padding zero (”%o”) followed by a space character, then the filename followed by a NULL character, and the binary form of the SHA-1 hash.
Nodes are sorted in a not-so-quite lexical order (take a look at base_name_compare in read-cache.c) and are not separated by any special character: the mode of a file just follows the SHA-1 hash of its predecessor.
With all this new knowledge, you should be able to write some code that would return the SHA-1 from an arbitrary directory. Okay, since you must be at least as lazy as I am, you can take the script I wrote.
Now, let’s take a look at a real life case : what commit is the latest nightly snapshot for the linux kernel from ? First, download the latest snapshot patch and its baseline, and extract the whole. Then, run my git-hash-tree.pl script with the directory containing the extracted kernel as an argument. It will return, after a while, the SHA-1 hash for the whole tree. During this long process, you also have plenty of time to git clone linus’s tree.
Once you’re all done, you can search for the commit corresponding to the tree hash (let’s call it $hash) with the following command :
git-rev-list --all while read h; do git-cat-file commit $h grep -q "^tree $hash" && echo $h && break; done
If you just followed these steps, you should just have spent a great moment having no result at all. There are actually 2 things that prevent this method to properly work with the linux kernel nightlies :
-gitn from the EXTRAVERSION variable in the Makefile.git diff only includes diff headers for removal of empty files, so if you apply the snapshot patch with the patch utility (and you can’t apply it with git-apply since you don’t have a .git directory), empty files that were marked as deleted will still be on your tree. It happens with the current snapshot patch (2.6.22-rc7-git6): it doesn’t remove include/asm-blackfin/macros.h.Next.