Sa 20. Jun 03:38:59 CEST 2009
Automatic security updates for Debian based systems
unattend-upgrades is a debian package providing automatic security upgrades.
To use it, just install unattended-upgrades, modify /etc/apt/apt.conf.d/50unattended-upgrades to your needs like:
Unattended-Upgrade::Allowed-Origins { "Debian stable"; };
To automatically and unattended install security updates you also have to set
APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1";in /etc/apt/apt.conf or in a file located in /etc/apt/apt.conf.d/ (I use /etc/apt/apt.conf.d/60security)
For further details have a look at /usr/share/doc/unattended-upgrades/README or https://wiki.ubuntu.com/AutomaticUpdates Just setup unattended-upgrades and life becomes more easy as you dont have to remember to upgrade each of your machines.
Sa 20. Jun 03:10:56 CEST 2009
One command line interface for multiple RDBMS systems
sqlline a java based console program allows you to connect to any database with existing jdbc drivers replacing the original programs like mysql, sqlplus or psql.
Example to connect to an oracle database with sqlline:
$ java -cp ~/path/classpath/classes12.jar:/usr/share/java/sqlline.jar sqlline.SqlLine sqlline version 1.0.2 by Marc Prud'hommeaux sqlline> !connect jdbc:oracle:thin:@hostname:1521:xe USER PASS Connecting to jdbc:oracle:thin:@hostname:1521:xe Connected to: Oracle (version Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production) 2: jdbc:oracle:thin:@hostname:1521:xe>
Fr 20. Feb 20:04:37 CET 2009
Static ip assignment with libvirt
I just started to use libvirt and needed to have static ip assignment for some of the systems. Libvirt supports this but there is no documentation for this, a patch with documentation has just been send to the mailing list, but thats all (except the documentation in the *.c files ;-)
A simple example which assigns 192.168.122.2 to the host with the mac AA:BB:CC:DD:EE:FF:
<network>
<name>sample</name>
<bridge name='intbr0' />
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254' />
<host mac='AA:BB:CC:DD:EE:FF' ip='192.168.122.2' name='foobar'/>
</dhcp>
</ip>
</network>
So 11. Jan 13:13:05 CET 2009
Short overview about mpris and command line tools
mpris player
media mlayer remote interface specification, short mpris is a specification to connect media players via dbus. This is quite useful as you can have one command for example to control Amarok, Audacious or any other mpris capable player.This are all gui player, so lets have a look at mpd, a music daemon simple to control via commandline.
mpd natively does not support dbus, but there is another solution, mpDris, a mpd client exporting the mpris functionality via dbus.
mpris client
A really nice and powerful mpris command-line client is mpris-remote to access an mpris capable player. Here are some examples commands:mris-remote pause # toggle pause mris-remote next # next mpris-remote random true mpris-remote random falseit is really intuitiv, so just use ist.
So what is the benefit?
- You only have one command to control them all, so you can just switch your music player and your scripts will work. So instead of binding player specific commands to, e.g. your multimedia keys on the keyboard, consider using mpris and it does not depend if you use mpd, amarok, audacious or any other client.
- Additional features are possible, for example inhibit power-manager when playing music, so you can close the lid, unhibit when music stop so your pc can start sleep. And this works for multiple player out of the box.
- You can can subscribe to signals from the music player, so you can just get the information and don't have to check the status regular
Sa 3. Jan 17:22:10 CET 2009
Mark build dependencys as automatical installed
You can set the option on the commandline
apt-get -o "Apt::Get::Build-Dep-Automatic=True" build-dep gnome-power-manager
or set it in the config file
$ cat /etc/apt/apt.conf.d/99builddep APT::Get::Build-Dep-Automatic "True";
To remove the dependencies just use apt-get autoremove
Mo 29. Dez 23:52:10 CET 2008
Mehr als 800 Zuschauer innerhalb von 5 Minuten ....
Ich habe da u.a. ich beim Theora Streaming mitgemacht, und wir haben dazu von der FEM ihre MMS Streams transcoded und Theora Streams bereitgestellt. Kurz vor Start hatten wir ca. 400 Zuschauer, danach >1200 Zuschauer.
Das ganze auf 4 Servern (2 an der Uni Ulm, einer an der BA Lörrach und einer im BCC) verteilt. Sehr coole Aktion!
Do 20. Nov 14:14:30 CET 2008
Touchpoint scrolling mit dem neusten X11
Dazu einfach eine Datei mit dem folgenden Inhalt in /etc/hal/fdi/policy/ anlegen, z.bsp. scrolling.fdi
<match key="info.product" string="DualPoint Stick">
<merge key="input.x11_options.EmulateWheel" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
<merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge>
<merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
<merge key="input.x11_options.Protocol" type="string">ExplorerPS/2</merge>
</match>
Wenn man wie ich ein ALPS Touchpad hat, benoetigt man momentan noch einen Kernelpatch um mittels mittlerer Maustaste + Touchpoint
zu scrollen.
Do 20. Nov 13:52:22 CET 2008
Netwerktraffic per Verbindung messen
Jetzt noch mittels netstat -anp nachschauen welcher Benutzer den Traffic generiert und ihn schimpfen :)
So 21. Sep 16:07:45 CEST 2008
WSGI Applikationen als CGI ausfuehren
#!/usr/bin/env python2.5
from wsgiref.handlers import CGIHandler
from lodgeit import make_app
application = make_app(
# the path to the database
dburi='sqlite:////tmp/pastebin.db',
secret_key='xlw7pe@FO_gZ\xa4\xah\xbdTz\xa7\x9v\xf7\x7f_o\x8f\xedq\xc7\xaf\xc5R'
)
CGIHandler().run(application)
Dies ist ein Beispiel für lodgeit, und sollte eigentlich selbsterkärend sein.
Die Apache Konfiguration ist jetzt ziemlich einfach:
ScriptAlias /foo "/pfad/zum/cgi/script.cgi"und fertig.