Sunday, January 14, 2007

apt-cacher

Damn! Write a patch to a debian package apt-cacher only to find out that latest version from Etch already support the functionality I need. (g)

though publish the patch here (only to base app, not to the package itself), in case I (or anybody) will need it in Woody.



diff -u apt-cacher.orig/apt-cacher.pl apt-cacher/apt-cacher.pl
--- apt-cacher.orig/apt-cacher.pl 2005-07-30 17:03:00.000000000 +0400
+++ apt-cacher/apt-cacher.pl 2007-01-14 17:00:49.000000000 +0300
@@ -683,7 +683,8 @@

sub usage_error {
print STDERR "--- apt-cacher.pl:Usage error\n";
-
+ my $is_proxy_user = "no";
+ $is_proxy_user = "yes" if ($config{proxy_user});
print <<EOF;
Content-Type: text/html
Expires: 0
@@ -723,6 +724,7 @@
<tr bgcolor="cccccc"><td bgcolor="ccccff"> errorfile </td><td> $config{errorfile} </td></tr>
<tr bgcolor="cccccc"><td bgcolor="ccccff"> expire_hours </td><td> $config{expire_hours} </td></tr>
<tr bgcolor="cccccc"><td bgcolor="ccccff"> http_proxy </td><td> $config{http_proxy} </td></tr>
+<tr bgcolor="cccccc"><td bgcolor="ccccff"> proxy_user </td><td> $is_proxy_user </td></tr>
<tr bgcolor="cccccc"><td bgcolor="ccccff"> use_proxy </td><td> $config{use_proxy} </td></tr>
<tr bgcolor="cccccc"><td bgcolor="ccccff"> debug </td><td> $config{debug} </td></tr>
</table>
@@ -781,6 +783,9 @@
# Check whether a proxy is to be used, and set the appropriate environment variable
if ( $config{use_proxy} eq 1 && $config{http_proxy}) {
push(@elist, "-x", "http://$config{http_proxy}");
+ if ($config{proxy_user}) {
+ push(@elist, "-U", "$config{proxy_user}");
+ }
}
# Check if we need to set a rate limiting value: otherwise make it null
push(@elist,"--limit-rate", $config{limit}) if ($config{limit} > 0);



apt-cacher is a proxy for apt, that allows upgrading many debian boxes through one caching 'proxy'.

Read More...

Wednesday, January 10, 2007

Emacs learning curve

Comparison of text editors learning curves. True.

Read More...

Friday, January 05, 2007

fine-tuning Firefox

Feels like a secret knoledge: To be able closing a tab with a middle click, you should set middlemouse.ContentLoadURL to false in about:config. Seems it is need only in Linux-version of Firefox.

Read More...

Thursday, January 04, 2007

Google Reader update

wow, Google added new feature to the Google Reader - trends view - very nice statistics about reading feed - now I know I've read more that 4000 items for the last 30 days. what a waste of time of mine. (g)

The one I don't understand is how do they calculate percent of read items - trends tell me all my feed has 100% read items. Is 'read' mean 'viewed by user'? If so, thats not true, since when reading with google reader I scroll throw all items reading titles, and read full articles (summaries and descriptions) only when title concerns me.
I think there should be another trend like 'percent of viewed items' - 'viewed' like 'opened original source article'.

Read More...

Wednesday, January 03, 2007

Expandable posts

Added 'expandable post' feature described at hackosphere.

Though I am not sure if it is useful since it isn't the same as <lj-cut> and doesn't stop loading of all post contents. It just makes posts partially hidden.

(just not to forget how to make posts 'expandable': after blog template customization (done once) wrap text with tags <span id="fullpost"> and </span>)

Read More...

Denis Dzyubenko shadone