2010/02/05, 18:15
sed one-liners explained, this one is outstanding: Famous Sed One-Liners Explained, Part I: File Spacing, Numbering and Text Conversion and Substitution
stumbled upon this while trying to paginate text with (gnu) sed, aka reformatting text to a given line width. suppose you want to add linebreaks to a text so no line is longer than, say, 4 characters:
echo "0123456789ABCDEFGH" | sed 's/.\{4\}/&\
/g' |
2010/01/20, 17:30
to create a user for doing automated backups of a MySQL installation that doesn’t have more than the necessary privileges, use the following statement:
GRANT RELOAD, SELECT, LOCK TABLES ON *.* TO 'backup'@'localhost' IDENTIFIED BY 'some_reasonable_password'; |
2010/01/18, 11:56
for mail in $(sudo mailq | grep frozen | cut -c 11-26) ; do
sudo exim4 -Mrm $mail
done |
extend or adjust the grep-pattern as required by your situation…
2010/01/11, 19:07
required packages: qemu-arm-static
see: binfmt
sudo debootstrap --foreign --verbose \
--variant=buildd --arch arm \
lenny `pwd`/lenny_arm \
http://ftp.de.debian.org/debian/ |
2010/01/11, 18:55
Ever got messages like this in your Apache logfiles, wondering why setting properties via a client on your (otherwise working) WebDAV is failing?
Could not open the property database. [500, #205]
(2)No such file or directory: Could not open property database. [500, #1]
(2)No such file or directory: Attempted to set/remove a property without a valid, open, read/write property database. [500, #202] |
Well, simply add a directory called “.DAV“ (note the leading dot!) to your WebDAV base-directory, that is writeable to the webserver. That’s where the corresponding information will be stored by Apache. Note that this is “somehow” mentioned by the mod_dav documentation at webdav.org, but not by Apache’s documentation itself. Yes, that’s bad and pretty annoying.
2010/01/04, 15:25
reset vim’s internal representation of what printable characters are, then find all non-printable chars except “TAB” (note that “^I” means literally pressing the TAB-key):
:set isprint=
/[^[:print:]^I] |
UPDATE: a nicer way to achieve this is to activate search-highlighting and then search for characters in the range 0×7f – 0xff (this way vim displays the printable chars like german umlauts, but they’re highlighted, so you can identify them easily):
:set hlsearch
/[\x7f-\xff] |
(see also: vim-wiki, vimtips)
2009/12/07, 17:30
what’s the point in complaining about beta-releases? well, the hope for a better final version…
currently, not only TB-3 has a lot of bugs, but also the latest lightning-plugin: Bug 523555
most confusing to me is the fact that importing a certificate is insufficient to make this work, you also have to select every certificate and edit its trust-properties to make it work. how daffy…