Google’s Privacy Policy is going to change this March in order to unify up to 60 different policies across all the services Google has to offer. While reading through the new terms, I compared what did change exactly to see if the coverage in other blogs and media is correct.
As older versions are still available, I noticed that the beginning of this Privacy Policy has changed over the years. There used to be a first sentence explaining the general approach Google takes towards your data. But read yourself:
Read more…
I just tried out a build from the Subversion 1.7.x branch which appears to come close to a final release. Instead of creating .svn directories everywhere, the new working copy layout switches to a central storage using SQLite. You will only see a single .svn at the top most directory of the working copy. Details are outlined in the preliminary release notes.
The following is a totally inaccurate benchmark, but I want to share some numbers. The MacPorts repository used here contains lots of directories with only a few files in each, often only a single file. This makes operations walking the .svn directories in the tree very expensive.
Listing status of files:
~/src/macports/trunk-svn $ time svn st
real 3m39.347s
user 0m1.450s
sys 0m5.900s
~/src/macports/trunk-svn17 $ time svn17 st
real 0m23.788s
user 0m1.914s
sys 0m2.297s
Update without changes (locking the whole working copy against concurrent access):
~/src/macports/trunk-svn $ time svn up
At revision 83750.
real 2m32.855s
user 0m1.202s
sys 0m5.060s
~/src/macports/trunk-svn17 $ time svn17 up
Updating '.':
At revision 83750.
real 0m5.362s
user 0m1.793s
sys 0m1.166s
Impressive results!
The previous so called “Spaces” are now part of “Mission Control” in Mac OS X 10.7 Lion. It implements multiple work spaces as known from common Linux desktop environments.
Unfortunately it grabs the global keyboard shortcuts Ctrl-1, Ctrl-2, …, Ctrl-0 and Ctrl-Option-1, Ctrl-Option-2, …, Ctrl-Option-6 to switch to the corresponding space by default. This prevents using any of these shortcuts in an application. I had defined some of those for use with my favorite editor vim, where the shortcuts ceased to work after the upgrade to Lion.
Even more unfortunate, it’s a tedious task to stop Mission Control from allocating these keyboard shortcuts. The GUI offers the configuration check boxes only for spaces which are currently enabled.

So the solution was to enable all possible spaces, which are capped at a maximum of 16, using the Mission Control interface. Then disable the check box for each of them in System Preferences > Keyboard > Keyboard Shortcuts.
As said a tedious task, but works. I was hoping to provide some defaults write command here, but I was unable to determine where these settings are stored.
My favorite application for watching analogue TV is tvtime. Unfortunately it has not been updated for a few years now. As is the rule for unmaintained code, the upstream version finally is no longer compatible with Linux kernel 2.6.38. The V4L1 API has now been removed after being deprecated for a really long time.
But Devin Heitmueller from KernelLabs invested some time to remove the parts from tvtime that still needed the old API. The source is available from this mercurial repo.
hg clone http://www.kernellabs.com/hg/~dheitmueller/tvtime
cd tvtime
autoreconf -i -f
./configure --prefix=/usr/local --disable-nls
make
make install
There is also a report in Gentoo’s Bugzilla with a new ebuild attached, but I haven’t tried that. Installing the new patched tvtime to /usr/local works for now.
I am all ears if anyone can recommend an alternative to tvtime. I know about xawtv, but the interface is poor and offers less features than tvtime.
After the upgrade to Linux kernel 2.6.38, the boot process for my machine hang quite long while Populating /dev with existing devices through uevents. After investigations it turns out that the cx88 driver used for my Hauppauge WinTV HVR-1300 tv card was not correctly converted to the new mutex system while removing the BKL. This is being tracked in the kernel bugzilla as bug #31962.
Fortunately, there is a patch attached to the mentioned bug report which resolves the problem:
cd /usr/src/linux
wget -O cx88-2.6.38-fix-driver-deadlocks.patch 'https://bugzilla.kernel.org/attachment.cgi?id=53722'
patch -p1 < cx88-2.6.38-fix-driver-deadlocks.patch
[Edited on 2011-04-23: replaced patch 52902 with 53722]
After applying the patch, build and install your kernel as usual. But there are still some more problems with 2.6.38 related to tvtime. See also my next post.
I do not follow kernel development close enough to know in which git tree this has to show up to confirm if it has been merged yet. Hopefully this patch will make it into the next kernel release.
Reuse the last argument of the previous command with !$:
$ echo abc def
abc def
$ echo !$
def
A common use case would be mkdir and cd:
$ mkdir foo
$ cd !$
You can also insert the last argument of the previous command and continue typing with <ESC>.:
$ echo abc def
abc def
$ echo <ESC>. ghi
def ghi
Oh, the little things…
It is common to use a for-loop with glob patterns:
for i in *.txt; do
mv $i $i.old
done
But if the glob pattern does not match anything it will be preserved unchanged in the command. This results in command execution of mv *.txt *.txt.old which fails because no file named *.txt (literally!) exists.
As this is not the desired behavior, here is a way how to do this as expected without forking using the nullglob bash shell option.
oldnullglob=$(shopt -p nullglob)
shopt -s nullglob
for i in *.txt; do
mv $i $i.old
done
eval "$oldnullglob" 2>/dev/null
unset oldnullglob
This will silently prevent the execution of the mv command. If you use failglob instead of nullglob bash will interrupt the evaluation of any command if the glob pattern did not match anything.
Disclaimer: Be careful with this option, as this will not be the expected behavior in all cases. Most (in)famously it breaks bash-completion if you set it in your interactive bash session. I suggest to use it temporary only.
Once again I missed the expiry date of one of the SSL certificates on my server. Therefore I am now using a cronjob to warn me early enough that a certificate is about to expire.
This is the script /usr/local/bin/ssl-cert-check which checks the expiry date of the certificate files passed as arguments:
#!/bin/bash
DAYS=30
for file in "$@"; do
openssl x509 -checkend $(( 86400 * $DAYS )) -in "$file" > /dev/null
if [ $? != 0 ]; then
echo "==> Certificate $file is about to expire soon:"
openssl x509 -enddate -in "$file" -noout
fi
done
And the corresponding cronjob entry checking SSL certificates once a day:
6 6 * * * root /usr/local/bin/ssl-cert-check /etc/apache2/ssl/*.crt /etc/ssl/certs/dovecot.pem
What is this?
I prefer IRC as communication protocol for multi-user chat and instant messaging. To keep in contact with users of other protocols/clients I use BitlBee which is a gateway connecting other chat networks like Jabber/XMPP and ICQ to your own IRC server.
Read more…
I wrote a bash script to create new pastes on pastie.org. It features automatic source language selection based on the file extension and has a switch to make a private paste.
$ pastie --help
Usage: pastie [options] [files...]
Options:
-h, --help display this help
-l, --lang set language of the paste
-p, --private make paste private
If --lang is not specified, this script will try to determine the type of each
file automatically based on the extension. If no files are given on the
command line it reads from standard input.
You can download it here:
http://pastie.org/904797
The script is public domain, so do whatever you want with it.
Although this is the initial release, I bumped the version number to 1.6 already. During testing the script I pasted itself several times to pastie.org. I set a arbitrary higher version number to avoid confusion in case the previous pastes ever turn up in Google or wherever.
Update:
Seems like their parser for shell is a bit broken and doubles the heredoc starting and ending sequences in the output. For whatever reason it appears as “<<END<<END”. Please use the raw version for download instead of copy & paste.