streda 6. júna 2012
utorok 25. októbra 2011
ID3 v2.4 tags
It all started when I found out my xmms2 did not read ID3 tags of some of my files properly. I use kid3 to create and modify the ID3 tags of my music collection and it was reading them all OK, so I started investigating.
The first clue was this bug in id3v2 which did not read the ID3 tags as well, so I recompiled the latest sources but still no cigar. I learned id3v2 is using id3lib to parse tags and I found this bug. So I changed the
ID3V2_LATEST = ID3V2_3_0 to ID3V2_LATEST = ID3V2_4_0 and it all started working. The question is why is this not enabled by default.
štvrtok 29. septembra 2011
pondelok 1. augusta 2011
Get rid of w00tw00t
Ever since I installed Apache on my server, I noticed annoying w00tw00t requests in the access log. At first I created fail2ban rule to block the IPs that originated the requests, but of course this is quite useless, since the requests come from different IPs and only repeat from the same IP after a few days.
So I found out the best solution to be blocking it at iptables level.
So I found out the best solution to be blocking it at iptables level.
štvrtok 28. júla 2011
Munin/rrdtool spike removal
Occasionally I see spikes on my network card charts. I found this article which says how to remove them and basically it shows how to convert the rrd file to xml and vice versa, so it's worth remembering.
cd /var/lib/munin/HOSTNAME
# To export rrd file to xml, use rrdtool dump file.rrd > file.rrd.xml # Move the rrd file to backup mv file.rrd file.rrd.bak # To convert from xml to rrd, use: rrdtool restore -r file.rrd.xml file.rrd # In case running under different user (e.g. root), don't forget to change back the ownership of rrd files: chown munin:munin file.rrd # To regenerate graphs, run as munin: /usr/share/munin/munin-graph --nolazy --host $HOSTNAME --force
piatok 1. júla 2011
mycal2rem
I was using ical2rem.pl to pull data off my Google calendar and display it in wyrd, which I'm using on my laptop. After a while I found a few shortcomings:
- the parsing of the .ics file from Google took about 25 seconds (on my Intel CoreII Duo T7100) during which the CPU was fully utilized
- the script does not use the features of remind format, e.g. the repeating events are created as multiple entries in the remind file
The mycal2rem.pl is far from full implementation of the .ics format (RFC 5545), but currently it parses all events from my calendar just fine.
The script can be found at github.
- the parsing of the .ics file from Google took about 25 seconds (on my Intel CoreII Duo T7100) during which the CPU was fully utilized
- the script does not use the features of remind format, e.g. the repeating events are created as multiple entries in the remind file
The mycal2rem.pl is far from full implementation of the .ics format (RFC 5545), but currently it parses all events from my calendar just fine.
The script can be found at github.
Prihlásiť na odber:
Komentáre (Atom)