Installing Pandoc
Posted on January 26, 2013
| 2 minutes
| 339 words
| Ton Kersten
John Macfarlane released a new version of
Pandoc that has a lot of new
enhancements. A lot of things have changed in the Markdown input types
and it’s now compatible with PHP
Markdown. This is very nice, because a lot of implementations use the
extensions defined by PHP Markdown.
I downloaded the dmg file to install it on my MacBook Pro and it
works like a charm.
So, I decided to install it on my new CentOS 6 server to build
documents there. Well, I was in for a nice surprise.
[Read More]
rsync on a not standard port
Posted on January 21, 2013
| 1 minutes
| 106 words
| Ton Kersten
Today a colleague asked me to sync some files to a server that is not
listening on SSH
port 22.
I normally create a configuration entry in my ~/.ssh/config
file, like
Host tosync
Hostname syncer.example.com
Port 1234
User syncuser
rsync -va --progress --inplace . tosync:
But this time I didn’t want to create the entry in my SSH configuration,
because I need this trick in a script. So I started to read the rsync
manpage and after some experimenting I found
[Read More]
MySQL backup error
Posted on August 9, 2012
| 1 minutes
| 188 words
| Ton Kersten
After upgrading my MySQL database server from version 5.0.95 to 5.1.61 I
suddenly got these errors in the backup logging.
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `EVENTS`': Cannot
proceed because system tables used by Event Scheduler were found damaged at server start
(1577)
dbdump gave errorcode 2 for database 'information_schema'
2012-08-09 09:07:53 -> Finished MySQL backup on host 'xxx.tonkersten.com'
Hmm, no idea what has happened. I hope I didn’t do something stupid.
[Read More]
CDE is Open Source
Posted on August 6, 2012
| 1 minutes
| 44 words
| Ton Kersten
Today the classic, and old, Common Desktop Environment (a.k.a. CDE) was
released into the Open Source world.
I haven’t been able to get a running version by now, but I keep trying.
git status in the prompt
Posted on July 23, 2012
| 2 minutes
| 289 words
| Ton Kersten
Working with git
a lot I decided I needed some git
status in my
prompt.
I searched the web and some solutions where almost what I wanted and
this one by
Sebastian
Celis came very close.
But it didn’t work with my version of zsh
, because that didn’t seem to
understand the =~
operator.
I also think Sebastian makes things over complicated and so I changed
some things aroud.
This is what I came up with:
[Read More]
No network on CentOS 6
Posted on July 17, 2012
| 1 minutes
| 171 words
| Ton Kersten
When installing a minimal CentOS 6 system, minimal really, really means
minimal. After a reboot the network interfaces do not start, so network
connectivity is non existing.
Looking into that I noticed that the file
/etc/sysconfig/network-scripts/ifcfg-eth0
contained
DEVICE=eth0
HWADDR=11:22:33:44:55:66
NM_CONTROLLED=yes
ONBOOT=no
BOOTPROTO=dhcp
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
The lines that mess things up are NM_CONTROLLED=yes
meaning the
interfaces are managed with NetworkManager, which isn’t actually
installed as part of a minimal install. You want a minimal install, you
get a minimal install. And ONBOOT=no
, meaning do not start the interface on boot.
How stupid is that!
[Read More]
Finding key codes on Linux
Posted on July 4, 2012
| 2 minutes
| 319 words
| Ton Kersten
It often happens that I get into a situation where I need to know key
codes of pressed keys. On my Mac that’s simple. Just use the Key Codes
by Many Tricks.
But on Linux I constantly was trying to find out which key produced
what.
So I ended up writing a program for that. I started of in the shell, but
that ended up being rather tricky and unnecessary complicated. So I
redid the whole thing in C.
[Read More]
New header
Posted on June 28, 2012
| 1 minutes
| 31 words
| Ton Kersten
Today I’ve posted a new version of the header
program.
Nothing really fancy happened, just added support for zonefiles
, in
this case the Bind ones.
It’s available at the usual places.
sed tips and tricks
Posted on June 22, 2012
| 3 minutes
| 599 words
| Ton Kersten
I’m creating a Puppet Starter Kit with some standard manifests
included and a complete set of documentation. All documentation should
be written in Markdown
and will be served by Markdoc. But I want to
generate all Markdown files from the Puppet manifests, so I only need to
document the manifest file. Generating the Markdown is not that
difficult, except that I kept ending up with empty lines at the top of
the manifest code and I wanted to get rid of those. Of course this
should be done with sed
, because the whole generation process is
written in bash
. When playing around with sed
I found ~ sed
`/./,$!d' filename ~ which, I think, is genius in it’s simplicity.
After you find something, do not remove. Life in UNIX and Linux is nice!
[Read More]
Updated to Linux 3.0
Posted on August 14, 2011
| 1 minutes
| 78 words
| Ton Kersten
I have a eeePC 900 (the 9” version) running Arch
Linux for some time now. I didn’t update it for a while, so, today
being a rainy Sunday, I decided it was time to do it.
and waited for about half an hour.
Everything is running nice and smooth, so I’m very happy.
Can’t wait to get my hands on Linux 3.11 for Workgroups
;-)
[Read More]
umask per directory
Posted on December 8, 2010
| 1 minutes
| 148 words
| Ton Kersten
Some users insist on using bash
. This is a good shell, but not as good
as zsh
. But, I do want them to be able to use the per directory
umask
as well as all the zsh
users.
So I started digging, as the bash
shell does not support a chpwd
hook.
This is what I came up with:
chpwd()
{ # Set the initial umask
case "${PWD}/"
in
/etc/puppet/*)
um=$(umask)
umask 007
;;
*)
[[ x"${um}" != x"" ]] && umask ${um}
;;
esac
}
function cd()
{
builtin cd "${@}"
chpwd
}
[Read More]