Vincent Sanders: Can you just...


Nowadays, many websites provide a mobile version, like
Wikipedia, which usually is a version
tailored to device with less bandwidth and smaller
screen. CSS Media Queries is a candidate recommendation from
the W3C to support different stylesheets depending on the how the
document is displayed. This allows to build a mobile version just by
providing additional instructions in your CSS style sheet.
1 | <link rel="stylesheet" media="screen and (max-width: 700px)" href="mobile.css"> |
mobile.css will be used. Another way to use CSS media queries is to
declare a section inside your current CSS style sheet:
1 2 3 4 5 | @media screen and (max-width: 700px) #article margin: 0.3em 0.2em; |
max-width and min-width. You can use this feature to
modify some aspects of your web site like reducing margins or hiding
some extra navigational blocks.
min-width and max-width in Internet Explorer 6, 7 and 8.
If you reduce the size of your window, you will get something like this:
Browse my CSS files for more examples. Look at the end of each
file. For further information, have a look at the
article from CSS Tricks.
his heart was now overflowing with love, and by loving people without cause he discovered indubitable causes for loving them. How often we sin, how much we deceive, and all for what? All will end in death, all! A pleasant humming and whistling of bullets were often heard. Looking into Napoleon s eyes Prince Andrew thought of the insignificance of greatness, the unimportance of life which no one could understand, and the still greater unimportance of death, the meaning of which no one alive could understand or explain. If there is a God and future life, there is truth and good, and man s highest happiness consists in striving to attain them. We must live, we must love, and we must believe that we live not only today on this scrap of earth, but have lived and shall live forever, there, in the Whole, said Pierre, and he pointed to the sky. Prince Andrew stood leaning on the railing of the raft listening to Pierre, and he gazed with his eyes fixed on the red reflection of the sun gleaming on the blue waters. There was perfect stillness. Pierre became silent. The raft had long since stopped and only the waves of the current beat softly against it below. Prince Andrew felt as if the sound of the waves kept up a refrain to Pierre s words, whispering: It is true, believe it. He sighed, and glanced with a radiant, childlike, tender look at Pierre s face, flushed and rapturous, but yet shy before his superior friend. In Natasha Prince Andrew was conscious of a strange world completely alien to him and brimful of joys unknown to him, a different world, that in the Otradnoe avenue and at the window that moonlight night had already begun to disconcert him. Now this world disconcerted him no longer and was no longer alien to him, but he himself having entered it found in it a new enjoyment. All the kings, except the Chinese, wear military uniforms, and he who kills most people receives the highest rewards. But what is war? What is needed for success in warfare? What are the habits of the military? The aim of war is murder; the methods of war are spying, treachery, and their encouragement, the ruin of a country s inhabitants, robbing them or stealing to provision the army, and fraud and falsehood termed military craft. The habits of the military class are the absence of freedom, that is, discipline, idleness, ignorance, cruelty, debauchery, and drunkenness. And in spite of all this it is the highest class, respected by everyone. From the moment Pierre had witnessed those terrible murders committed by men who did not wish to commit them, it was as if the mainspring of his life, on which everything depended and which made everything appear alive, had suddenly been wrenched out and everything had collapsed into a heap of meaningless rubbish. Though he did not acknowledge it to himself, his faith in the right ordering of the universe, in humanity, in his own soul, and in God, had been destroyed. He had experienced this before, but never so strongly as now. When similar doubts had assailed him before, they had been the result of his own wrongdoing, and at the bottom of his heart he had felt that relief from his despair and from those doubts was to be found within himself. But now he felt that the universe had crumbled before his eyes and only meaningless ruins remained, and this not by any fault of his own. He felt that it was not in his power to regain faith in the meaning of life. When Princess Mary began to cry, he understood that she was crying at the thought that little Nicholas would be left without a father. With a great effort he tried to return to life and to see things from their point of view. Yes, to them it must seem sad! he thought. But how simple it is. The fowls of the air sow not, neither do they reap, yet your Father feedeth them, he said to himself and wished to say to Princess Mary; but no, they will take it their own way, they won t understand! They can t understand that all those feelings they prize so all our feelings, all those ideas that seem so important to us, are unnecessary. We cannot understand one another, and he remained silent. Love hinders death. Love is life. All, everything that I understand, I understand only because I love. Everything is, everything exists, only because I love. Everything is united by it alone. Love is God, and to die means that I, a particle of love, shall return to the general and eternal source. These thoughts seemed to him comforting. People speak of misfortunes and sufferings, remarked Pierre, but if at this moment I were asked: Would you rather be what you were before you were taken prisoner, or go through all this again? then for heaven s sake let me again have captivity and horseflesh! We imagine that when we are thrown out of our usual ruts all is lost, but it is only then that what is new and good begins. While there is life there is happiness. There is much, much before us. I say this to you, he added, turning to Natasha. During that twenty-year period an immense number of fields were left untilled, houses were burned, trade changed its direction, millions of men migrated, were impoverished, or were enriched, and millions of Christian men professing the law of love of their fellows slew one another. What does all this mean? Why did it happen? What made those people burn houses and slay their fellow men? What were the causes of these events? What force made men act so? These are the instinctive, plain, and most legitimate questions humanity asks itself when it encounters the monuments and tradition of that period.
So earlier on I posted about my work on declarative diversions . I felt I needed to clarify a few things as a few people asked me different questions and I don t think I made the post clear enough and I also left out an important piece of information.
The new control file will be located in control.tar.gz and it s syntax will be
One diversion per line Blank lines and lines with # are comments Two fields per diversion seperated by whitespace (SOURCE DESTINATION)Now people have asked be about updating and removing diversions and how that will be accomplished. All diversions will be listed in this control file. If a diversion isn t listed in the control file on upgrade dpkg will automatically remove the diversion because it will see it is no longer needed. The same goes for changing diversions, i.i. list them just as though they re new and it will update them. This project will infer add, remove and package and will not allow you to specify them. The same is goes for rename, it is being made default and not optional (for now, I am aware of some special cases). *Removed, slight mistake here* Now, there are a number of things still left to do this week before a full draft is prepared. There is an email here by Ian Jackson which talks about ordering unpack in such a way to delay the the actual renaming of the file. If anyone has any suggestions for this process it would be greatly appreciated. Another two things that need to be done is the proper handling of diversions to non-existant directories and also escaping spaces within filenames for the control file. I should have another update tomorrow evening. Until then, ~Sam
Lately I have been working on the triggers feature of dpkg. I would like to share my plan and what I have done so far. I ll first explain what triggers are, the current problems, and the work I did to try to improve the situation.
Introduction
Dpkg triggers are a neat feature of dpkg that package can use to send/receive notifications to/from other installed packages. Those notifications take the form a simple string.
This feature is heavily used to track changes of packaged files in a list of predefined directories, and to update other files based on this. For instance, man-db is watching the directories containing manual pages so that it can update its cache (in /var/cache/man/). install-info is updating the index of info pages when there have been changes in /usr/share/info. gnome-menus is updating its own copy of the menu hierarchy (with entries from /etc/gnome/menus.blacklist blacklisted) every time that a .desktop file is installed/updated/removed.
From a user s perspective
You see triggers in action very often during upgrades (in fact too often as we ll see it later):
Preparing to replace zim 0.52-1 (using .../archives/zim_0.52-1_all.deb) ... Unpacking replacement zim ... Processing triggers for shared-mime-info ... Processing triggers for menu ... Processing triggers for desktop-file-utils ... Processing triggers for man-db ... Processing triggers for hicolor-icon-theme ... Processing triggers for python-support ... Processing triggers for gnome-menus ... Setting up zim (0.52-1) ... Processing triggers for python-support ... Processing triggers for menu ...As you guessed it, those Processing triggers lines correspond to the packages which received (one or more) trigger notifications and which are doing the corresponding task. By default the triggers are processed at the end of the
dpkg --unpack invocation which is often too soon because APT will often call dpkg --unpack repeatedly during important upgrades. There are some options to ask APT to use dpkg s --no-triggers option in order to defer the trigger processing at the end of the APT run. You can put this in /etc/apt/apt.conf.d/triggers:
// Trigger deferred DPkg::NoTriggers "true"; PackageManager::Configure "smart"; DPkg::ConfigurePending "true"; DPkg::TriggersPending "true";I have now asked APT maintainers to use those options by default, I filed bug #626599 to track this. At the same time I fixed bug #526774 reported by APT maintainers. This bug forced them to put a work-around in APT which resulted in running triggers sooner than expected. (And while writing this article I filed bug #628564 and #628574 because it was clearly not normal that the menu triggers was executed twice for the installation of a single package)
From a packager s perspective
The implementation of triggers has several consequences on the status that packages can have.
Let s assume that the package A installs a file in a directory that is watched by package B (and that B is currently in the installed state). When A is unpacked, dpkg adds B to its Triggers-Awaited field and lists the activated trigger in B s Triggers-Pending field. Package A is in unpacked state, but B has been changed to triggers-pending .
When A is configured, instead of going to the installed state, it will go to the triggers-awaited state. In that state the package is assumed to NOT fulfill dependencies. However, B which is still in triggers-pending state does fulfill dependencies.
A and B will switch to installed at the same time when the trigger has been processed.
The fact that the triggers-awaited status does not fulfill dependencies means that some common triggers like man-db have to be processed regularly just to be able to ensure dependencies are satisfied before running the postinst of other installed packages.
But a package which ships a manual page can certainly be considered as configured when its postinst has been run even if man-db has not yet updated its cache to know about the new/updated manual page.
When you activate a trigger with the dpkg-trigger command you have an option --no-await to avoid awaiting the trigger processing (and thus to go directly to installed state after the postinst has been run). But with file triggers or activate trigger directives, you do not have this option.
My proposal to improve the situation
This is the problem that I tried to solve during my last vacation. But before changing the inner working of triggers, I wrote a non-regression test suite for that feature (commit here) so I could hack with some confidence that I did not break everything.
The result has been presented on the debian-dpkg mailling list: see the discussion here. I added new directives that can be used in triggers files that work exactly like the current triggers except that they do not put triggering packages in trigger-awaited status.
I believe the code to be mostly ready, but in its current form the patch brings zero benefits until all packages have been converted to use the trigger variants that do not require awaiting trigger processing (and the change requires a pre-dependency on dpkg to ensure we have the required dpkg that understands the new kind of trigger directives).
Remaining question
Thus I wonder if I should not change the default semantic of triggers. The packages which really provide crucial functionality to awaiting packages through triggers would then have to be updated to switch to the new directives.
If you re a packager using triggers, you can thus help me by answering this question: do you know some triggers where it s important that the awaiting packages are not considered as configured before the trigger processing? In most of the cases I checked, it s important for the triggered package rather than for the triggering package.
In truth, a package in triggers-awaited status is usually in a good enough shape to be able to satisfy dependencies (i.e. requirements that other packages can have), but it would still be worth to record the fact that it s not entirely configured yet because it might be true from the user s point of view: for example if the menu trigger has not yet been processed, the software might not yet be visible in the application menu.
If you appreciate this kind of groundwork that benefits to the whole Debian ecosystem, please consider supporting my work. Click here and give it a look, there are many ways to contribute and to make a difference for me.
3 comments Liked this article? Click here. My blog is Flattr-enabled.
I m proud to be able to announce a new stable release of Grml, the Debian based Live system for system administrators.
This release is a very special one for me. On the one hand of course because of the special release name Just Mari , being dedicated to my lovely wife.
But it s also special because of the way the release management worked out. I ve been the release manager for Grml since the very beginning, which turned out to be more than 6 years since the first stable release already. I developed grml-live as build framework based on FAI for generating a Grml and Debian based Linux Live system to streamline the build process. Anyway it was mainly me who managed the release chroots, doing the update management during release freeze, editing main web page etc.
As I want to make the project as independent from myself as much as possible and to keep the Bus factor in balance we started to improve our project infrastructure so it s not just me who can do this kind of release management. As a result Grml core developer Christian Hofstaedtler became the release sergeant of this release. The release candidate version was even released without myself being available (the release happened behind my back during our marriage). Major work on the final stable release was also done by Grml core developers Ulrich Dangel, Christian Hofstaedtler, Frank Terbeck and Alexander Wirt and I m very happy about that. Kudos guys for all your work and all the hidden efforts going on behind my back.
I've got a few projects which are hosted in mercurial repositories. To deploy them I manually checkout the repository, create symlinks by hand, then update #!/bin/sh
#
# ~/bin/deploy execute the .deploy file associated with this project.
#
while true; do
#
# If we're at the root directory we're done.
#
if [ $PWD = "/" ]; then
echo "Reached /"
exit
fi
# found our file?
#
if [ -x ".deploy" ]; then
./.deploy
exit
fi
cd ..
done
It seems the main candidate is capistrano, which was previously very Ruby on Rails centric, but these days seems to be divorced from it.
Alternatively there is the python-based fabric project which has been stalled for two years, vlad the deployer (great name!) which is another Rake-based and thus Ruby-loving system, and finally whiskey disk which is limited to Git-based projects as far as I can tell.
In short each of these projects is very similar, and each relies upon being able to do two things:
Memorial Day weekend so following the annual
JPMorgan Chase CC run
on Thursday, it was once again time for the annual
Bike The Drive on Chicago's
beautiful Lakeshore Drive. The weather was craptastic---following a fog (!!)
warning we had dense fog along the lake making it somewhat moist and
chilly. Once we were done this was followed by an impressive thunderstorm warnings and rather
heavy rain. But the girls were troopers and we did both halfes for a total
of thirty miles as shown on this
Google Maps record of the ride.
It's 2011. Computers are here for a couple of decades now, but they still don't help me with the most simple problems. I've been asked once again about a recommendation for a GroupWare and still don't know what to say. This are the simple requirements:
ipvsadm;1 2 3 4 5 | $ git clone https://github.com/vincentbernat/keepalived.git $ cd keepalived $ git checkout snmp-1.2.0 $ ./configure --enable-snmp $ make |
bin/keepalived which is the SNMP enabled keepalived
daemon. You can use it directly or install it with make install as root.
On RHEL, SNMP is not properly packaged. Try the following command
instead of make:
1 | $ make LDFLAGS="$(net-snmp-config --agent-libs) -lpopt -lssl -lcrypto" |
snmpd daemon can become
a master agent. Check for the presence of master agentx line in
snmpd.conf. The next step is to start keepalived with the -x
switch. keepalived will connect to your main snmpd daemon. You can
check the logs for a ligne like this:
May 28 17:21:19 L1 Keepalived_vrrp: NET-SNMP version 5.4.3 AgentX subagent connected
setup script.
The lab features four web servers that will be merged into a single
web service with the help of keepalived. Since, keepalived now
supports full IPv6 support, we will also use IPv6 in our lab.
Here is the VRRP configuration of the first keepalived :
vrrp_instance VI_1 state MASTER interface eth2 dont_track_primary track_interface eth0 eth1 virtual_router_id 1 priority 150 advert_int 2 authentication auth_type PASS auth_pass blibli virtual_ipaddress 1.1.1.15/24 dev eth0 2001:db8::15/64 dev eth0 192.168.1.1/24 dev eth1 fd00::1/64 dev eth1
virtual_server_group VS_GROUP_IPv4 1.1.1.15 80 virtual_server group VS_GROUP_IPv4 delay_loop 10 lb_algo rr lb_kind NAT protocol TCP real_server 192.168.1.10 80 weight 1 HTTP_GET url path / status_code 200 connect_timeout 10 [...]
./setup), we can check that everything
works as expected. From the client node, we can make several requests,
both with IPv4 and IPv6:
1 2 3 4 5 6 7 8 | C1# curl http://1.1.1.15 W3 C1# curl http://1.1.1.15 W2 C1# wget -o /dev/null -O - 'http://[2001:db8::15]' W3 C1# wget -o /dev/null -O - 'http://[2001:db8::15]' W2 |
eth1 on L1, L2 becomes master and everything
works as expected. Our client node can still do the requests.
L1. The appropriate MIB is KEEPALIVED-MIB. The base OID for
this MIB is .1.3.6.1.4.1.9586.100.5. It is hosted in the
OID space allocated by IANA to the Debian project.
For example, to get the configuration of our VRRP instance:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # snmpwalk -v2c -cpublic localhost KEEPALIVED-MIB::vrrpInstanceTable KEEPALIVED-MIB::vrrpInstanceName.1 = STRING: VI_1 KEEPALIVED-MIB::vrrpInstanceVirtualRouterId.1 = Gauge32: 1 KEEPALIVED-MIB::vrrpInstanceState.1 = INTEGER: master(2) KEEPALIVED-MIB::vrrpInstanceInitialState.1 = INTEGER: master(2) KEEPALIVED-MIB::vrrpInstanceWantedState.1 = INTEGER: master(2) KEEPALIVED-MIB::vrrpInstanceBasePriority.1 = INTEGER: 150 KEEPALIVED-MIB::vrrpInstanceEffectivePriority.1 = INTEGER: 150 KEEPALIVED-MIB::vrrpInstanceVipsStatus.1 = INTEGER: allSet(1) KEEPALIVED-MIB::vrrpInstancePrimaryInterface.1 = STRING: eth2 KEEPALIVED-MIB::vrrpInstanceTrackPrimaryIf.1 = INTEGER: tracked(1) KEEPALIVED-MIB::vrrpInstanceAdvertisementsInt.1 = Gauge32: 2 seconds KEEPALIVED-MIB::vrrpInstancePreempt.1 = INTEGER: preempt(1) KEEPALIVED-MIB::vrrpInstancePreemptDelay.1 = Gauge32: 0 seconds KEEPALIVED-MIB::vrrpInstanceAuthType.1 = INTEGER: password(1) KEEPALIVED-MIB::vrrpInstanceLvsSyncDaemon.1 = INTEGER: disabled(2) KEEPALIVED-MIB::vrrpInstanceGarpDelay.1 = Gauge32: 0 seconds KEEPALIVED-MIB::vrrpInstanceSmtpAlert.1 = INTEGER: disabled(2) KEEPALIVED-MIB::vrrpInstanceNotifyExec.1 = INTEGER: disabled(2) |
1 2 3 4 5 6 7 8 9 10 11 | # snmpwalk -v 2c -c public localhost KEEPALIVED-MIB::virtualServerTable grep Stats KEEPALIVED-MIB::virtualServerStatsConns.1 = Gauge32: 6 connections KEEPALIVED-MIB::virtualServerStatsConns.2 = Gauge32: 6 connections KEEPALIVED-MIB::virtualServerStatsInPkts.1 = Counter32: 36 packets KEEPALIVED-MIB::virtualServerStatsInPkts.2 = Counter32: 36 packets KEEPALIVED-MIB::virtualServerStatsOutPkts.1 = Counter32: 24 packets KEEPALIVED-MIB::virtualServerStatsOutPkts.2 = Counter32: 24 packets KEEPALIVED-MIB::virtualServerStatsInBytes.1 = Counter64: 2970 bytes KEEPALIVED-MIB::virtualServerStatsInBytes.2 = Counter64: 3312 bytes KEEPALIVED-MIB::virtualServerStatsOutBytes.1 = Counter64: 2592 bytes KEEPALIVED-MIB::virtualServerStatsOutBytes.2 = Counter64: 3072 bytes |
W1:
1 2 3 4 5 6 7 8 9 10 11 12 | # snmpget -v2c -cpublic localhost KEEPALIVED-MIB::realServerAddrType.1.1 \ KEEPALIVED-MIB::realServerAddress.1.1 KEEPALIVED-MIB::realServerAddrType.1.1 = INTEGER: ipv4(1) KEEPALIVED-MIB::realServerAddress.1.1 = Hex-STRING: C0 A8 01 0A # snmpget -v2c -cpublic localhost KEEPALIVED-MIB::realServerAddress.2.1 \ KEEPALIVED-MIB::realServerAddress.2.1 KEEPALIVED-MIB::realServerAddress.2.1 = Hex-STRING: FD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 KEEPALIVED-MIB::realServerAddress.2.1 = Hex-STRING: FD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 # snmpset -v2c -cprivate localhost KEEPALIVED-MIB::realServerWeight.1.1 = 0 KEEPALIVED-MIB::realServerWeight.1.1 = INTEGER: 0 # snmpset -v2c -cprivate localhost KEEPALIVED-MIB::realServerWeight.2.1 = 0 KEEPALIVED-MIB::realServerWeight.2.1 = INTEGER: 0 |
C1, you can now check that W1 is not queried anymore.
Let s graph the number of connections per second each real server
gets. With a simple script using rrdtool, we can get the
following graph:
This summer, I ll be taking a bit of time off, moving back to San Francisco and starting a new job. I can t wait to get back to work. Here s why.
Me and my data

One pragmatic answer is that I can simply do more with my data when I have a copy. I can work with it using any software I want, including software that I write myself. I don t have to worry about whether I can transfer it from one web service to another. I m never stuck using yesterday s services because my data is never trapped in them. My personal data is always available to me me, always raw, ready and waiting for the next wave of software to come along. When it does, I can load my data into it and keep going. The fact that Facebook and Google disagree over sharing their users data doesn t bother me in the least.
Another reason is that I want to be in control of it. I decide who to share my data with, and when. Some of it, I prefer not to share at all, with any person or company, and I have that choice. Even if a powerful government wants to access my data, I am afforded certain protection under the law, at least in the countries where I ve lived. If I turned over my data to service providers, my choices and protection would likely be much more limited.
I have a deeper emotional attachment to my data as well. Enfolded within that vast pattern of bits is some part of my self. By sharing my personal data with other people, I show them something of who I am. Increasingly, my personal data is part of my identity. This is more than just a state of mind: it s been shown that even our non-identifying personal data can reveal who we are.
In other words, it s not just my data it s me data .
Singly
I m joining Singly because I want to take this concept much further, and combine people, data and software into a different shape with people at the center.
Today, we are creating vastly greater amounts of personal data, and it s stored in many more places. We leave our trail on the Internet in the form of activity streams, messages and content, spread across different web sites, each with their own inscrutable terms of service and (if we re lucky) their own API. These disconnected silos prevent us from using all of this information effectively.
Meanwhile, we want and need to connect with each other in more ways than ever before. We need applications which can connect us, through our personal data, to the services we need.
Singly is building the technology to make this possible. It will be designed with the deepest respect for the relationship that we have with our personal data, and with a vision for truly personal computing.
Singly is
This week I finally used my packaging tutorial slides myself, a few days after Phil Hands used them at a UKUUG event.
The tutorial is now available as a Debian package (in Debian unstable) named packaging-tutorial, and I ve talked to debian-doc@ about linking it from appropriate places. It s also hosted on collab-maint now, so don t hesitate to contribute.
Links :
Identity checks and trust
The OpenPGP web of trust is composed of keys linked to each other by two
things:
.gnupg/gpg.conf.
When you make a signature with this option, GnuPG will ask you how
carefully you verified the key owner's identity. According to the
manpage gpg(1), the available levels are:
tsign instead of sign. GnuPG will
then ask you three questions:
.caff/gnupghome/gpg.conf. In addition it does not implement
trust signatures natively: to use them, you have to abort the automatic
signing, which gives you a GnuPG prompt, where you are then able to
tsign, then exit to return to caff that will consider your
trust signatures.
Credits
I wrote about some EFI implementation issues I'd seen on Macs a while back. Shortly afterwards we started seeing approximately identical bugs on some Intel reference platforms, and fixing it actually became more of a priority.I m pretty excited to work on this project and the work has already started. Can t wait to go deeper and enjoy working on two things that I love: Debian and Java.Since the beginning of Java, the JVM is a big virtual machine will all the features incorporated in it. This JVM provides many features which are useful in only limited areas (Corba) or which are not used at all in some contexts (AWT/Swing are useless for a web server).
The goal of the jigsaw project is to provide a modular JVM.
This will provide many improvements in the performance area (startup, solving of the dependencies, etc) but also the size of the dependencies.
There are already some works done by upstream (Oracle) but it does not complain to the Debian standards. The target is Java 8.
The goal is this Google Summer of Code project is to package the current development version of Jigsaw into Debian.
Please note that this project is not only about packaging. This will probably implies some developments and contributions to upstream (upstream is aware of this effort). Updating javahelper to manage specifities of Jigsaw could be considered.
Next.