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).

mkdir -p builddir/foo
cp -r /boot builddir/foo
cd builddir
genisoimage -no-emul-boot -boot-load-size 4 -boot-info-table -r -b boot/grub/stage2_eltorito -o boot.iso foo
and now you are not yet up and running. It looks like it, but you have to adapt boot/grub/menu.lst to make it boot from cd.
First issue: boot fails with a “Error 29: Disk Write Error” - I wondered a bit and asked for help around and wondered a bit more why grub wanted to write to my harddrives in order to boot … finally solved it with help from the Super Grub Disk Page - it was the savedefault point of all my kernels. Removing that made it boot. So time to remove /boot and trust my cd.
Which was a wrong decision.
All my kernels had root=(hd0,0) so it kind of didn’t work. Changing this to root=(cd) did it - and removing (hd0,0) from my splashimage was also a bit nessesary.
So after this, rebuild the cd again with the genisoimage command mentioned above and now I am up and running completely.
And I of course have secretly marked the cd so evil people can’t replace it without me noticing it.
So what’s next step in my tinfoil covered world ? SELinux? something else? I guess you know how to make comments. Feel free.
/Sune
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.im Auftrag von Frau Ilse Aigner ich habe mich bez glich Ihres Anliegens bei unserem Referenten der CDU/CSU-Arbeitsgruppe f r Recht erkundigt. Ich wurde darauf hingewiesen, dass die Bedenken Ihrer Branche hinsichtlich des Refentenentwurfs eines Strafrechts nderungsgesetzes zur Bek mpfung der Computerkriminalit t bekannt sind. Auch hat der Bundesrat eine Pr fbitte ge u ert. Zwar ist der Referent der Meinung, dass die Gefahr der Illegalisierung schon jetzt nicht best nde, trotzdem wolle man aber im laufenden Gesetzgebungsverfahren alle Bedenken beseitigen. Seien Sie versichert, dass Sie auch in Zukunft weiterhin Ihre Arbeit ganz legal aus ben k nnen.That last sentence says: rest assured that you may continue to exercise your profession legally in the future. In the spring of 2007, it seemed as if all protests were overheard, the Bundestag pushed the new legislation 202c StGB, and the Bundesrat drew in their horns and failed to appeal the decision. I wrote another email to the secretary of Ilse Aigner asking whether I can still "rest assured", but this time, no response came back. And now the law has been passed. Politics as we know it. On the topic of whether the Debian project now has to provide a non-German archive for Germany, I find myself in the middle of the swamp of German legislation. On the one hand, publication or distribution of "hacker tools" has been made illegal, in addition to their (ab)use. On the other hand, however, the law only makes tools illegal which are (a) primarily used for cracking, and (b) are used with malevolent intentions. It's the "yes or no?" "maybe." bullshit which makes it impossible for people to do their job in Germany, if they actively want to stay on the legal side. A good example is the tax system where you have three options: do it yourself with minimal time investment and pay way more taxes than you have to, or let a tax advisor do it, or try to do it right yourself. If you do the latter, it's like walking a thin ridge in absolute darkness, except you won't be told immediately when you fall off. I think Debian should not take any action. We're not malevolently or intentionally distributing tools primarily used for cracking, so we stand good chances of getting by with it. Apart, Debian is not a legal entity in Germany anyway, so who are they to sue? NP: Overhead: Metaepitome Update: Thomas Jollans writes in that Debian can't be sued, but the German mirror operators can, with which I have to agree. Then the solution is obviously to move the German mirrors. That's a topic for this thread.
case some_variable
when 'X'
process-based-on-X
if save
post-processing
else
throw_an_error
end
when 'Y'
process-based-on-Y
if save
some-other-post-processing
else
throw_an_error
end
when 'Z'
process-based-on-Z
if !save
throw_an_error
end
end
In each case, the pre-save processing was unique, and -- more
importantly -- the action to take after a successful save was
different, so I couldn't just save-and-handle after the case
statement. However, the throw_an_error code was the same in each
case, so I just changed the code to do this:
begin
case some_variable
when 'X'
process-based-on-X
save!
post-processing
when 'Y'
process-based-on-Y
save!
some-other-post-processing
when 'Z'
process-based-on-Z
save!
end
rescue ActiveRecord::InvalidRecord
throw_an_error
end
My mind was blown. Soooo much clearer now. I have an "everything's OK"
code path, and a "bugger me, something broke" path, cleanly separated.
But something didn't feel quite right...
And now I know what it is. I'm bothered by the fact that I'm sailing very
close to using exceptions as an ordinary, every day flow control mechanism.
I think I've convinced myself that, in this case, it's OK, but I'm a little
concerned that I might go power-hungry and start using it in places that it
really isn't warranted. I guess I'll just have to keep an eye on myself.
Just remember, everyone: save! isn't a dirty word!
* Horizon BlueCross/BlueShield is picked out early in the film in a collage of stories citing badAnd well, as most readers here know, I concur. Well at least
treatment of members.
2) The Blues recognize the need for improvement of both the coverage and delivery of healthcare.Try NOT being angry at a 4,000 dollar bill or worse, an 80,000 dollar bill, or even worse a death. It is near to impossible to stop the rumblings of anger. We are human beings, after all. We are born with the capacity to think and feel, passionately and deeply. And some of the best change comes from the fire that is anger and I hope that enough Americans are finally feeling the fire.
But the divisive tone set forth by Michael Moore and his movie “Sicko” is not helpful. Positive
change to our healthcare system can be best achieved through shared responsibility, not
recrimination. To ensure Americans have access to the best healthcare that is both timely,
efficient, and of high quality, requires the collective contribution of all stakeholders
consumers, providers, employers and the government.
Next.