Microblog : A very long article Wikipedia article on the orientation of toilet paper [7 jun à 22:52] [R]

Mercredi, 28 décembre 2011

Timelapse Controler

Traduction: [ Google | Babelfish ]

Catégories : [ Bricolage/Arduino ]

timelapse_controller

The timelapse photography controller I helped a friend build is finally complete. He built the hardware, I wrote the software. The latter is uselessly complicated, but I wanted to have fun with C++ and multiple inheritance, so here it is. The device is controlled by a rotary encoder with an integrated push button and a 2x16 character LCD display. It also has a plug to connect it to the camera (via a 2-channel optocoupler) and is powered with 4 AA batteries.

The UI is composed of 4 screens:

  • a status screen, showing how many pictures have been taken so far, as well as the voltage of the batteries
  • a start/stop screen
  • a screen for setting the number of pictures
  • a screen for setting the time interval between the pictures.

Turning the knob moves from one screen to the other, while pressing its button activates the current screen (e.g., starting or stopping, or allowing to change the value of e.g., the time interval).

The last two screens are disabled when the timer is started, and re-enabled when it is stopped. Also, the screen is turned off after a 10s timeout, and switched back on when the button is pressed or the knob is rotated. This allows to reduce the power consumption from abuot 24 mA to 8 mA. This way, a set of 2000 mAh rechargeable batteries should last over 200 hours.

[ Posté le 28 décembre 2011 à 20:40 | pas de commentaire | ]

L'affaire Trinski

Catégories : [ Livres/BD/Midi minuit ]

ISBN: 9782302013568

© Amazon.fr

Huitième volume des Arcanes du Midi-Minuit publié en 2011. Trinski, commandeur des armées d'une province proche d'York a pris le pouvoir et terrorise la population. Les agents du roi sont envoyés découvrir ce qu'il est advenu de l'ancien gouverneur. À l'annonce de la mort du leader de l'opposition, le Commandeur lui-même se rend sur place et fini par arrêter le « découpeur », un tueur qui terrorise tout le monde. Ce dernier se révèle être le véritable Trinski, alors qu'il employait un sosie pour toutes ls apparitions publiques qui comportaient des risques.

[ Posté le 28 décembre 2011 à 19:30 | pas de commentaire | ]

Mardi, 27 décembre 2011

Crimes et délits cocasses

Catégories : [ Livres ]

ISBN: 9782749121307

© Amazon.fr

Premier livre de ma petite-cousine Pauline Arrighi, une compilation de faits divers amusants ou navrants de bêtise.

[ Posté le 27 décembre 2011 à 20:43 | pas de commentaire | ]

Samedi, 17 décembre 2011

George Gale Summer Breeze

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Fuller's ]

George_Gale_Summer_Breeze

“blend of malted wheat and barley, Saaz hops”

Yet another pale ale, but closer to the kind I don't like very much. Contains malted wheat and barley.

George Gale &Co. Ltd, Fuller's Brewery, London, England. 3.8% alcohol.

[ Posté le 17 décembre 2011 à 21:19 | pas de commentaire | ]

Jeudi, 15 décembre 2011

Transformers: Dark of the Moon

Traduction: [ Google | Babelfish ]

Catégories : [ TV/Cinéma/Transformers ]

http://en.wikipedia.org/wiki/Transformers%3A_Dark_of_the_Moon

Wikipedia

The reason NASA went to the Moon is to explore the wreck of an alien ship (which happens to contain a weapon that could have ended the war between the Autobots and the Decepticons). In the present, the Autobots discover a fuel cell from that ship in Chernobyl, leading them to learn about the wreck on the moon and the retrieval of part of the weapon and of Sentinel Prime (revived by Optimus thanks to the gadget found in the previous movie), the inventor of the weapon and the only one who knows how to use it. It turns out that Sentinel was actually allied with the Decepticons because he thought it was the only way to end the war. His plan is to use the weapon (actually a long-distance transport system) to take Cybertron to the Earth and use the humans as slaves to rebuild it. An endless battle in Chicago (where the Decepticons are installed) ensues, and is won only because Sam's new girlfriend manages to turn Megatron, the leader of the Decepticons, against Sentinel (by whom he feels his authority is threatened).

[ Posté le 15 décembre 2011 à 23:45 | pas de commentaire | ]

Lundi, 12 décembre 2011

Crouching Tiger, Hidden Dragon

Traduction: [ Google | Babelfish ]

Catégories : [ TV/Cinéma ]

http://en.wikipedia.org/wiki/Crouching_Tiger,_Hidden_Dragon

Wikipedia

As confusing as first time I watched it, Finnnish subtitles didn't help much this time either. Just check the summary on Wikipedia

[ Posté le 12 décembre 2011 à 23:45 | pas de commentaire | ]

Samedi, 10 décembre 2011

BrewDog There is no Santa

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Brewdog ]

BrewDog_There_is_no_Santa

“A limited edition seasonal stout brewed with cocoa nibs and ginger stems”

Tastes like Finnish piparkakku. The ginger is very obvious, but somehow the cocoa is not very clearly present. I wouldn't be surprised if there would be also cloves in the recipe. Contains barley malt.

BrewDog Ltd., Fraserburgh, Scotland. 4.7% alcohol

[ Posté le 10 décembre 2011 à 18:56 | pas de commentaire | ]

Mercredi, 7 décembre 2011

Les dents de pierre

Catégories : [ Livres/BD/Les forets d'Opale ]

ISBN: 9782302018709

© Amazon.fr

Septième volume de la série Opale publié en 2011. Darko et ses amis tentent de traverser la Dorsale à la recherche de Cohars et des titans. Sleilo, dans l'espoir de revoir l'esprit de Bynöod, utilise la pierre de ténèbres trouvée dans un souterrain dans la montagne, autour du cou de la momie de Cohars. Les voyageurs sont fait prisonniers des klaoptèques, habitants du souterrai et de la vallée perdue qui en débouche. Pendant leur fuite, ils trouvent un titan prisonnier, qui leur raconte que Cohars a été corrompu par la pierre des ténèbres et a conduit les titans à leur perte. Sleilo, aidée par l'esprit de Bynöod, se rend maîtresse de la pierre et des Klaoptèques, et libère le titan.

[ Posté le 7 décembre 2011 à 21:16 | pas de commentaire | ]

Samedi, 3 décembre 2011

Moles St Elmo's Golden Fire

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Moles ]

Moles_St_Elmo_s_Golden_Fire

“brewed with Maris Otter malted barley and hoped with Willamette and Celeia leaf hops”

Quite nice, sweet and a bit fruity. Contains malted barley.

Moles Brewery, Melksham, Wiltshire, England. 4.4% alcohol.

[ Posté le 3 décembre 2011 à 20:18 | pas de commentaire | ]

Vendredi, 2 décembre 2011

Don't Forget pinMode()

Traduction: [ Google | Babelfish ]

Catégories : [ Bricolage/Arduino ]

I spent hours with a friend trying to solve the following problem: an LED and a 430R resistor are connected to the pin of an Arduino (actually an RBBB powered with 3.3 V). Using digitalWrite(pin, HIGH) it did light the LED, but it was very dim. What was more weird, is that the pin was showing only 1 V instead of 3.3 V. After two hours of scratching our heads, I looked up on Google and found the answer: “don't forget to call pinMode(pin, OUTPUT)…”

At boot time, the pins are set as inputs. digitalWrite(pin, HIGH) switches the internal pullup resistor (20K – 50K), which is enough to allows the pin to source a little bit of current at a quite low voltage. It was enough the dimly light the LED, but not enough to get the optocoupler (that was initially connected to the pin) to work properly.

[ Posté le 2 décembre 2011 à 16:38 | pas de commentaire | ]

Mercredi, 30 novembre 2011

Le donjon de Naheulbeuk, volume 6

Catégories : [ Livres/BD/Naheulbeuk ]

ISBN: 9782353251704

© Amazon.fr

Sixième volume du donjon de Naheulbeuk, publié en 2009. Les aventuriers reviennent à Boulgourville et reçoivent leur récompense, mais en perdent la plus grande partie en taxes diverses et en remboursement de dettes. On leur annonce aussi que par leur faute, Gontran Théogal a maintenant toutes les statuettes (sauf qu'en fait non parce qu'on lui en a juste volé une) et pourra s'en servir pour lancer le sortilège qui permettra le retour de Dlul et plongera la Terre de Fangh dans l'oubli éternel.

[ Posté le 30 novembre 2011 à 21:07 | pas de commentaire | ]

Retour aux sources

Traduction: [ Google | Babelfish ]

Catégories : [ Livres/BD/Aquablue ]

ISBN: 9782756012636

© Amazon.fr

Douzième volume d'Aquablue. Nao revient sur Aquablue après avoir trouvé des traces de l'antique civilaisation d'Aquablue en Antarctique. Avec une équipe de recherche, il étudie la faune de la planète, et trouve une concordance génétique avec celle de la Terre. La nouvelle est ébruitée par des journalistes, et le gouvernement de la Terre décide de changer la loi qui interdisait l'exploitation d'Aquablue, afin de permettre aux humains d'aller s'installer « sur leur planète d'origine ». Les patrons de la Texec se frottent les mains.

[ Posté le 30 novembre 2011 à 21:02 | pas de commentaire | ]

Mardi, 29 novembre 2011

L'énigme Banks

Catégories : [ Livres/BD/Golden City ]

ISBN: 9782756025186

© Amazon.fr

Neivième volume de la série Golden City. L'attaque contre Golden City avait été commandité par Irina Banks pour mettre la main sur les quatre personnes qui avaient tenté de la tuer cinq ans plus tôt (à la suite de quoi elle s'était fait passer pour morte). En parallèle, les enfants sont à nouveau réunis, et grâce à l'argent caché par le père de Loli, ils partent à la recherche de Banks (qui a disparu en tentant de protéger Golden City contre une torpille venant d'on ne sait où).

[ Posté le 29 novembre 2011 à 20:54 | pas de commentaire | ]

Vendredi, 25 novembre 2011

Moles Stocking Filler

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Moles ]

Moles_Stocking_Filler

“Chestnut coloured, gruity, malty, well hopped bitter… brewed with English Maris Otter malted barley, some roasted barley and Fuggles and Golding Variety hops.”

Just another ale. Contains barley.

Moles Brewery, Melksham, Wiltshire, England. 4.7% alcohol.

[ Posté le 25 novembre 2011 à 21:26 | pas de commentaire | ]

Mercredi, 23 novembre 2011

Boules de poils (1)

Catégories : [ Livres/BD/Troy ]

ISBN: 9782302016293

© Amazon.fr

Quinzième volume de Trolls de Troy publié en 2011. Pour se protéger d'une attaque de trolls, deux marchands volant en dragon réduisent par magie tout ce qui se trouve en dessus d'eux. Les trolls partent alors à la recherche des marchands afin qu'ils réduisent le reste du monde aussi. Ils sont d'abord attrapés par deux escrocs et enchantés (sauf Waha), parviennent à s'échapper et à retrouver leur amie humains Trollane pour lui demander de les aider à retrouver les marchands. Attaqués par des gardes alors qu'ils étaient en train de convaincre les marchands de leur redonner leur taille normale, seul Roken est agrandi, et tous finissent par s'échapper sur un dragon qui transporte un colis précieux vers Eckmül.

[ Posté le 23 novembre 2011 à 21:00 | pas de commentaire | ]

Dimanche, 20 novembre 2011

Harviestoun Mr Sno'Balls

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Harviestoun ]

Harviestoun_Mr_Sno_Balls

“brewed with pale and crystal malts with a touch of roast barley. The hop additions are Challenger for bitterness and Styrian for its floral citrus aroma.”

Quite sweet, not too bitter. Not convinced about the floral citrus aroma, I found it had more of a kind of a very fresh red fruit nuance. Contains barley and wheat.

Harviestoun Brewery, Alva, Clackmannanshire, Scotland. 4.5% alcohol.

[ Posté le 20 novembre 2011 à 20:23 | pas de commentaire | ]

Jeudi, 17 novembre 2011

Transformers: Revenge of the Fallen

Traduction: [ Google | Babelfish ]

Catégories : [ TV/Cinéma/Transformers ]

http://en.wikipedia.org/wiki/Transformers%3A_Revenge_of_the_Fallen

Wikipedia

The Fallen is a Decepticon that has been hiding far away in the solar system and wants to find the key to a device, hidden somewhere on Earth, that would destroy the sun and produce energon. The Decepticons are chasing Sam because he got infused with a bit of the All Spark, has visions of symbols (of the language of the Primes) that can lead him to the key and is now the only one who can actually find the key. The autobots are protecting Sam, but Optimus Prime is killed. Sam then looks for the key that should allow to ressuscitate Optimus. They finally locate the key in Egypt. After a long battle for the control of the device (located at the top of a pyramid), Sam manages to save Optimus Prime while the army destroys the device.

[ Posté le 17 novembre 2011 à 22:28 | pas de commentaire | ]

Vendredi, 11 novembre 2011

Traffic Shaping

Traduction: [ Google | Babelfish ]

Catégories : [ Informatique ]

I have an asymetrical ADSL connecion (1024 kbps downstream, 512 kbps upstream) and when I'm downloading a large file, SSH connections become unresponsive. After a bit of reading, I found one traffic shaping script that allows to keep responsive interactive SSH connections, at the cost of a slightly limited download speed. The explanations are from the Linux advanced routing and traffic control howto, in the cookbook chapter.

The explanations goes like this:

“ISPs know that they are benchmarked solely on how fast people can download. Besides available bandwidth, download speed is influenced heavily by packet loss, which seriously hampers TCP/IP performance. Large queues can help prevent packet loss, and speed up downloads. So ISPs configure large queues.

These large queues however damage interactivity. A keystroke must first travel the upstream queue, which may be seconds (!) long and go to your remote host. It is then displayed, which leads to a packet coming back, which must then traverse the downstream queue, located at your ISP, before it appears on your screen.

This HOWTO teaches you how to mangle and process the queue in many ways, but sadly, not all queues are accessible to us. The queue over at the ISP is completely off-limits, whereas the upstream queue probably lives inside your cable modem or DSL device. You may or may not be able to configure it. Most probably not.

So, what next? As we can't control either of those queues, they must be eliminated, and moved to your Linux router. Luckily this is possible.

Limit upload speed By limiting our upload speed to slightly less than the truly available rate, no queues are built up in our modem. The queue is now moved to Linux.

Limit download speed This is slightly trickier as we can't really influence how fast the internet ships us data. We can however drop packets that are coming in too fast, which causes TCP/IP to slow down to just the rate we want. Because we don't want to drop traffic unnecessarily, we configure a 'burst' size we allow at higher speed.”

It really does wonders, on the condition that you set the DOWNLINK speed to 800 kbps (80% of my downlink) and the UPLINK to 440 kbps (85% of my uplink). I tried with 900 kpbs instead of 800, and it didn't work. One day, I will take the time to think about the why, but for now I'm just happy that it works properly.

Next step: try to get this to work on the ADSL modem/router (luckily running linux and accessible with ssh) instead of the desktop.

[ Posté le 11 novembre 2011 à 22:09 | pas de commentaire | ]

Jeudi, 10 novembre 2011

20,000 Leagues under the Sea

Traduction: [ Google | Babelfish ]

Catégories : [ TV/Cinéma ]

http://en.wikipedia.org/wiki/20,000_Leagues_Under_the_Sea_%281954_film%29

Wikipedia

1868. In the South Pacific, ships are destroyed by a mysterious monster. Prof. Arronax is investigating the mystery when his ship is attacked by the monster. It is actually a submarine named the Nautilus, whose captain, Nemo, enventually decides to take in the professor and the two other survivors of the attack. Nemo and his crew live exclusively from products of the sea, and together they fight against everything that is used for making war, thus saving the lives of the thousands who would have been killed by the destroyed hardware. As the Nautilus reaches its base, it is ambushed by British forces (directed to the island by messages-in-a-bottle sent by one of the companions of Arronax) and Nemo is mortally wounded. He then decides to sink the Nautilus and his whole crew with him. Arronax and his companions manage to escape just in time.

[ Posté le 10 novembre 2011 à 20:46 | pas de commentaire | ]

Mercredi, 2 novembre 2011

Git in a (Very Small) Nutshell

Traduction: [ Google | Babelfish ]

Catégories : [ Informatique/Git ]

When I started to use git and read the man pages, I was sorely missing a brief description of how Git's features and concepts relate. Now that I finally understand (at least, I think) how Git works, I wrote this document. It's not a tutorial (the existing ones are good enough that I don't need to write another one), but rather a summary of how Git's main features relate to the jargon used in the man pages.

Saving your changes

Let's say you have a set of files in your working tree. Git works by saving a full copy (snapshot) of this set; this is called a commit. When you want to make a new commit using Git, you first need to tell Git which files are going to be part of this commit. You do this with the git add my_file command. The files are then added to the index, which is the list of files that are going to compose the commit. You then run git commit, which creates a new commit based on the files listed in the index. You are also prompted for a message that describes the commit. The message is structured with a heading (the first line of the message) separated by an empty line, from the body of the message. Lines starting with a hash symbol are comments and are not recorded into the message.

Adding a new file to the index and creating a commit containing this file has the side effect of letting Git track this file. If you want to create a commit composed of all the tracked files, you can run git commit -a, which implicitely adds all the tracked files to the index before creating a new commit.

A commit is identified by a SHA1 hash of its content, e.g, cdf18108b03386e1b755c1f3a3feaa30f9529390. Any non-ambiguous prefix of that hash can be used as a commit ID e.g., cdf1810.

The add/commit mechanism allows to split a set of changes into multiple commits (you create a commit for a subset of your files, then you create another commit for the rest of your files).

Creating a new repository

For a new project

The command git init creates a repository in the current directory (a .git directory that holds all the data necessary for Git to work). You can then add the files you need to have under version control (using git add, wildcards such as '*' are accepted) and create the initial commit with git commit.

Copying an existing repository

To copy an existing repository, use the git clone command. Most services that offer source code as Git repositories indicate the necessary Git command line to run.

Finding a commit

To view a summary of the changes that have happened in the repository, you can use git log; the top of the list is the most recent commit. To view the succession of changes (as diffs) that were made, use git log -p.

Git does its best not to lose anything you have recorded. The command git reflog shows a log of how the tip of branches have been updated, even if you have done acrobatic things.

Branches

When you make changes to your working tree and create a new commit, Git links the new commit to the commit that represents the state of the working directory before the changes (called in this context the parent of the new commit). The chain composed of the new commit, its parent, its parent's parent and so on, is called a branch. The name of the default branch is “master”. The most recent commit in a branch is called its HEAD.

A branch is nothing more than a name and the commit identifier of its tip; this is called a ref. For example refs/heads/master is the ref for the master branch. Finding the commits that compose the branch is a simple matter of following the tip's parent, and the parent's parent, and so on.

If you can decide to fork your work at some point, create a new branch by running git branch new_branch. This command creates the branch, but does not switch to that branch (changes and commits will still be appended to the current branch). To effectively change branch, you need to checkout the HEAD of the new branch by running git checkout new_branch. From this point on, changes and commits will be appended to the new branch.

Merging

If at some point it is necessary to merge the content of e.g., the new branch into the “master” branch, you need to checkout “master” and then run git merge new_branch.

If Git doesn't know how to merge two branches, it complains about conflicts and lets the user edit the incriminated files by hand. This is done by choosing, in sections of these files indicated with <<<<<< and >>>>>>> markers, which variant is to be retained. Once the editing has been made, the changes need to be committed (with git commit -a).

Checking out

You can checkout any commit with git checkout and thus have your working directory reflect the state of the repository at any point in time. When you do that, you are not on any branch anymore, which will cause various warning messages (such as “You are in 'detached HEAD' state”) and cause Git to behave in a way you may not expect (that is, if you don't understand properly yet how Git works). To go back to a “normal” situation, just run git branch master (or any other branch that exists). To prevent going into detached HEAD state, use git checkout -b new_branch to create a new branch that starts at <commit>.

If you have made local changes, Git won't let you checkout another branch. You must either commit them or reset the working tree before being allowed to do the checkout.

Reset

The command git reset allows to do multiple things. One of its most common use (git reset --hard) is to cancel all changes you have made to the working tree since the last commit.

If you specify a commit ID after git reset, it will move the HEAD of the current branch back to that commit, which becomes the new HEAD; all commits after this point are removed from the branch (but not from the repository! You can always restore the old HEAD by finding its commit ID with git reflog).

Working with remote repositories

Pull (and Fetch)

Some time after you have cloned a public repository, you may want to update your local copy so that it mathtches the latest version available at the original repository. This update is done with with git pull. When the repository was cloned, Git had created a remote (a link to the source repository) called by default “origin”. Below the hood, git pull calls git fetch to retrieve the commits from all the relevant branches on “origin”, and then calls git merge to merge those changes with the local current branch.

Note that refs/remotes/origin/master is the ref to the master branch at “origin”, but it is actually a branch stored locally that reflects the “master” branch on the “origin” repository. This kind of ref is used for specifying what remote branch is tracked by what local branch when using git fetch. Typically, +refs/heads/:refs/remotes/origin/ indicates that e.g., the local branch “master” tracks the remote branch “origin/master” (“*” represents a wildcard).

Push

If you have writing permissions on the remote repository, you can send your changes using git push (it defaults to the “origin” remote). Note that the HEAD of the branch to which you push changes must be the parent of your changes. If this is not the case, the push will fail and you will be asked to first pull from the remote repository to get the latest version, fix potential conflicts and only then push your changes.

It is also important to remember that you cannot normally push to a repository that has a working tree. The remote repository must have been created with the git init --bare command.

[ Posté le 2 novembre 2011 à 08:36 | pas de commentaire | ]

Samedi, 29 octobre 2011

Williams Cock o' the Walk

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Williams ]

Williams_Cock_o_the_Walk

“A classic red ale; brewed with large amounts of crystal malts, which give the beer a warm, red colour. Lots of whole hops – Cascade and Bobek – add a citrusy, hoppy aroma.”

Not bad, quite sweet and fruity/citrusy. Contains malted barley and malted wheat.

Williams Bros Brewing Co., Alloa, Scotland. 4.3% alcohol.

[ Posté le 29 octobre 2011 à 20:37 | pas de commentaire | ]

Dimanche, 23 octobre 2011

Git Recipes

Traduction: [ Google | Babelfish ]

Catégories : [ Informatique/Git ]

Here are a few recipes I use with git.

Using git log

Show which files have been modified by the commits: git log --name-status

View the successive changes for a given file: git log -p -- my_file (latest change first)

View the changes at word-level instead of line-level: git log --color-words

Make --color-words more readable with LaTeX files: add *.tex diff=tex to the repository's .git/info/attributes or to your $HOME/.gitattributes (read man gitattributes for more info on this, it supports other languages too)

Browseable Web Repository

To make an online, browsable web repository on a web server (I assume you have ssh access to it).

On the server, run:
$ mkdir some_directory
$ cd some_directory
$ git init
$ git config receive.denyCurrentBranch ignore
$ cat > .git/hooks/post-receive <<EOF
#!/bin/sh
GIT_WORK_TREE=.. git checkout -f
GIT_WORK_TREE=.. git update-server-info --force
EOF
$ chmod a+x .git/hooks/post-receive
The in the source repository, run:
$ git remote add web username@my.web.server:path/to/some_directory/.git
$ git push web master

(“username”, “my.web.server” and “path/to/” are exactly what you think they are.) Note the “.git” at the end of the path, it has to be there because git push is going to send its data into that directory.

When you run git push web master to upload the content of the source repository to the web repository, the post-receive hook checks out the latest version. The next time, you don't need to specify the “master” branch any more, simply running git push web is enough.

[ Posté le 23 octobre 2011 à 15:57 | pas de commentaire | ]

Dimanche, 16 octobre 2011

Men in Black

Traduction: [ Google | Babelfish ]

Catégories : [ TV/Cinéma/Men in Black ]

http://en.wikipedia.org/wiki/Men_in_Black_%28film%29

Wikipedia

Just read Wikipedia's page Men_in_Black_(film).

[ Posté le 16 octobre 2011 à 15:23 | 1 commentaire | ]

Mercredi, 12 octobre 2011

Autofs

Traduction: [ Google | Babelfish ]

Catégories : [ Informatique ]

Autofs allows to automatically mount a filesystem when changing directory to the mounting point. The process is frozen while the file system is being mounted, and then the chdir() completes and enters the root of newly mounted filesystem.

I have been using autofs for several years, at first for mounting USB sticks, but now also for SMB shares and SSHFS. It is meant to be used for command-line users, I don't doubt that modern desktop environments provide the same features for GUI users.

The following describes my setup on a Debian Squeeze; there may be a more modern way of doing things (the original setup was on a Debian Sarge). I assume that you know how to administrate a Debian system (in other words, I won't be held responsible for damaging your system if you follow those instructions without understanding what they mean).

Autofs

The first step is to install the autofs, bsdutils, coreutils, lockfile-progs, gawk (or mawk), sed and the util-linux packages (most of those are probably installed already). The wget package (and command) allows me to write concise commands below, but feel free to use any other tool to download the necessary files from my web page.

USB Automounter

This setup allows to mount automatically any USB Mass Storage device, without the need to manually configure anything (as is the case in this Debian tutorial).

Edit as root the /etc/auto.master and add the following line:

/media  /etc/auto.usb  --timeout=3

Then run the following as root:

# mkdir -p /media
# mkdir -p /var/run/usbautomount
# mkdir -p /etc/usbautomount
# wget -O /etc/usbautomount/usbautomount http://weber.fi.eu.org/software/autofs/usbautomount
# chmod 755 /etc/usbautomount/usbautomount
# wget -O /etc/udev/usbautomount.rules http://weber.fi.eu.org/software/autofs/usbautomount.rules
# cd /etc/udev/rules.d
# ln -s ../usbautomount.rules z60_usbautomount.rules
# /etc/init.d/autofs restart

You then need to edit /etc/usbautomount/usbautomount to change references to mweber to your own username, and possibly change the mounting options (see line 142 of the script). I still use latin1 as a character encoding, so I want filenames to be automatically translated into latin1 for VFAT filesystems. Other filesystems are mounted without particular options.

The idea here is that when you plug a USB Mass Storage device into the computer, udev runs the usbautomount script that creates a name based on the USB device's vendor, model, instance (in the case the physical device contains more than one USB Mass Storage device, such as multi-card readers or smartphones with internal and removable flash memory) and partition number, creates a symlink in /var/run/usbautomount that points to a directory of the same name in /media. When you access the symlink, automount creates the directory in /media and mounts the file system from the USB device to that directory.

If you chdir() out of that directory, after 3 seconds automount unmounts the filesystem. If you chdir() into the directory again, automount mounts it again. The short timeout for automatic unmounting allows to unplug the device almost immediately after cd-ing out of the mount point (provided that there is no data to be written onto the device anymore). When you unplug the device, a script (generated by usbautomount when the device was plugged in) is run to remove the symlink from /var/run/usbautomount.

The cherry on the cake of this setup is the following:

$ mkdir $HOME/mnt
$ ln -s /var/run/usbautomount $HOME/mnt/USB

This way, $HOME/mnt/USB is automatically populated with links to the devices that you plug to your computer.

SMB/CIFS shares

The smbclient and cifs-utils packages need to be installed.

Run as root:

# mkdir -p /mnt/smb

Edit as root the /etc/auto.master and add the following line:

/mnt/smb  /etc/auto.smb  --timeout=10

(/etc/auto.smb comes with the autofs package).

Run this as your regular user:

$ ln -s /mnt/smb $HOME/mnt/smb

If you have an SMB/CIFS server named "foo" containing shares called "bar" and "quux", then going into /mnt/smb/foo will mount "bar" and "quux" in /mnt/smb/foo/bar and /mnt/smb/foo/quux. Automatic unmounting will happen 10 seconds after leaving /mnt/smb/foo.

If "foo" requires credentials (login and password), you can put them in /etc/auto.smb.foo as follows:

username = my_username
password = my_password

SSHFS

SSHFS itself requires some amount of setup. I will assume in the following that the client computer is called "local" and it accesses using SSH and SSHFS a remote computer called "remote" with user "user".

First, install the sshfs package. Then you need to create an SSH key for root@client, and authorize this key for user@remote. In the end, root@local must be able to log into user@remote using an SSH key instead of a password.

Once this is working, run as root:

# mkdir -p /mnt/ssh

Then edit /etc/auto.master as root and add the line:

/mnt/ssh  /etc/auto.ssh  --timeout=10,--ghost

Then create /etc/auto.ssh and add a line that looks like this (change the "user", and "remote" as needed):

remote -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#user@remote\:

By default, SSHFS will mount the home directory of "user@remote" into /mnt/ssh/remote. If you need to acces another directory (e.g., /tmp), just append this path to the end of the line in /etc/auto.ssh:

remote-tmp -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#user@remote\:/tmp

Finally, run this as your regular user:

$ ln -s /mnt/ssh $HOME/mnt/ssh

CDROM

It just came to my mind the other day that I could automount CD and DVD as well, but I haven't thought about the details yet. I remember the feature to be very annoying in Solaris twelve years ago, where the system was mounting the CD in a directory named after the label of the CD's filesystem, and never removing this directory. After mounting a few discs, the automount directory was filled with various directories with abtruse names, and you had to guess which one contained your data (I suppose mount would have told me what I wanted to know, I don't remeber if I tried that).

[ Posté le 12 octobre 2011 à 11:49 | 3 commentaires | ]

Lundi, 10 octobre 2011

I Shall Wear Midnight

Traduction: [ Google | Babelfish ]

Catégories : [ Livres/Discworld ]

ISBN: 9780552555593

© Amazon.fr

Tiffany is working as the Chalk's only witch in a climate of growing suspicion and prejudice. When the local Baron dies of poor health, she is accused of murder. She then travels to Ankh-Morpork to inform the Baron's heir, Roland, who happens to be in the city with his fiancée Letitia. On the way Tiffany is attacked by a bad-smelling fantomatic figure, the Cunning Man. In the city she meets a witch, Mrs Proust who helps her to find Roland and Letitia. Because of the Nac Mac Feegles (who follow Tiffany everywhere), they are accused of destroying a pub. Tiffany and Mrs Proust are arrested by Carrot and Angua, and locked up for their protection, as people start to resent witches. When they are released the next day, Tiffany meets Eskarina Smith who explains that the Cunning Man was, a thousand years ago, an Omnian witch-finder, who had fallen in love with a witch. That witch, however, knew how evil the Cunning Man was. She was eventually burnt to death, but as she was being burned she trapped the Cunning Man in the fire as well. The Cunning Man became a demonic spirit of pure hatred, able to corrupt other minds with suspicion and hate. Eskarina announces that the Cunning Man is coming. Tiffany and the Feegles return to the Chalk, where they find the Baron's soldiers trying to dig up the Feegle mound. She stops them, and goes to see Roland, who throws her in a dungeon. It is later learned that the Cunning Man was the cause of these actions. Tiffany however escapes and goes to see Letitia, whom she discovers is also an untrained but talented witch. She sees the Cunning Man twice while at Letitia's home, and as guests begin to arrive at Roland and Letitia's wedding, the other witches start to arrive…so that if the Cunning Man takes over her body, they can kill her. The night before the wedding, Tiffany, Roland, Letitia and Preston (a castle guard whom Tiffany has befriended) meet at one of the fields that needs to be burned to clear it of stubble; Tiffany lures the Cunning Man into the flames and defeats him.

(Shamlessly adapted from Wikipedia's I Shall Wear Midnight)

[ Posté le 10 octobre 2011 à 20:49 | 1 commentaire | ]

Vendredi, 30 septembre 2011

BrewDog Hardcode IPA

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Brewdog ]

Brewdog_Hardcore_IPA

Smells strongly of litchi and a bit of passion fruit. Also quite bitter and terribly strong in alcohol. Contains malted barley.

BrewDog Ltd., Fraserburgh, Scotland. 9.2% alcohol

[ Posté le 30 septembre 2011 à 23:00 | pas de commentaire | ]

Dimanche, 25 septembre 2011

Crumble aux poireaux

Catégories : [ Cuisine ]

Cette recette est adaptée de ce que j'ai vu dans un épisode de l'émission 30-minute meals avec Jamie Oliver. J'ai vu moins de la moitié de l'épisode, et donc je n'avais aucune idée de ce que le plat devait donner.

Ingrédients

  • 3 poireaux
  • 1 gros oignon
  • 140g de lard fumé en tranches fines
  • 3 gousses d'ail
  • 4 grosses tranches de pain
  • huile d'olive
  • thym
  • romarin
  • 100mL eau

Préparation

Faire revenir le lard coupé en morceaux, verser (avec la graisse fondue) dans un plat allant au four. Ajouter l'oignoon émincé (pas trop fin), puis couvrir avec les poireaux émincés. Verser l'eau, saupoudrer avec le thym et le romarin, et placer 20 min au four préchauffé à 200 °C. Placer le pain, les gousses d'ail non épluchées et une bonne rasade d'huile d'olive dans un mixer, et mixer jusqu'à obtenir des miettes imbibées d'huile. En saupoudrer le plat, et repasser au four 10 minutes.

Commentaires

  • J'ai servi ce plat en plus de pommes de terre roties comme accompagnement de morceaux de filets de truite saumonnée grillés à la poële.
  • Après lecture de la recette, je pense qu'il faudrait faire revenir les oignons et les poireaux avec le lard, probablement sans eau, et ne mettre au four que pour faire dorer les miettes de pain.
  • La recette d'origine est un pseudo-cassoulet, donc on rajoute de la purée de tomates et des haricots blancs dans la préparation, et on y dépose des saucisses.

[ Posté le 25 septembre 2011 à 18:10 | pas de commentaire | ]

Le phare

Catégories : [ Livres ]

ISBN: 2290049387

© Amazon.fr

Dans un loitain futur, après les Grandes Hécatombes qui ont causé le chaos et mis fin à la civilation telle que nous la connaissons, l'humanité est télépathiquement connectée en permanence grâce à la mystérieuse Assemblée, rendant les communications instantanées. Dans certaines parties du monde cependant, des personnes veulent mettre fin à la dépendance à l'Assemblée. L'arrivée inopinée du Vaisseau et de quatre Voyageurs venus du fin fond de l'espace bouleverse l'existence des humains. Les Ajusteurs, police secrète de l'Assemblée savent que l'Assemblée est en fait un Phare laissé par les Voyageurs lors de leur précedent visite (qui a causé les Grandes Hécatombes en apportant avec eux des maladies nouvelles) et que les Voyageurs sont là pour décider si le temps est venu pour un nouveau contact, ce qui mettrait le Phare (et donc l'Assemblée) hors d'usage. Mais les opposants à l'Assemblée veulent discréditer cette dernière en révélant les agissement des Ajusteurs. Pour ce faire, ils ont invité un Juge de la Cour Universelle de l'Assemblée à être témoin impartial des événements et les rapporter au monde entier. Divers événements, dont l'arrestation du chef du gouvernement local, accusé d'avoir ordonné l'enlèvement d'une Voyageuse, provoquent un conflit entre les locaux et les forces des Ajusteurs. Trois des quatre voyageurs sont tués, rendant théoriquement impossible l'appel du Vaisseau. Mais la Voyageuse, dont le Juge était tombé amoureux, convainc ce dernier d'appeler avec elle le Vaisseau, et les malversations des Ajusteurs et l'origine réèlle de l'Assemblée sont révélées à travers cette dernière.

[ Posté le 25 septembre 2011 à 11:09 | pas de commentaire | ]

Samedi, 24 septembre 2011

Orkney Norther Light

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Orkney ]

Orkney_Northern_Light

“citrus fruit, apricot and hop-resin aromas… malt character… hoppy, zesty approachability”

What the hell is approachability? Anyway, the beer's quite citrusy, but the after-taste has this I-don't-know-what I don't like in Germanic lagers. Contains malted barley and malted wheat.

Sinclair Breweries Ltd, The Orkney Brewery, Stromness, Orkney, Scotland. 4.0% alcohol.

[ Posté le 24 septembre 2011 à 20:27 | pas de commentaire | ]

Dimanche, 18 septembre 2011

Tréma manuel en LaTeX

Catégories : [ Informatique ]

La fonte Stork Bill ne possède pas de caractère accentué du tout. Pour fignoler le livret de règles du Decktet, il me fallait un “ä” et un “ö” pour écrire “Quäsenbö” (le titre d'un jeu). J'ai donc bricolé un tréma à la main à partir de deux points:

\makeatletter
 
\newcommand{\umlaut}[1]{%
\sbox\@tempboxa{#1}%
\@tempdima -.5\wd\@tempboxa
\@tempdimb 1.1\ht\@tempboxa
\sbox\@tempboxa{..}%
\advance\@tempdima -.5\wd\@tempboxa
#1\hskip\@tempdima\raisebox{\@tempdimb}{\usebox\@tempboxa}%
}

La commande s'utilise de cette manière:

Qu\umlaut{a}senb\umlaut{o}

Le résultat est potable pour la fonte en question, qui en tant que fonte décorative n'a pas besoin d'être parfaitement régulière, mais ne donne rien de bon avec par exemple lmodern (qui n'en a pas besoin de toutes façons puisque cette dernière contient déjà les caractères accentués idoines).

[ Posté le 18 septembre 2011 à 15:52 | pas de commentaire | ]

The Five Venoms

Traduction: [ Google | Babelfish ]

Catégories : [ TV/Cinéma ]

http://en.wikipedia.org/wiki/The_Five_Venoms

Wikipedia

The dying master of the powerful Poison Clan asks his last pupil Yang De to find his five predecessors who have been taught five different styles of kungfu: the Centipede, the Snake, the Scorpion, the Lizard and the Toad. Their names and whereabouts are unknown (they don't even all know each other), but the master worries that some of them might have used their skills to do evil, and that they are especially after the treasures hold by yet another, much older student. The Centipede is seen by a witness at the house of the oldest pupil, who has been found dead with his whole household the next morning. Officers He and Ma investigate and find clues that they were killed by the Centipede and the Snake, and that the yet unknown Scorpion has got the map to the treasure. The Toad then helps the helpless policemen to arrest the Centipede. But the judge in charge of the affair, a friend of the Snake, sends He on a bogus errand and corrupts the witness into telling that he saw the Toad and not the Centipede that night. The Toad is then “suicided” in his cell by a corrupt policeman, who is himself later killed by the Centipede, as is the witness. When He comes back, he meets Yang De and together they decide to take down the Centipede and the Snake. Officer Ma tags along, and reveals himself to be the Scorpion. The three evildoers are eventually killed by the two remaining heroes.

[ Posté le 18 septembre 2011 à 14:58 | pas de commentaire | ]

Samedi, 17 septembre 2011

Wells Bowman Stout

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Wells ]

Wells_Bowman_Stout

Roasted, coffe-ish, both sweet and bitter. Contains barley (dark/light) malt and oats.

Wells & Young's Brewing Company Ltd, Bedford, Bedfordshire, England. 5.2% alcohol.

[ Posté le 17 septembre 2011 à 20:18 | pas de commentaire | ]

Atlas Latitude Highland Pilsner

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Atlas ]

Atlas_Latitude

“British ale malt, continental lager malt, German and Slovenian hops… crisp, refreshing attack and a lingering fresh green hop flavour.”

Slightly bitter, nothing really remarkable. Contains malted barley and malted wheat.

Sinclair Breweries Ltd, Atlas Brewery, Kinlochleven, Lochaber, Scotland. 3.9% alcohol.

[ Posté le 17 septembre 2011 à 14:01 | pas de commentaire | ]

Atlas Three Sisters

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Atlas ]

Atlas_Three_Sisters

“gently roasted barley malt… ruby color and toasted flavour… light fruitiness”

Just another ale. Contains malted barley and malted wheat.

Sinclair Breweries Ltd, Atlas Brewery, Kinlochleven, Lochaber, Scotland. 4.2% alcohol.

[ Posté le 17 septembre 2011 à 14:00 | pas de commentaire | ]

Mercredi, 14 septembre 2011

Chocolats 22

Catégories : [ Cuisine/Chocolats ]

Christian, Papouasie : doux, mou, bon

Christian, St. Domingue : ? intense, truffe

Christian, Venezuela Sur del Lago : acide, fruité ? noix

Christian, Equateur : fleuri, citronelle

Christian, Sao Tome : amande amère ?

Riss, Criollo : amer, cannelle, biscuit

Christian, Pérou commerce équitable : un peu amer

Christian, Madagascar Sambirano : ?

Michel, Venezuela 72% : cannelle, speculoos, müsli

Christian, Haïti : amer, café, un peu fruité, un peu fleuri

Christian, Brésil : fumé ?

Christian, Bolivie : un peu acide ?

Christian, Vénézuela Mare Monti : noix ? vanille, framboise

Christian, Vietnam : acide, « jaune »

Alter Eco, Noir intense dégustation : acide, corsé, pas amer, sucré

Fair Mary, Tumma Suklaa : pneu

Albert Heijn Pure chocolade : doux, bonbon

Green & Black, 88% : vieux meuble, un peu doux, pas mauvais

[ Posté le 14 septembre 2011 à 21:44 | pas de commentaire | ]

Vendredi, 9 septembre 2011

Orkney Raven Ale

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Orkney ]

Orkney_Raven_Ale

“toasted and biscuit-like malt aromas with spicy, resinous hop notes… biscuit malt and spicy citrus flavours… crisp, dry hop bitterness”

Just another ale, with maybe a hint of bitter almond. Contains malted barley and malted wheat.

Sinclair Breweries Ltd, The Orkney Brewery, Stromness, Orkney, Scotland. 3.8% alcohol.

[ Posté le 9 septembre 2011 à 20:39 | pas de commentaire | ]

Jeudi, 8 septembre 2011

Autofs and CD drive

Traduction: [ Google | Babelfish ]

Catégories : [ Informatique ]

After yesterday's tutorial on Autofs, I gave some thought on using Autofs to automatically mount a CD/DVD. Here's the result (read the previous tutorial first for complete information).

Run as root:

# mkdir -p /mnt/cdrom

Then edit /etc/auto.master as root and add the line:

/mnt/cdrom  /etc/auto.cdrom  --timeout=10

Then create /etc/auto.cdrom and add a line that looks like this (change /dev/cdrom to the proper device if needed):

cd1   -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

(shamelessly copied from the supplied /etc/auto.misc). Finally, run this as your regular user:

$ ln -s /mnt/cdrom/cd1 $HOME/mnt/cdrom

This setup is a bit crooked, because autofs is designed to watch one directory (/mnt/cdrom in this case) and create different subdirectories for different devices. In this case howerver we have only one device, that we mount always to the same point. On the brighter side, if you have more than one CD/DVD/floppy/zip drive, you can rename references to cdrom as removable, and add multiple lines to /etc/auto.removable, one for each drive. See /etc/auto.misc (that file comes by default with the autofs package) for extra possibilities of configuration.

[ Posté le 8 septembre 2011 à 15:59 | pas de commentaire | ]

Dimanche, 4 septembre 2011

Le maître du Haut-Chateau

Catégories : [ Livres ]

ISBN: 9782290005675

© Amazon.fr

En 1947, l'Allemagne et le Japon gagnent la guerre et se partage le monde. L'est des États-Unis est dominé par les Nazis, la côte ouest par les Japonais, et quelques états de Rocheuses sont encore indépendants. À San Francisco, un mystérieux homme d'affaire Suédois rencontre M. Tagomi, directeur de la mission commerciale japonaise, pour lui demander d'organiser dans son bureau une rencontre avec un vieux monsieur Japonais. Le suédois est en fait un agent Allemand et le vieux japonais un général à la retraite. L'Allemand veut prévenir le Japon qu'une faction des Nazis au pouvoir en Allemagne planifient une attaque nucléaire sur le Japon afin de s'emparer des territoires contrôlés par ce dernier, mais le décès imprévisible du chancellier Allemand et les rivalités entre les différentes factions remet ce plan à plus tard. En parallèle de ces événements, Juliana Frink rencontre dans un bar un routier Italien qui lui montre un livre racontant comment l'Allemagne a perdu la guerre. Il la convainc d'aller rendre visite à l'auteur, qui vit dit-on dans un forteresse. Juliana finit par se rendre compte que son Italien est un fait un agent Allemand chargé d'assassiner l'auteur. Lors d'une querelle elle tue son compagnon, et décide d'aller seule rendre visite à l'auteur du livre. Ce dernier ne vit plus dans sa forteresse, et finit par avouer qu'il a écrit le livre exclusivement en consultant l'oracle Japonais, très en vogue aux États-Unis depuis la fin de la guerre, le Yi King. Juliana consulte à son tour l'Oracle, qui lui révèle que le contenu du livre est la vérité.

[ Posté le 4 septembre 2011 à 10:45 | pas de commentaire | ]

Dimanche, 28 août 2011

Serenity

Traduction: [ Google | Babelfish ]

Catégories : [ TV/Cinéma ]

http://en.wikipedia.org/wiki/Serenity_%28film%29

Wikipedia

Due to overpopulation, Humanity has moved to another star system made of a dozen planets. Some of those have a common government, the Alliance, but the others are more like the Far West. River is a psychic who has been conditioned by the Alliance, but is rescued by her brother. They are chased by an unnamed Alliance agent, and find refuge on the Firefly by becoming passengers of the ship. Reynolds, the ship's captain who had fought during the failed rebellion agains the Alliance, has to resort to raiding banks for survival. At a bar, River receives a subliminal message and starts fighting everyone until her brother shouts a secret keyphrase that makes her sleep. Reviewing recordings of the incident with the help of a hacker, Mr. Universe, they notice that River said “Miranda” before starting to fight. Reynolds wants to get rid of the unpredictable River and her brother, but he is then contacted by the Alliance agent who makes clear he wants to kill River. Malcolm refuses to surrender her. The agent then kills all the people who have helped Malcolm in the past. River then tells Reynolds where to find Miranda, an planet marked as unhabitable. To go there, they have to cross a region of space controlled by the Reavers, mad humans who raid ships and eat people alive. They disguise the Firefly as an ship that has already been a victim of the Reavers, and manage to reach Miranda. Upon landing there, the crew of the Firefly discovers that the planet is perfectly habitable, but all its inhabitants are dead, bearing no sign of fight or pain. They later find a recording explaining that the Alliance has tried a drug that would make people more peaceful, but it just made people completely inactive, and they eventually died. One small fraction reacted in the opposite way and became the Reavers. Reynolds then decides to broadcast the message through Mr. Universe's equipment, but the agent knows what he intends to do and is waiting for him with a whole fleet. Reynolds attracts the Reavers's ships that are around Miranda and unleashes them on the Alliance's fleet. The Firefly then lands on Mr. Universe's planet. The crew barricades itself to hold the attacking Reavers back, Mr. Universe has already been killed by the agent, but after a fight with the latter, Reynolds manages to broadcast the message and let the truth about the scheme of the Alliance be revealed.

[ Posté le 28 août 2011 à 10:15 | pas de commentaire | ]

Samedi, 27 août 2011

Adnams Southwold Bitter

Traduction: [ Google | Babelfish ]

Catégories : [ Bière/Adnams ]

Adnams_Southwold_Bitter

Quite bitter, otherwise just another ale. Contains malted barley.

Adnams, Southwold, Suffolk, England. 4.1% alcohol.

[ Posté le 27 août 2011 à 20:28 | pas de commentaire | ]