24 January 2010
By dopefish
In Tech
We use a set-top-box as the video source for mythtv. And while this works perfectly fine, we have to manually make sure the right channel is set for what mythtv wants to record. This can turn out to being a pain at time, especially when multiple things are planned to be recorded on different channels. So I went and ordered a IR transmitter from irblaster.info to give mythtv the possibility to change channels itself.
Since a bunch of the infos I found online were a bit out dated, here are a few tips for anyone using current versions of the software (I’ve got mythtv-backend 0.22 and lirc 0.8.4a running on a mythbuntu based system when I wrote this)
Hardware is easy to set up, just plug it into a free serial port.
1st we will head over to http://lirc.sourceforge.net/remotes/ and grab the file for our reciever set-top-box if we don’t already have them.
Then go edit /etc/lirc/hardware.conf and add the transmitter settings, these were mine:
| 1 | TRANSMITTER="Skymaster_XL10" |
| 2 | TRANSMITTER_MODULES="lirc_dev lirc_serial" |
| 3 | TRANSMITTER_DRIVER="" |
| 4 | TRANSMITTER_DEVICE="/dev/lirc1" |
| 5 | TRANSMITTER_LIRCD_CONF="skymaster/XL10" |
| 6 | TRANSMITTER_LIRCD_ARGS="" |
now include the reciever settings to /etc/lirc/lircd.conf
I edited my /etc/init.d/lirc to execute the following line before starting the daemon (was needed to ensure the lirc_serial module can be loaded):
| 1 | /bin/setserial /dev/ttyS0 uart none |
Restart lircd and you can then start testing if transmitting codes work with irsend works. here is a little wrapper script I wrote around irsend for mythtv to use. You may have to twiddle around with the sleeps and change the $Remote to your reciever. If the sleeps are too long (-> the script takes to long to finish switching channels), then mythtv will timeout and not display live tv.
| 01 | #!/bin/bash |
| 02 | |
| 03 | Remote="Skymaster_XL10" |
| 04 | |
| 05 | send="irsend -d /dev/lircd1 SEND_ONCE" |
| 06 | |
| 07 | if [[ "$(echo $1|grep -c "^[0-9]")" = "0" ]] |
| 08 | then # non-numeric command |
| 09 | $send $Remote $1 |
| 10 | else # numeric |
| 11 | for digit in $(echo $1 | sed -e 's/./& /g'); do |
| 12 | $send $Remote $digit |
| 13 | sleep 1.5 |
| 14 | done |
| 15 | fi |
| 16 | sleep 2 |
If everything is working fine, then go ahead and tell mythtv to use the script to change channels. This is done in the tuner card setup of mythtv-backend (mythtv-setup).
Continue reading
ir blaster, MythTV
09 January 2010
By dopefish
In Me
We went for a walk through the snow and some sledding today, here are the pics i shot ….
Continue reading
snow
25 November 2009
By dopefish
In Programming
| ( ! ) Warning: array_keys() [function.array-keys]: The first argument should be an array in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3643 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2833 | 7117752 | DevGeSHi->DevGeSHi( ) | ../devformatter.php:30 |
| 14 | 0.2833 | 7119984 | GeSHi->GeSHi( ) | ../devgeshi.php:32 |
| 15 | 0.2833 | 7120320 | GeSHi->set_language( ) | ../geshi.php:596 |
| 16 | 0.2833 | 7121168 | GeSHi->load_language( ) | ../geshi.php:688 |
| 17 | 0.2834 | 7124200 | array_keys
( ) | ../geshi.php:3643 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3643 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2833 | 7117752 | DevGeSHi->DevGeSHi( ) | ../devformatter.php:30 |
| 14 | 0.2833 | 7119984 | GeSHi->GeSHi( ) | ../devgeshi.php:32 |
| 15 | 0.2833 | 7120320 | GeSHi->set_language( ) | ../geshi.php:596 |
| 16 | 0.2833 | 7121168 | GeSHi->load_language( ) | ../geshi.php:688 |
| ( ! ) Warning: array_keys() [function.array-keys]: The first argument should be an array in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3651 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2833 | 7117752 | DevGeSHi->DevGeSHi( ) | ../devformatter.php:30 |
| 14 | 0.2833 | 7119984 | GeSHi->GeSHi( ) | ../devgeshi.php:32 |
| 15 | 0.2833 | 7120320 | GeSHi->set_language( ) | ../geshi.php:596 |
| 16 | 0.2833 | 7121168 | GeSHi->load_language( ) | ../geshi.php:688 |
| 17 | 0.2837 | 7124664 | array_keys
( ) | ../geshi.php:3651 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3651 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2833 | 7117752 | DevGeSHi->DevGeSHi( ) | ../devformatter.php:30 |
| 14 | 0.2833 | 7119984 | GeSHi->GeSHi( ) | ../devgeshi.php:32 |
| 15 | 0.2833 | 7120320 | GeSHi->set_language( ) | ../geshi.php:596 |
| 16 | 0.2833 | 7121168 | GeSHi->load_language( ) | ../geshi.php:688 |
| ( ! ) Warning: array_keys() [function.array-keys]: The first argument should be an array in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3654 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2833 | 7117752 | DevGeSHi->DevGeSHi( ) | ../devformatter.php:30 |
| 14 | 0.2833 | 7119984 | GeSHi->GeSHi( ) | ../devgeshi.php:32 |
| 15 | 0.2833 | 7120320 | GeSHi->set_language( ) | ../geshi.php:596 |
| 16 | 0.2833 | 7121168 | GeSHi->load_language( ) | ../geshi.php:688 |
| 17 | 0.2840 | 7124664 | array_keys
( ) | ../geshi.php:3654 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3654 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2833 | 7117752 | DevGeSHi->DevGeSHi( ) | ../devformatter.php:30 |
| 14 | 0.2833 | 7119984 | GeSHi->GeSHi( ) | ../devgeshi.php:32 |
| 15 | 0.2833 | 7120320 | GeSHi->set_language( ) | ../geshi.php:596 |
| 16 | 0.2833 | 7121168 | GeSHi->load_language( ) | ../geshi.php:688 |
| ( ! ) Warning: array_keys() [function.array-keys]: The first argument should be an array in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 1925 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2846 | 7126216 | GeSHi->build_parse_cache( ) | ../geshi.php:2053 |
| 16 | 0.2846 | 7126216 | array_keys
( ) | ../geshi.php:1925 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 1925 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2846 | 7126216 | GeSHi->build_parse_cache( ) | ../geshi.php:2053 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 2290 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| ( ! ) Warning: implode() [function.implode]: Argument must be an array in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3242 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2878 | 7139016 | GeSHi->parse_non_string_part( ) | ../geshi.php:2966 |
| 16 | 0.2879 | 7142008 | implode
( ) | ../geshi.php:3242 |
| ( ! ) Warning: array_keys() [function.array-keys]: The first argument should be an array in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3265 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2878 | 7139016 | GeSHi->parse_non_string_part( ) | ../geshi.php:2966 |
| 16 | 0.2881 | 7142272 | array_keys
( ) | ../geshi.php:3265 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3265 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2878 | 7139016 | GeSHi->parse_non_string_part( ) | ../geshi.php:2966 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3306 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2878 | 7139016 | GeSHi->parse_non_string_part( ) | ../geshi.php:2966 |
| ( ! ) Warning: array_keys() [function.array-keys]: The first argument should be an array in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3357 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2878 | 7139016 | GeSHi->parse_non_string_part( ) | ../geshi.php:2966 |
| 16 | 0.2892 | 7143480 | array_keys
( ) | ../geshi.php:3357 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3357 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2878 | 7139016 | GeSHi->parse_non_string_part( ) | ../geshi.php:2966 |
| ( ! ) Warning: array_keys() [function.array-keys]: The first argument should be an array in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3502 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2878 | 7139016 | GeSHi->parse_non_string_part( ) | ../geshi.php:2966 |
| 16 | 0.2895 | 7144224 | array_keys
( ) | ../geshi.php:3502 |
| ( ! ) Warning: Invalid argument supplied for foreach() in /srv/www/www.dopefish.de/wp-content/plugins/devformatter/geshi/geshi.php on line 3502 |
| Call Stack |
| # | Time | Memory | Function | Location |
| 1 | 0.0000 | 95904 | {main}( ) | ../index.php:0 |
| 2 | 0.0001 | 96768 | require( '/srv/www/www.dopefish.de/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.0751 | 6687440 | require_once( '/srv/www/www.dopefish.de/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.0758 | 6688096 | include( '/srv/www/www.dopefish.de/wp-content/themes/scruffy/index.php' ) | ../template-loader.php:27 |
| 5 | 0.2733 | 7227072 | the_content( ) | ../index.php:24 |
| 6 | 0.2734 | 7228288 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.2805 | 7112280 | call_user_func_array
( ) | ../plugin.php:166 |
| 8 | 0.2805 | 7112280 | devfmt_Formatter_the_content( ) | ../plugin.php:0 |
| 9 | 0.2805 | 7112280 | devfmt_ContentFormat( ) | ../devformatter.php:355 |
| 10 | 0.2805 | 7112280 | devfmt_ContentCheckCode( ) | ../devformatter.php:281 |
| 11 | 0.2832 | 7115104 | devfmt_ParseCode( ) | ../devformatter.php:266 |
| 12 | 0.2832 | 7116744 | devfmt_GeSHiParseCode( ) | ../devformatter.php:115 |
| 13 | 0.2846 | 7126216 | DevGeSHi->parse_code( ) | ../devformatter.php:31 |
| 14 | 0.2846 | 7126216 | GeSHi->parse_code( ) | ../devgeshi.php:45 |
| 15 | 0.2878 | 7139016 | GeSHi->parse_non_string_part( ) | ../geshi.php:2966 |
Farmvill can be a fun way to pass some time, but if your fields get to be a bit big clicking on every single field can get to be a bit tiresome. I found this autohotkey script in the depths of the internet. It simplifies the process greatly
| 01 | |
| 02 | !^c:: |
| 03 | GoSub GetFarmSq |
| 04 | GoSub Getfirstsq |
| 05 | |
| 06 | i=1 |
| 07 | |
| 08 | SetMouseDelay, 0 |
| 09 | |
| 10 | cycle := farmy/2 |
| 11 | newx=%startx% |
| 12 | newy=%starty% |
| 13 | loop, %cycle% |
| 14 | { |
| 15 | Click %newx%,%newy% |
| 16 | Loop, %farmx% |
| 17 | { |
| 18 | newx+=25 |
| 19 | newy-=12 |
| 20 | Click %newx%,%newy% |
| 21 | } |
| 22 | newx+=25 |
| 23 | newy+=12 |
| 24 | Click %newx%,%newy% |
| 25 | Loop, %farmx% |
| 26 | { |
| 27 | newx-=25 |
| 28 | newy+=12 |
| 29 | Click %newx%,%newy% |
| 30 | } |
| 31 | newx+=25 |
| 32 | newy+=12 |
| 33 | } |
| 34 | |
| 35 | return |
| 36 | |
| 37 | GoSub Getfirstsq |
| 38 | |
| 39 | GetFarmsq: |
| 40 | Inputbox, farmy, Hi, Enter the number of fields to the right to click on,,200,150,,,,,6 |
| 41 | if ErrorLevel |
| 42 | GoSub Esc |
| 43 | Inputbox, farmx, Hi, Enter the number of fields upwards to click on,,200,150,,,,,6 |
| 44 | if ErrorLevel |
| 45 | GoSub Esc |
| 46 | farmx-- |
| 47 | return |
| 48 | |
| 49 | Getfirstsq: |
| 50 | Msgbox, Click on the leftmost field to start with ("9 O'clock" position). |
| 51 | KeyWait, LButton, D |
| 52 | KeyWait, LButton, D |
| 53 | MouseGetPos, startx, starty |
| 54 | return |
| 55 | |
| 56 | Esc: |
| 57 | !^x::reload |
| 58 | Return |
| 59 | |
Continue reading
Autohotkey, Farmville, Script
23 November 2009
By dopefish
In Programming
Sometimes it is useful to switch into the directory of the script e.g. when we need to call or include further files and don’t want to go through the hassle of searching for the script in the file system. Especially when symlinks are involved everything get a bit more interesting. This little snippet switches into the directory of the script, using readlink to dereference symlinks if the script is called via a symlink.
| 01 | ## a small snippet to switch into script directory |
| 02 | SCRIPTDIR=${0} |
| 03 | if [[ -L ${SCRIPTDIR} ]] |
| 04 | then |
| 05 | # dereference the symlink |
| 06 | SCRIPTDIR="$(readlink -e ${0})" |
| 07 | fi |
| 08 | # chop off the scriptname and switch into the directory |
| 09 | cd ${SCRIPTDIR%/*} |
| 10 | |
Continue reading
bash, readlink, snippet
09 October 2009
By dopefish
In Programming
Today I ran into any old problem: you have a script that should do something when it recieves a signal (e.g. if someone sends it USR1 it should write to a log/syslog), but the script uses a long sleep because it normally only checks/calculates stuff every x min. If you send it a kill -USR1 $pid it will normally execute the trap AFTER the sleep is done, not so great. I figured of the following solution today: put the sleep in a while loop that checks if the full time was slept, and inside the loop a sleep that sleeps the X seconds remaing in the background followed by a wait.
If the script now recieves a USR1 it can kill the wait, execute the trap and will continue the remaining sleep on the next iteration of the loop.
| 01 | #!/bin/bash |
| 02 | |
| 03 | initialize() { |
| 04 | set -o nounset |
| 05 | trap cleanup INT TERM EXIT |
| 06 | trap print_foo USR1 |
| 07 | } |
| 08 | |
| 09 | cleanup() { |
| 10 | exit 0 |
| 11 | } |
| 12 | |
| 13 | print_foo() { |
| 14 | echo "foo" |
| 15 | } |
| 16 | |
| 17 | initialize |
| 18 | |
| 19 | # sleep 1 min |
| 20 | SLEEPTILL=$(date '+%s' --date="+1 min") |
| 21 | |
| 22 | while [[ $(date '+%s') -lt ${SLEEPTILL} ]] |
| 23 | do |
| 24 | sleep $(bc <<< "${SLEEPTILL} - $(date '+%s')") & |
| 25 | BACKGROUND=$! |
| 26 | wait $BACKGROUND |
| 27 | done |
| 28 | |
Continue reading
background, bash, kill, trap
29 September 2009
By dopefish
In Me, Photography
I made some of my cookies this evening and used the opportunity to take some pictures. The lighting wasn’t perfect, so everything has a slight yellow tint. I decided to leave the pictures that way instead of trying to correct the problem in Photoshop.
Continue reading
cookies, photo, Photoshop
29 September 2009
By dopefish
In Internet Stuff, Tech
I’m currently trying out the “Status Updater” addon for Wordpress since the latest version supports adding the status as a link to the facebook page …
Continue reading
21 September 2009
By dopefish
In Tech
Server was down for the last 6 hours due to me updating a few stuff that really really didn’t work out too well (grub, xen and kernel at the same time). I gave up and afer a few hours of work managed to revert back to the old configuration so I can recieve mail again till I figure out what went wrong. Server may be down tomorrow a bit too while I try to figure out what exactly broke and try to at least get grub and xen updated.
Continue reading
grub, linux, xen
20 September 2009
By dopefish
In Me
Yesterday we made a short trip to the castle in Schwetzingen, while we were there I took some photos around the castle.
Continue reading
castle, photos, schwetzingen
15 September 2009
By dopefish
In Me
I had Monday off work, so we went hiking in the Black Forest (southern Germany) the last 3 days. The first day we started hiking around Blumberg (I managed to twist my knee after a few km, didn’t really make things easier), then we took a steam locomotive (Sauschwänzlebahn) up the hill and hiked back to the car. Afterwards we drove up to Titisee where we booked a hotel for 2 nights.
The next day we drove over to the Wutachschlucht and hiked a very nice trail. Since the weather was good and it was a Sunday there were a decent amount of people hiking. In the late afternoon we finally arrived at our destination, sat down and rested our feet before we took a bus back to where we parked the car.
On the last day we were a bit tired for hiking the last 2 days and the weather was getting a bit rainy, so we decided to take the scenic route home, and stop by waterfalls and ruins on the way.
Continue reading
hiking, schwarzwald