August, 2008

Poor man’s NTP


( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105
Call Stack
#TimeMemoryFunctionLocation
10.000152980{main}( )../index.php:0
20.000256420require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' )../index.php:17
30.147513843728require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' )../wp-blog-header.php:16
40.148513911916include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/archive.php' )../template-loader.php:52
50.171714004596the_content( )../archive.php:35
60.172114005724apply_filters( )../post-template.php:167
70.174214008444call_user_func_array ( )../plugin.php:166
80.174214008628vim_color( )../plugin.php:0
90.174214008964preg_replace ( )../wp-vimcolor.php:143
100.174214012504preg_replace ( )../wp-vimcolor.php:143
110.174214012728vimcolor_process_color( )../wp-vimcolor.php(143) : regexp code:6
120.180214029028fread ( )../wp-vimcolor.php:105

Yesterday I had to quickly (more or less) synchronize the clocks of a handful of computers I was working on. I didn’t have the time to work out an NTP based solution, so I came up with the following simple trick:

Needless to say… it worked. :-)

Posted in Open Source Adventures, scripting   No Comments »