<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-25058423</id><updated>2012-01-20T01:55:02.569+02:00</updated><category term='linux'/><category term='footnotes'/><category term='bit operations'/><category term='rtmpdump'/><category term='pager'/><category term='java'/><category term='number rounding'/><category term='security'/><category term='rtmp'/><category term='latex'/><category term='perl'/><category term='ffmpeg'/><category term='clear event logs'/><category term='slackware-current'/><category term='nouveau'/><category term='algorithms'/><category term='kde 4'/><category term='multimedia'/><category term='mplayer'/><category term='frame extraction'/><category term='kde'/><category term='Event Logs'/><category term='kde4'/><category term='matlab'/><category term='git pager'/><category term='kde 4.2'/><category term='git colors'/><category term='git'/><category term='unix'/><category term='kernel'/><category term='Windows 2008 R2'/><category term='Delete event logs'/><category term='Slackware'/><category term='gcc'/><category term='multilib'/><category term='nvidia'/><category term='fork bombs'/><category term='compiler'/><title type='text'>Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-25058423.post-2767515864383176617</id><published>2011-12-19T23:42:00.004+02:00</published><updated>2011-12-28T14:00:07.742+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pager'/><category scheme='http://www.blogger.com/atom/ns#' term='git pager'/><category scheme='http://www.blogger.com/atom/ns#' term='git colors'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='Slackware'/><title type='text'>slackware &amp; git colors</title><content type='html'>By default in Slackware, the colors in git are not displayed correct. If you enable colors in git with a command like this:&lt;pre&gt;git config color.ui true&lt;/pre&gt; instead of colored text you see escape characters like those below: &lt;pre&gt;ESC[33mblablabalESC[m&lt;/pre&gt; This has to do with the fact that `less' which is used by git to display pages doesn't by default output escape sequences in "raw" form to the terminal (you need apply to use -R option). Executing something like this will fix the issue:&lt;br /&gt;&lt;pre&gt;git config --global core.pager "less -FXRS"&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-2767515864383176617?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/2767515864383176617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=2767515864383176617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/2767515864383176617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/2767515864383176617'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2011/12/slackware-git-colors.html' title='slackware &amp; git colors'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-8506283182495051202</id><published>2011-08-24T16:14:00.004+03:00</published><updated>2011-08-25T11:10:39.750+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Event Logs'/><category scheme='http://www.blogger.com/atom/ns#' term='clear event logs'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 2008 R2'/><category scheme='http://www.blogger.com/atom/ns#' term='Delete event logs'/><title type='text'>Clear All Windows 2008 R2 event logs</title><content type='html'>If you want to clear the event logs in a Windows Server system, you can fire up Event Viewer, browse to the desired log and from the&lt;span style="font-weight: bold;"&gt; Actions &lt;/span&gt;menu select &lt;span style="font-weight:bold;"&gt;Clear Log...&lt;/span&gt;. But if you want to clear all the System and Application logs at once, you'd better use the `wevtutil' command line utility Microsoft offers. A Windows PowerShell command like this will do the job:&lt;br /&gt;&lt;pre&gt;wevtutil el | foreach { wevtutil cl $_ }&lt;/pre&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-8506283182495051202?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/8506283182495051202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=8506283182495051202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/8506283182495051202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/8506283182495051202'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2011/08/clear-all-windows-2008-r2-event-logs.html' title='Clear All Windows 2008 R2 event logs'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-2644659469027918930</id><published>2011-03-30T10:28:00.006+03:00</published><updated>2011-03-30T12:20:38.314+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='multilib'/><category scheme='http://www.blogger.com/atom/ns#' term='Slackware'/><category scheme='http://www.blogger.com/atom/ns#' term='slackware-current'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Download Alien Bob's multilib support packages</title><content type='html'>I've created a Perl script to download all slackware-current multilib support packages from &lt;a href="http://connie.slackware.com/~alien/multilib/current/"&gt;here&lt;/a&gt;. Perl really makes you a lazy programmer. You can do unbelievable many things in just a few lines.&lt;br /&gt;&lt;pre&gt;&lt;tt&gt;&lt;i&gt;&lt;font color="#9A1900"&gt;#!/usr/bin/perl -w&lt;/font&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font color="#0000FF"&gt;use&lt;/font&gt;&lt;/b&gt; LWP&lt;font color="#990000"&gt;::&lt;/font&gt;UserAgent&lt;font color="#990000"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;b&gt;&lt;font color="#0000FF"&gt;use&lt;/font&gt;&lt;/b&gt; strict&lt;font color="#990000"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font color="#0000FF"&gt;sub&lt;/font&gt;&lt;/b&gt; get_links&lt;br /&gt;&lt;font color="#FF0000"&gt;{&lt;/font&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color="#0000FF"&gt;my&lt;/font&gt;&lt;/b&gt; &lt;font color="#009900"&gt;$url&lt;/font&gt; &lt;font color="#990000"&gt;=&lt;/font&gt; &lt;b&gt;&lt;font color="#0000FF"&gt;shift&lt;/font&gt;&lt;/b&gt;&lt;font color="#990000"&gt;;&lt;/font&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color="#0000FF"&gt;my&lt;/font&gt;&lt;/b&gt; &lt;font color="#009900"&gt;$page&lt;/font&gt; &lt;font color="#990000"&gt;=&lt;/font&gt; LWP&lt;font color="#990000"&gt;::&lt;/font&gt;UserAgent&lt;font color="#990000"&gt;-&amp;gt;&lt;/font&gt;new&lt;font color="#990000"&gt;-&amp;gt;&lt;/font&gt;&lt;b&gt;&lt;font color="#000000"&gt;get&lt;/font&gt;&lt;/b&gt;&lt;font color="#990000"&gt;(&lt;/font&gt;&lt;font color="#009900"&gt;$url&lt;/font&gt;&lt;font color="#990000"&gt;)-&amp;gt;&lt;/font&gt;content&lt;font color="#990000"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;&lt;font color="#0000FF"&gt;map&lt;/font&gt;&lt;/b&gt; &lt;font color="#FF0000"&gt;{&lt;/font&gt; &lt;b&gt;&lt;font color="#0000FF"&gt;m&lt;/font&gt;&lt;/b&gt;&lt;font color="#FF6600"&gt;@/$@&lt;/font&gt; &lt;font color="#990000"&gt;&amp;amp;&amp;amp;&lt;/font&gt; &lt;b&gt;&lt;font color="#000000"&gt;get_links&lt;/font&gt;&lt;/b&gt;&lt;font color="#990000"&gt;(&lt;/font&gt;&lt;font color="#009900"&gt;$_&lt;/font&gt;&lt;font color="#990000"&gt;)&lt;/font&gt; &lt;font color="#990000"&gt;||&lt;/font&gt; &lt;b&gt;&lt;font color="#0000FF"&gt;system&lt;/font&gt;&lt;/b&gt;&lt;font color="#990000"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;"wget -xnH $_"&lt;/font&gt;&lt;font color="#990000"&gt;);&lt;/font&gt; &lt;font color="#FF0000"&gt;}&lt;/font&gt;&lt;br /&gt;        &lt;b&gt;&lt;font color="#0000FF"&gt;map&lt;/font&gt;&lt;/b&gt; &lt;font color="#FF0000"&gt;{&lt;/font&gt; &lt;font color="#FF0000"&gt;"$url$_"&lt;/font&gt; &lt;font color="#FF0000"&gt;}&lt;/font&gt; &lt;font color="#009900"&gt;$page&lt;/font&gt; &lt;font color="#990000"&gt;=~&lt;/font&gt; &lt;b&gt;&lt;font color="#0000FF"&gt;m&lt;/font&gt;&lt;/b&gt;&lt;font color="#FF6600"&gt;@&amp;lt;a href="(.+)"&amp;gt;\1&amp;lt;/a&amp;gt;@&lt;/font&gt;&lt;b&gt;&lt;font color="#0000FF"&gt;g&lt;/font&gt;&lt;/b&gt;&lt;font color="#990000"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;font color="#FF0000"&gt;}&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font color="#0000FF"&gt;my&lt;/font&gt;&lt;/b&gt; &lt;font color="#009900"&gt;$url&lt;/font&gt; &lt;font color="#990000"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;"http://connie.slackware.com/~alien/multilib/current/"&lt;/font&gt;&lt;font color="#990000"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font color="#000000"&gt;get_links&lt;/font&gt;&lt;/b&gt;&lt;font color="#990000"&gt;(&lt;/font&gt;&lt;font color="#009900"&gt;$url&lt;/font&gt;&lt;font color="#990000"&gt;);&lt;/font&gt;        &lt;br /&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-2644659469027918930?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/2644659469027918930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=2644659469027918930' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/2644659469027918930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/2644659469027918930'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2011/03/download-alien-bobs-multilib-support.html' title='Download Alien Bob&apos;s multilib support packages'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-10356076166049982</id><published>2011-01-14T11:56:00.007+02:00</published><updated>2011-01-14T18:07:51.618+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ffmpeg'/><category scheme='http://www.blogger.com/atom/ns#' term='frame extraction'/><category scheme='http://www.blogger.com/atom/ns#' term='rtmpdump'/><category scheme='http://www.blogger.com/atom/ns#' term='rtmp'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Extracting frames from a live stream</title><content type='html'>Many times, downloading and saving a stream locally is not an option. For example if the stream is a live stream. If you need to extract frames from a stream like this, you need to do it on-the-fly.&lt;br /&gt;&lt;br /&gt;A good tool for dumping media content streamed over rtmp is rtmpdump and a good tool for extracting frames from a video is ffmpeg. Luckily for us those two can be piped together, since rtmpdump by default dumps the streamed media content to standard output and ffmpeg provides the option to read the input from a pipe.&lt;br /&gt;&lt;br /&gt;To extract one frame per second from a stream try something like this:&lt;br /&gt;&lt;pre&gt;rtmpdump -r &amp;lt;rtmp_video_url&amp;gt; | ffmpeg -i pipe:0 -r 1 frame%05d.jpg&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-10356076166049982?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/10356076166049982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=10356076166049982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/10356076166049982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/10356076166049982'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2011/01/extracting-frames-from-live-stream.html' title='Extracting frames from a live stream'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-6157485848674995754</id><published>2010-03-09T11:54:00.008+02:00</published><updated>2011-01-14T18:06:55.073+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nouveau'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='slackware-current'/><category scheme='http://www.blogger.com/atom/ns#' term='nvidia'/><title type='text'>nVidia and Slackware-Current</title><content type='html'>A week ago slackware-current got a huge update and one of the things that were updated was the kernel. Kernel 2.6.33 intr0duced a new nvidia driver: nouveau,  which resulted by reverse-engineering the official driver I think. The problem is that out of the box, at least for now, neither nouveau, nor the official nvidia driver are runnable on the system.&lt;br /&gt;&lt;br /&gt;For nouveau, the Xorg that is included with slackware-current does not contain the  needed xf86-video-nouveau driver.&lt;br /&gt;You can download and compile this, but you need to find the suitable for your nouveau kernel module and this is not the latest from the nouveau repository:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;You could of course download the latest pair of kernel and xorg driver and this should work, but for now, I decided to stay with the official driver from nvidia. Two problems arise here. First the nouveau driver is loaded automatically in the boot process when the hardware is probed and it is conflicting with the official nvidia driver. Second, the latest nvidia driver 190.53 does not compile with kernel 2.6.33.&lt;br /&gt;&lt;br /&gt;In order to overcome the first problem you'll probably need to blacklist the nouveau module, or unload it every time before starting X-Window. You cannon directly unload nouveau and it's dependencies using rmmod. You have to unbind the nouveau frame buffer first. See &lt;a href="http://nouveau.freedesktop.org/wiki/KernelModeSetting"&gt;here&lt;/a&gt; for more info.&lt;br /&gt;&lt;br /&gt;Anyway, blacklisting the modules is easier. Simply append this:&lt;br /&gt;&lt;pre&gt;blacklist drm&lt;br /&gt;blacklist ttm&lt;br /&gt;blacklist nouveau&lt;/pre&gt;to /etc/modprobe.d/blacklist.conf and the old vga console driver will run the next time you boot the system.&lt;br /&gt;&lt;br /&gt;For the latest nvidia driver (190.53) you need first to apply the patch found here:&lt;br /&gt;&lt;a href="http://www.nvnews.net/vbulletin/attachment.php?attachmentid=39102&amp;amp;d=1262832345"&gt;nvidia-betasam-2.6.33.patch.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can apply a patch like this:&lt;br /&gt;&lt;tt&gt;sh ./NVIDIA-Linux-x86-190.53-pkg1.run --apply-patch nvidia-betasam-2.6.33.patch.txt&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;This will create a new file: NVIDIA-Linux-x86-190.53-pkg1-custom.run with the patched driver, which is compatiple with kernel 2.6.33.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-6157485848674995754?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/6157485848674995754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=6157485848674995754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/6157485848674995754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/6157485848674995754'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2010/03/nvidia-and-slackware-current.html' title='nVidia and Slackware-Current'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-4800593076845188958</id><published>2009-01-28T16:42:00.003+02:00</published><updated>2009-01-28T17:00:44.025+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde 4'/><category scheme='http://www.blogger.com/atom/ns#' term='Slackware'/><category scheme='http://www.blogger.com/atom/ns#' term='kde4'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='slackware-current'/><category scheme='http://www.blogger.com/atom/ns#' term='kde 4.2'/><title type='text'>Download kde4 from slackware-current</title><content type='html'>This is a  script to mirror the kde4 packages from slackware-current. For now, those packages works for slackware 12.2 too.&lt;br /&gt;&lt;br /&gt;The script may be executed multiple times from the same directory. It will detect the changes made in the repositoty, it will remove the obsolete local files and will only download the newer files that are not present in the local copy.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#!/bin/sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# Copyright 2008-2009  Nikos Skalkotos, Athens, Greece&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# Redistribution and use of this script, with or without modification, is&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# permitted provided that the following conditions are met:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# 1. Redistributions of this script must retain the above copyright&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#    notice, this list of conditions and the following disclaimer.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;server=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ftp://ftp.ntua.gr&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;url_path=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;pub/linux/slackware/slackware-current/testing/packages/kde4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;url=$server&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$url_path&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;dirs=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"deps extragear kde kde3-compat kde-l10n"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;files=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"remove-kde3.sh remove-kde4.sh"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;if&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt; [&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$1&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; = &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"--clean"&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt; ]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -n &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Cleaning up..."&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;rm&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -fr &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$files&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dirs&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"done"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;exit&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;fi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 255);"&gt;remove_obsolete()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Checking local directory &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;\"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$1&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;\"&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt; for obsolete files..."&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;cd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;for&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; i &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;in&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;`&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;ls&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;`&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;do&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;exists=&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;`&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$2&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;|&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;grep&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$i&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;if&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt; [&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; != &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -a &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$exists&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; = &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt; ]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Removing file: &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$1&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;rm&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -f &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;done&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;for&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; filename &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;in&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$files&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;do&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#Those are small scripts, so I'll download them every time&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;rm&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -f &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$filename&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;wget&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -c &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$url&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$filename&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;for&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;dir&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;in&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dirs&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;do&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#I need to create the dir the first time&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;mkdir&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -p &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dir&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;echo&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#Clean old files no longer listened in the repository&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -n &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Listing kde4/&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dir&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt; content..."&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;dir_content=&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;`&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;curl -sl &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$url&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dir&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;echo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"done"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; remove_obsolete &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dir&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dir_content&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(128, 128, 128);"&gt;#Now mirror the directory&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(136, 0, 136);"&gt;cd&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dir&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 204);"&gt;wget&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; --mirror -nH -nd &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$url&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$dir&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;done&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-4800593076845188958?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/4800593076845188958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=4800593076845188958' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/4800593076845188958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/4800593076845188958'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2009/01/download-kde4-from-slackware-current.html' title='Download kde4 from slackware-current'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-909802730067762856</id><published>2009-01-25T11:17:00.006+02:00</published><updated>2010-09-24T10:29:49.564+03:00</updated><title type='text'>Youtube watch in normal/high quality</title><content type='html'>Anybody noticed the watch in normal/high quality link that is present in the bottom right corner of some videos in www.youtube.com?&lt;br /&gt;&lt;br /&gt;The funny thing is that in some videos where the streaming delays while watching it in normal quality, it works perfectly in high quality. The only thing I could assume is that the videos are stored in high quality and are converted to normal quality on-the-fly instead of being stored in both formats.&lt;br /&gt;&lt;br /&gt;This makes the option pretty useless.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-909802730067762856?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/909802730067762856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=909802730067762856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/909802730067762856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/909802730067762856'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2009/01/youtube-watch-in-normalhigh-quality.html' title='Youtube watch in normal/high quality'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-7024371840131415387</id><published>2008-04-08T10:12:00.001+03:00</published><updated>2008-11-07T20:35:57.340+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bit operations'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='number rounding'/><title type='text'>Bit Operations: round a number to a next multiple of a power of 2</title><content type='html'>This is easier than the last bit operation post. By the way, I would like to thank "&lt;span dir="ltr"&gt;LOLmachine" for the comments - improvements in the last bit operation post....&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Anyway...Multiples of a power of 2 share the property that have at least a fixed number of digits  zero in the least significant position. So, all multiples of 2 have the 1 first bits zeroed, all multiples of 4 have the 2 digits zeroed, etc.&lt;br /&gt;&lt;br /&gt;In order to round a number (x) to the next multiple of "a", where "a" is a power of 2 all you need to do is to compute this:&lt;br /&gt;&lt;br /&gt;round(x) =  (x + (a-1)) &amp;amp; ~(a-1)&lt;br /&gt;&lt;br /&gt;SO,  if a is 8, the above formula looks like this:&lt;br /&gt;&lt;br /&gt;round(x) = (x + 7) &amp;amp; ~7;&lt;br /&gt;&lt;br /&gt;round(14) = (14 + 7) &amp;amp; (~7) = 16&lt;br /&gt;round(16) = (16 + 7) &amp;amp; (~7) = 16&lt;br /&gt;round(17) = (17 + 7) &amp;amp; (~7) = 24&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-7024371840131415387?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/7024371840131415387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=7024371840131415387' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/7024371840131415387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/7024371840131415387'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2008/04/bit-operations-round-number-to-next.html' title='Bit Operations: round a number to a next multiple of a power of 2'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-3840819732100853710</id><published>2008-03-17T14:09:00.001+02:00</published><updated>2008-11-05T11:50:32.963+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gcc'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Slackware'/><category scheme='http://www.blogger.com/atom/ns#' term='compiler'/><title type='text'>multiple gcc versions in Slackware 12.0</title><content type='html'>Slackware's default compiler nowadays is gcc-4.1.2. If you need an older compiler from the 3.x series, then you may use the one from the pasture directory of the distribution.&lt;br /&gt;&lt;br /&gt;The problem is that you cannot have them both, because the two packages have files with the same name. So, if you try to  use installpkg to install the older compiler the installer will overwrite some gcc-4.1.2 files.&lt;br /&gt;&lt;br /&gt;Fortunately,  you don't need to compile gcc by your self.  Eric Hameleers (alien bob) maintains an unofficial slackbuilds repository hosted in slackware. There is a gcc package: &lt;a href="http://www.slackware.com/%7Ealien/slackbuilds/gcc34/"&gt;http://www.slackware.com/~alien/slackbuilds/gcc34/&lt;/a&gt; which is compatible with the official one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-3840819732100853710?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/3840819732100853710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=3840819732100853710' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/3840819732100853710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/3840819732100853710'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2008/03/multiple-gcc-versions-in-slackware-120.html' title='multiple gcc versions in Slackware 12.0'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-7567249504523784420</id><published>2008-01-06T00:03:00.001+02:00</published><updated>2009-11-18T16:29:47.682+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='footnotes'/><title type='text'>latex and footnotes</title><content type='html'>In latex if you have a footnote and a figure with b (bottom) placement attribute on the same page, then the figure will be placed under the footnote. The result is really ugly....&lt;br /&gt;&lt;br /&gt;I was searching for a way to fix this. Of course the straight-forward solution is to use the h (here) attribute in the figure and put the figure's code in the position you want, but this is not the best thing to do.&lt;br /&gt;&lt;br /&gt;Well.. there is a way to force the footnotes  to be always placed at the bottom of the page. You can do this by using the &lt;tt&gt;footmisc&lt;/tt&gt;-package.  By using this package you can change the default typesetting of footnotes. If you include the line:&lt;br /&gt;&lt;pre&gt;\usepackage[bottom]{footmisc}&lt;/pre&gt; in latex preamble you get the desired footnotes behavior.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-7567249504523784420?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/7567249504523784420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=7567249504523784420' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/7567249504523784420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/7567249504523784420'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2008/01/latex-and-footnotes.html' title='latex and footnotes'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-2082408436524825425</id><published>2008-01-03T12:29:00.001+02:00</published><updated>2010-02-02T21:20:59.062+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bit operations'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><title type='text'>Bit Operations: find first zero bit</title><content type='html'>If anybody cares here is an algorithm to find the first zero bit in a number:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Invert the number&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Compute the two's complement of the inverted number&lt;/li&gt;&lt;li&gt;AND the results of (1) and (2)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Find the position by computing the binary logarithm of (3)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;e.x.&lt;br /&gt;For the number &lt;span style="font-family:courier new;"&gt;1011&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;0&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;111&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt; &lt;span style="font-family:courier new;"&gt;01001000&lt;/span&gt;&lt;/li&gt;&lt;li&gt; &lt;span style="font-family:courier new;"&gt;10111000&lt;/span&gt;&lt;/li&gt;&lt;li&gt; &lt;span style="font-family:courier new;"&gt;01001000&lt;/span&gt; AND &lt;span style="font-family:courier new;"&gt;10111000&lt;/span&gt; = &lt;span style="font-family:courier new;"&gt;0000&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;000&lt;/span&gt;&lt;/li&gt;&lt;li&gt;log2(&lt;span style="font-family:courier new;"&gt;0000&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;000&lt;/span&gt;) = 3&lt;/li&gt;&lt;/ol&gt;But in a x86 processor environment there is a more simple way to do this since Intel provides a specific assembly instruction for this purpose called &lt;span style="font-family:courier new;"&gt;bsfl&lt;/span&gt;. This instruction return the position (index) of the least significant bit set to &lt;span style="font-family:courier new;"&gt;1&lt;/span&gt; in a 32-bit word. By using inline assembly, someone can easily create a function that finds the first zero bit by inverting a number and feeding it to this instruction. For 8-bit numbers, the code for this in gcc would look like this:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * find the position of the first 0 in a 8-bit array&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;inline unsigned short find_first_zero(uint8_t bit_array)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    unsigned pos = 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    __asm__("bsfl %1,%0\n\t"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        "jne 1f\n\t"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        "movl $32, %0\n"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        "1:"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        : "=r" (pos)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        : "r" (~(bit_array)));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if (pos &gt; 7)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        return 8;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    return (unsigned short) pos;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-2082408436524825425?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/2082408436524825425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=2082408436524825425' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/2082408436524825425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/2082408436524825425'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2008/01/bit-operations-find-first-zero-bit.html' title='Bit Operations: find first zero bit'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-8015306634151860389</id><published>2007-12-05T17:11:00.000+02:00</published><updated>2007-12-22T13:45:18.993+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fork bombs'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>forkbomb</title><content type='html'>have you ever seen this:&lt;br /&gt;&lt;pre class="source-bash"&gt;:&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;{&lt;/span&gt; :|:&amp;amp; &lt;span class="br0"&gt;}&lt;/span&gt;;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This is a bash fork bomb.&lt;br /&gt;&lt;br /&gt;It's the same as writing:&lt;br /&gt;&lt;br /&gt;func()&lt;br /&gt;{&lt;br /&gt; func | func&amp;amp;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;func&lt;br /&gt;&lt;br /&gt;but it looks a lot more cryptic.&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-8015306634151860389?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/8015306634151860389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=8015306634151860389' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/8015306634151860389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/8015306634151860389'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2007/12/forkbomb.html' title='forkbomb'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-3583096891486546304</id><published>2007-05-10T00:02:00.000+03:00</published><updated>2007-12-19T01:59:47.507+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='matlab'/><title type='text'>Matlab R2007b ugly bug</title><content type='html'>Just installed the latest Matlab software on my Slackware 11 PC and after using it for  less than 120 seconds it crashed. I tried to replicate the conditions under which matlab crashed and it was really easy. In matlab's main window in the menu I went to File-&gt;Preferences... and in the Preferences window just pressing Fonts in the left navigation bar  was enough to crash Matlab.&lt;br /&gt;&lt;br /&gt;It must have been a java related thing, because I managed to fix it by just updating matlab's java jre. OK, well here is a solution:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download &lt;a href="http://www.java.com/en/download/linux_manual.jsp?locale=en&amp;amp;host=www.java.com:80"&gt;java's latest jre&lt;/a&gt; and select the Linux (self-extracting file).&lt;/li&gt;&lt;li&gt;Extract the jre: "sh jre-6u1-linux-i586.bin". This will create a jre1.6.0_01 directory. I did not want to update slackware's java. I leave mr. Volkerding to do that for me :). Matlab comes with a local copy of jre and this is what is used by default unless the MATLAB_JAVA enviromental variable is set to point to an external jre directory when $MATLAB_ROOT/bin/matlab script is executed. The matlab's local copy of java is under $MATLAB_ROOT/sys/java/jre/glnx86, at least for the linux x86 version.&lt;/li&gt;&lt;li&gt;I copied the jre1.6.0_01 directory there and updated the jre.cfg file  of the directory with the new jre version "echo   jre1.6.0_01 &gt; jre.cfg". The old version was 1.5.0.&lt;/li&gt;&lt;li&gt;I also removed the old jre directory: jre1.5.0 but this is optional.&lt;/li&gt;&lt;/ol&gt;After this everything worked fine.&lt;br /&gt;Happy "Matlabing"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-3583096891486546304?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/3583096891486546304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=3583096891486546304' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/3583096891486546304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/3583096891486546304'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2007/05/matlab-r2007b-ugly-bug.html' title='Matlab R2007b ugly bug'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-116234215846624247</id><published>2006-11-01T02:42:00.000+02:00</published><updated>2008-03-23T16:20:45.800+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='multimedia'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Mplayer rc1</title><content type='html'>Mplayer entered in rc state. It must have been more than 2-3 years it was on a pre-release state.&lt;br /&gt;I guess 1.0pre8 must have been the last pre-release version.&lt;br /&gt;8 pre-releases is not that much... Links 2.1 is in pre-release 23 :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-116234215846624247?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/116234215846624247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=116234215846624247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/116234215846624247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/116234215846624247'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2006/10/mplayer-rc1.html' title='Mplayer rc1'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-114887492727196944</id><published>2006-05-29T06:17:00.000+03:00</published><updated>2006-05-29T19:49:48.610+03:00</updated><title type='text'>slackware-current and TV-Card</title><content type='html'>Ok, After having for years a TV Card hooked on one of my motherboard's PCI slots and never using it I decided to configure it and make it usable. My card is an old PixelView PV_BT878P+ (REV .9F) card with a TPI8PSB02D tuner on it, or at least that what it is printed on the tuner :).&lt;br /&gt; &lt;br /&gt;It wasn't hard at all. I just open /usr/src/linux-2.6.16.18/Documentation/video4linux/CARDLIST.bttv and the most relative card values for my case were:&lt;br /&gt;16 -&gt; Prolink Pixelview PlayTV (bt878)&lt;br /&gt;37 -&gt; Prolink PixelView PlayTV pro&lt;br /&gt;50 -&gt; Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP&lt;br /&gt;70 -&gt; Prolink Pixelview PV-BT878P+ (Rev.4C,8E)&lt;br /&gt;&lt;br /&gt;For the tuner I opened /usr/src/linux-2.6.16.18/Documentation/video4linux/CARDLIST.tuner and since I couldn't find the exact model I tried those values:&lt;br /&gt;tuner=28 - LG PAL_BG+FM (TPI8PSB01D)&lt;br /&gt;tuner=29 - LG PAL_BG (TPI8PSB11D)&lt;br /&gt;&lt;br /&gt;To make the modules load correct through hotplug I just created a new file in /etc/modprobe.d/, I named it v4l with those options in it:&lt;br /&gt;&lt;br /&gt;# i2c&lt;br /&gt;alias char-major-89     i2c-dev&lt;br /&gt;options i2c-algo-bit    bit_test=1&lt;br /&gt;&lt;br /&gt;# bttv&lt;br /&gt;alias char-major-81     videodev&lt;br /&gt;alias char-major-81-0   bttv&lt;br /&gt;options bttv            card=70 radio=1 tuner=28&lt;br /&gt;&lt;br /&gt;card=70 and tuner=28 gave me the best result I think. The signal is a lot weaker than the one I have on my TV and if I remember correct it's also weaker than the one I had in windows years ago, but at least the card works. I use tvtime as a TV application.&lt;br /&gt;&lt;br /&gt;What exactly is the problem? the card, the modules, tvtime, me?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-114887492727196944?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/114887492727196944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=114887492727196944' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/114887492727196944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/114887492727196944'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2006/05/slackware-current-and-tv-card.html' title='slackware-current and TV-Card'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-114471064142385201</id><published>2006-04-11T01:56:00.000+03:00</published><updated>2006-04-11T02:13:32.933+03:00</updated><title type='text'>strange problem with Greek subtitles in mplayer</title><content type='html'>Ok, a few days ago, I compiled mplayer again, using the source from the CVS this time. Everything seems to be fine, until I discovered a really strange problem when displaying greek subtitles in avi movies.&lt;br /&gt;The Greek were sort of inverted horizontaly.&lt;br /&gt;Instead of displaying:&lt;br /&gt;"Τι κάνεις" it looked more like "ςιενάκ ιτ".&lt;br /&gt;English were displayed fine, so "Τι κάνεις John" looked  like  "ςιενάκ ιτ John".&lt;br /&gt;&lt;br /&gt;I tried using a windows arial.ttf font with the same results. What I had to do is keep the font encoding to Modern Greek (ISO-8859-7) but change the Subtitle encoding in Subtitle &amp;amp; OSD tab to Western European Languages with Euro (ISO-8859-15). I don't know why but after doing this it worked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-114471064142385201?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/114471064142385201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=114471064142385201' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/114471064142385201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/114471064142385201'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2006/04/strange-problem-with-greek-subtitles_10.html' title='strange problem with Greek subtitles in mplayer'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25058423.post-114372365356532671</id><published>2006-03-30T16:00:00.000+03:00</published><updated>2006-03-30T16:00:53.576+03:00</updated><title type='text'>My First Message</title><content type='html'>I just created my first blog...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25058423-114372365356532671?l=skalkoto.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skalkoto.blogspot.com/feeds/114372365356532671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25058423&amp;postID=114372365356532671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/114372365356532671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25058423/posts/default/114372365356532671'/><link rel='alternate' type='text/html' href='http://skalkoto.blogspot.com/2006/03/my-first-message.html' title='My First Message'/><author><name>Nikos Skalkotos</name><uri>http://www.blogger.com/profile/07640525317667873653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
