<?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-7350985320515164023</id><updated>2012-01-26T22:17:05.659-08:00</updated><category term='LaTeX'/><title type='text'>zoltan's blog</title><subtitle type='html'>Notes about physics, computers, Linux and computer clusters.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7350985320515164023.post-6089098756590429489</id><published>2009-10-14T23:52:00.000-07:00</published><updated>2009-10-15T00:02:18.833-07:00</updated><title type='text'>Convert an 32bit int to array of char in C</title><content type='html'>&lt;span style="color: rgb(46, 139, 87);"&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;char&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; d[&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;5&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;unsigned&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;int&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; a=-&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;123456789&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);font-family:courier new;" &gt;// int to array of char&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;char&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;* p= (&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;char&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; *)(&amp;amp;a);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);font-family:courier new;" &gt;&lt;b&gt;for&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;int&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; i=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;0&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;; i &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;4&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;; i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    d[i] = *(p+i); &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);font-family:courier new;" &gt;// store the int in 'd'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;d[5] = '\0'; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);font-family:courier new;" &gt;// add end character&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);font-family:courier new;" &gt;// array of char to int&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;int&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; out;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;p= (&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;char&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; *)(&amp;amp;out);  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);font-family:courier new;" &gt;// create a char pointer to the first byte of the int&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);font-family:courier new;" &gt;&lt;b&gt;for&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-family:courier new;" &gt;&lt;b&gt;int&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; i=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;0&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;; i &lt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;4&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;; i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   *(p+i)=d[i];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;printf(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;"&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);font-family:courier new;" &gt;%d&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);font-family:courier new;" &gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;"&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;,out);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);font-family:courier new;" &gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-family:courier new;" &gt;0&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-6089098756590429489?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/6089098756590429489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=6089098756590429489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/6089098756590429489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/6089098756590429489'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2009/10/convert-32bit-int-to-array-of-char-in-c.html' title='Convert an 32bit int to array of char in C'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-5410036279607068677</id><published>2009-09-11T01:00:00.000-07:00</published><updated>2009-09-11T01:02:44.285-07:00</updated><title type='text'>vim: Automatic replace of tabs with spaces</title><content type='html'>Add the following lines to &lt;span style="font-style: italic;"&gt;~/.vimrc:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;set tabstop=4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set expandtab&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To convert the TAB-s to spaces in edited files use&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;:retab&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-5410036279607068677?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/5410036279607068677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=5410036279607068677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/5410036279607068677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/5410036279607068677'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2009/09/vim-automatic-replace-of-tabs-with.html' title='vim: Automatic replace of tabs with spaces'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-2088210308291010150</id><published>2009-06-15T21:33:00.000-07:00</published><updated>2009-06-16T21:35:41.991-07:00</updated><title type='text'>Stream your soundcard using pulseaudio and Nokia N95</title><content type='html'>This guide will briefly explain how to create a network music stream server using the sound actually played on your sound card. I use to find this trick especially useful when I m sitting on my balcony with my laptop and in the same I can stream Pandora web radio via WiFi into my home music system (for the great happiness of my neighbours).&lt;br /&gt;&lt;br /&gt;What you will need:&lt;br /&gt;&lt;br /&gt;1. A computer with network connection.&lt;br /&gt;2. A mobile phone able to connect to your PC via network and with the ability to play network mp3 streams. (I have an  N95 8G phone with installed player &lt;a href="http://www.blogger.com/www.coreplayer.com/"&gt;CorePlayer&lt;/a&gt;. )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setup:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install &lt;span style="font-weight: bold;"&gt;pavucontrol, vlc &lt;/span&gt;&lt;span&gt;player and &lt;span style="font-weight: bold;"&gt;sox&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Get the  name of your sound card monitor device. Run in terminal:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;pactl list | grep -A2 'Source #' | grep 'Name: .*\.monitor$' | cut -d" " -f2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The command should return something like this:&lt;br /&gt;&lt;br /&gt;alsa_output.pci_8086_293e_sound_card_0.monitor&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Run &lt;span style="font-weight: bold;"&gt;pavucontrol &lt;/span&gt;from your terminal and in 'Input devices'  set the 'Show' option to 'All devices' . Find the monitor device and make sure that it is not muted.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Configure y&lt;span style="font-family:verdana;"&gt;our network for some IP. For example 192.168.2.2.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Start up some music in your favourite music player.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now let's convert the output of the monitor device of your sound card to an mp3 stream. Run this in the terminal:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;parec --device=alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0.monitor --format=s16le --rate=44100 --channels=2 | sox --type raw -s2L --rate 44100 --channels 2 - --type wav - | cvlc -v - --sout '#transcode{vcodec=mp4v,acodec=mp3,vb=800,ab=128}:standard{access=http,mux=raw,dst=192.168.2.2:8080}'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;where&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;pci_8086_293e_sound_card_0_alsa_playback_0.monitor &lt;span style="font-family:trebuchet ms;"&gt;is the name of your monitor device and&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;192.168.2.2:8080 &lt;span style="font-family: trebuchet ms;"&gt;is your PC's IP address with the streaming port. &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:courier new;" &gt;Yes, it looks freaky.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;font-family:courier new;" &gt;Connect your audio input of your mobile phone to your home audio system and play the &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;192.168.2.2:8080 stream in your mobile. With&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;few seconds delay you should hear the output of your PC's sound monitor device.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-2088210308291010150?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/2088210308291010150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=2088210308291010150' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/2088210308291010150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/2088210308291010150'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2009/06/stream-your-soundcard-using-pulseaudio.html' title='Stream your soundcard using pulseaudio and Nokia N95'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-7321208220157078518</id><published>2009-06-14T05:58:00.000-07:00</published><updated>2009-06-14T06:02:46.402-07:00</updated><title type='text'>Good bye Ubuntu</title><content type='html'>After four years on Ubuntu (my first install was Hoary) I decided to install Fedora 11 and say goodbye to Ubuntu. The reason is simple, the latest release Jaunty is simply an alpha software. I think I have quite solid knowledge to hack and usually get working all the X, WLAN and audio problems but Jaunty is simply too much pain. Good bye Ubuntu.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-7321208220157078518?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/7321208220157078518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=7321208220157078518' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/7321208220157078518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/7321208220157078518'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2009/06/good-bye-ubuntu.html' title='Good bye Ubuntu'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-7480245922108818131</id><published>2009-03-18T22:55:00.000-07:00</published><updated>2009-03-18T22:58:17.194-07:00</updated><title type='text'>Resize images using ImageMagick</title><content type='html'>Easy and fast way to batch resize of images using ImageMagick:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mogrify -resize 1200 *&lt;/span&gt;.jpg&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Respectively:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;mogrify -resize 800x600 *.jpg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Be careful! The original files will be overwritten!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-7480245922108818131?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/7480245922108818131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=7480245922108818131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/7480245922108818131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/7480245922108818131'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2009/03/resize-images-using-imagemagick.html' title='Resize images using ImageMagick'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-167342507039129621</id><published>2008-11-20T02:17:00.000-08:00</published><updated>2008-11-20T02:19:50.100-08:00</updated><title type='text'>Windows version of Firefox in wine vs. Linux version of Firefox</title><content type='html'>I compared the firefox 3.0.4 windows version (under wine 1.1.4) and the Linux version of firefox 3.0.4. The result is surprising: the windows version runs faster under wine than the native Linux Firefox under Ubuntu.&lt;br /&gt;While the windows version running in wine reacts on window zoom immediately, the Linux version spends 1-2 seconds on this operation ( core 2 duo 2GHz CPU).&lt;br /&gt;&lt;br /&gt;Running the online javascript benchmark:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://celtickane.com/webdesign/jsspeed.php" target="_blank"&gt;http://celtickane.com/webdesign/jsspeed.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;the windows also outperforms the Linux one.&lt;br /&gt;&lt;br /&gt;I m disappointed.  I think this can be a deal breaker for the new Linux users.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-167342507039129621?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/167342507039129621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=167342507039129621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/167342507039129621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/167342507039129621'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/11/windows-version-of-firefox-in-wine-vs.html' title='Windows version of Firefox in wine vs. Linux version of Firefox'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-1648904028682239695</id><published>2008-08-24T10:19:00.000-07:00</published><updated>2008-08-24T10:35:34.784-07:00</updated><title type='text'>Encrypt directories using encfs</title><content type='html'>This is a short guide about how to create encrypted directories under Ubuntu Linux.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install EncFS:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo apt-get install encfs&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;EncFS uses the fuse kernel extension, which we need to load into the kernel&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo sh -c "echo fuse &gt;&gt; /etc/modules"&lt;br /&gt;sudo modprobe fuse&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Add yourself into the fuse group&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo addgroup my_login_name fuse&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Log out and log in.&lt;/li&gt;&lt;li&gt;Create your encrypted directory:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cd ~&lt;br /&gt;mkdir .encrypt&lt;br /&gt;mkdir encrypt&lt;br /&gt;encfs $HOME/.encrypt $HOME/encrypt&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Press enter few times, and chose a password.&lt;br /&gt;Voala! The encrypted data will be stored in ~/.encrypt directory and it will be readable/writable trough the ~/encrypt directory. We used  the $HOME parameter because encfs requires a full path to the  directories. The password can be changed anytime using the encfsctl command.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-1648904028682239695?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/1648904028682239695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=1648904028682239695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/1648904028682239695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/1648904028682239695'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/08/encrypt-directories-using-encfs.html' title='Encrypt directories using encfs'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-3987861129700296626</id><published>2008-06-21T03:19:00.000-07:00</published><updated>2008-06-21T16:19:29.369-07:00</updated><title type='text'>Working Xorg.conf for Amilo v2030 using openchrome driver</title><content type='html'>This settings should work for the openchrome driver on Siemens V2030.&lt;br /&gt;I also &lt;a href="https://help.ubuntu.com/community/OpenChrome#head-d7b34822e159598a174aa1232521d1262e36bd8c"&gt;recompiled the openchrome driver&lt;/a&gt; from the actual CVS tree.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/X11/Xorg.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Section "InputDevice"&lt;br /&gt;Identifier    "Generic Keyboard"&lt;br /&gt;Driver        "kbd"&lt;br /&gt;Option        "XkbRules"    "xorg"&lt;br /&gt;Option        "XkbModel"    "pc105"&lt;br /&gt;Option        "XkbLayout"    "us"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "InputDevice"&lt;br /&gt;Identifier    "Configured Mouse"&lt;br /&gt;Driver        "mouse"&lt;br /&gt;Option        "CorePointer"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "InputDevice"&lt;br /&gt;Identifier    "Synaptics Touchpad"&lt;br /&gt;Driver        "synaptics"&lt;br /&gt;Option        "SendCoreEvents"    "true"&lt;br /&gt;Option        "Device"        "/dev/psaux"&lt;br /&gt;Option        "Protocol"        "auto-dev"&lt;br /&gt;Option        "HorizEdgeScroll"    "0"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "Device"&lt;br /&gt;Identifier      "Generic Video Card"&lt;br /&gt;Driver          "openchrome"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "Monitor"&lt;br /&gt;Identifier      "Generic Monitor"&lt;br /&gt;Option          "DPMS"&lt;br /&gt;HorizSync       28-81&lt;br /&gt;VertRefresh     56-75&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "Screen"&lt;br /&gt;Identifier      "Default Screen"&lt;br /&gt;Device          "Generic Video Card"&lt;br /&gt;Monitor         "Generic Monitor"&lt;br /&gt;DefaultDepth    16&lt;br /&gt;SubSection "Display"&lt;br /&gt;  Depth       16&lt;br /&gt;  Modes       "1024x768" "800x600" "640x480"&lt;br /&gt;EndSubSection&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "ServerLayout"&lt;br /&gt;Identifier      "Default Layout"&lt;br /&gt;Screen          "Default Screen"&lt;br /&gt;InputDevice     "Generic Keyboard"&lt;br /&gt;InputDevice     "Configured Mouse"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-3987861129700296626?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/3987861129700296626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=3987861129700296626' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/3987861129700296626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/3987861129700296626'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/06/working-xorgconf-for-amilo-v2030-using.html' title='Working Xorg.conf for Amilo v2030 using openchrome driver'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-7081666788270102953</id><published>2008-06-11T09:36:00.000-07:00</published><updated>2008-06-11T09:40:00.200-07:00</updated><title type='text'>I have 14 words for you</title><content type='html'>Developers! Developers! Developers! Developers! Developers!&lt;br /&gt;Developers! Developers! Developers! Developers! Developers!&lt;br /&gt;Developers! Developers! Developers! Developers!&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-size:130%;" &gt;&lt;a style="font-weight: bold;" href="http://linuxgw.com/%7Ekuscsik/developers.mp3"&gt;Download&lt;/a&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);font-size:130%;" &gt; in MP3 and increase your coding speed by 120% !&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-7081666788270102953?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/7081666788270102953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=7081666788270102953' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/7081666788270102953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/7081666788270102953'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/06/i-have-14-words-for-you.html' title='I have 14 words for you'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-6720572010452344125</id><published>2008-05-29T06:06:00.000-07:00</published><updated>2008-05-29T06:18:54.839-07:00</updated><title type='text'>openMosix dead(), LinuxPMI alive()!</title><content type='html'>The &lt;a href="http://openmosix.org"&gt;openMosix&lt;/a&gt; project was officially closed in March 1., 2008. The patient cluster hobbyist and academicians were awaiting for the stable 2.6 kernel port of openMosix for several years. A small group of developers decided to pick up the project and continue the development under a new name &lt;a href="http://linuxpmi.org"&gt;LinuxPMI&lt;/a&gt; (Linux Process Migration Infrastructure). Will LinuxPMI ever deliver a stable 2.6 port? One thing is sure, LinuxPMI needs skilled kernel hackers and public recognition, that single-system image clustering should be the future of computing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-6720572010452344125?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/6720572010452344125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=6720572010452344125' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/6720572010452344125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/6720572010452344125'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/05/openmosix-dead-linuxpmi-alive.html' title='openMosix dead(), LinuxPMI alive()!'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-4435800493662572400</id><published>2008-05-10T08:25:00.000-07:00</published><updated>2008-06-14T15:28:07.122-07:00</updated><title type='text'>Not so frequent command line hacks</title><content type='html'>&lt;ul&gt;&lt;li&gt;Read which processes are writing to the hard drive&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;# echo 1 | sudo tee /proc/sys/vm/block_dump&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;wait few seconds&lt;br /&gt;&lt;br /&gt;   &lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;# echo 0 | sudo tee /proc/sys/vm/block_dump&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;  &lt;span style="font-family:Courier New;"&gt;&lt;span style="color: rgb(139, 69, 19);"&gt;  # dmesg | grep WRITE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;Detect service and server versions using nmap:&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;# nmap -A -T4 -F 192.168.1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;/li&gt;&lt;li&gt;Print the detailed statistics of transferred bytes by the firewall rules&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family:Courier New;"&gt;&lt;span style="color: rgb(139, 69, 19);"&gt;# sudo iptables -L -nv &lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt; Convert the bit rate of an MP3&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(139, 69, 19);font-family:Comic Sans MS;" &gt;     &lt;span style="font-family:Courier New;"&gt;# lame -b 128 input.mp3 output.mp3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Setup wireless network from command line:&lt;br /&gt;&lt;br /&gt;   &lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;# sudo iwconfig wlan0 essid MY_AP_ESSID&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;  # sudo iwconfig wlan0 key "12371272BCBCBABC1212"&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;# sudo dhclient wlan0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where wlan0 is the ID of network device.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Which process is accessing the CDROM&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(139, 69, 19);"&gt;# &lt;/span&gt;&lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;lsof -n | grep /media/cdrom&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Convert DOS end of line to UNIX end of line&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;# sed -e 's/\r$//' inputfile &gt; outputfile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family:Courier New;"&gt;&lt;span style="color: rgb(139, 69, 19);"&gt;# tr '\r' '\n' &lt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;inputfile &lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color: rgb(139, 69, 19);"&gt;&gt; outputfile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;Get the size of a directory&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;# du -sh /home/blabla&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Change MAC address of a network interface&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(139, 69, 19);"&gt;# &lt;/span&gt;&lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;sudo ifconfig wlan0 hw ether AA:AA:BB:BB:CC:DD&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(139, 69, 19);font-family:Courier New;" &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Change your password in a non-interactive shell (PHP, Python web shells). Edit and paste these lines in to your shell:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 102, 51);"&gt;passwd &lt;&lt;+++&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 102, 51);"&gt;oldpasswd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 102, 51);"&gt;newpasswd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 102, 51);"&gt;newpasswd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 102, 51);"&gt;+++&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-4435800493662572400?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/4435800493662572400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=4435800493662572400' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4435800493662572400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4435800493662572400'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/05/not-so-frequent-command-line-hacks.html' title='Not so frequent command line hacks'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-4205218803948593366</id><published>2008-05-06T04:38:00.000-07:00</published><updated>2008-05-06T05:04:32.294-07:00</updated><title type='text'>Detect NAT using browser identification</title><content type='html'>There are &lt;a href="http://www.sflow.org/detectNAT/"&gt;several workarounds&lt;/a&gt; how to detect a NAT in your network. Here I propose a simple (but not so accurate) solution based on the identification of User-Agent strings in HTTP packets.&lt;br /&gt;The method is based on the assumption that there is a high probability that the users behind&lt;br /&gt;of  NAT are using different browsers or different version of the same browser.&lt;br /&gt;&lt;br /&gt;We use &lt;code&gt;tcpdum&lt;/code&gt; to capture and extract the User-Agent strings from the HTTP packets sent from the IP address &lt;code&gt;192.168.0.12&lt;/code&gt;:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;tcpdump -s 4000 -vvv -xX -l -w- 'host 192.168.0.12 and tcp port 80' | strings | grep User-Agent&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example output&lt;/span&gt;:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; hu; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14&lt;br /&gt;User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.13) Gecko/20060414&lt;br /&gt;User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;You can see that from the same IP address we captured three different browser agent strings identifying at least three users behind of the given address.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-4205218803948593366?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/4205218803948593366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=4205218803948593366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4205218803948593366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4205218803948593366'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/05/detect-nat-by-browser-identification.html' title='Detect NAT using browser identification'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-8592923450126609202</id><published>2008-03-25T03:34:00.000-07:00</published><updated>2008-03-25T04:00:05.221-07:00</updated><title type='text'>How to periodically remove temporary files in Linux</title><content type='html'>To  remove periodically some files from a specific directory you can easily setup a &lt;a href="http://en.wikipedia.org/wiki/Cron"&gt;cron&lt;/a&gt; entry. Execute in shell&lt;br /&gt;&lt;code&gt;&lt;br /&gt;crontab -e&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and add&lt;br /&gt;&lt;code&gt;&lt;br /&gt;*/60 * * * * find  /home/my_home/some_dir/ -name '*.dat' -mmin +60 -exec rm {} \;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;where &lt;span style="font-style: italic;"&gt;.dat&lt;/span&gt; is the suffix of the files and "-mmin +60  -exec rm {}" is the option telling to remove the files with data modified more than 60 minutes ago.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;If your crontab uses &lt;a href="http://www.tuxfiles.org/linuxhelp/vimcheat.html"&gt;Vim&lt;/a&gt; for editing  use :wq to save you changes and "INSERT", "ESC" to switch between Insert and Normal mode.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-8592923450126609202?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/8592923450126609202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=8592923450126609202' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/8592923450126609202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/8592923450126609202'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/03/how-to-periodically-remove-temporary.html' title='How to periodically remove temporary files in Linux'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-8939615455197821954</id><published>2008-03-02T22:59:00.000-08:00</published><updated>2008-03-03T02:00:19.303-08:00</updated><title type='text'>How to background image in LaTeX</title><content type='html'>Add this code before&lt;br /&gt;the &lt;code&gt; \begin{document} &lt;/code&gt; part&lt;br /&gt;&lt;br /&gt;&lt;code&gt;\usepackage{eso-pic}&lt;br /&gt;\newcommand\BackgroundPic{&lt;br /&gt;\put(0,0){&lt;br /&gt;\parbox[b][\paperheight]{\paperwidth}{%&lt;br /&gt;\vfill&lt;br /&gt;\centering&lt;br /&gt;\includegraphics[width=\paperwidth,height=\paperheight,&lt;br /&gt;               keepaspectratio]{background.png}%&lt;br /&gt;\vfill&lt;br /&gt;}}}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and this one right following the &lt;code&gt; \begin{document} &lt;/code&gt;:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;\AddToShipoutPicture{\BackgroundPic}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The name of background image is &lt;code&gt;background.png&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-8939615455197821954?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/8939615455197821954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=8939615455197821954' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/8939615455197821954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/8939615455197821954'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/03/how-to-background-image-in-latex.html' title='How to background image in LaTeX'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7350985320515164023.post-3315576550245922180</id><published>2008-02-22T22:11:00.001-08:00</published><updated>2008-02-22T22:11:46.818-08:00</updated><title type='text'>Download web pages recursively  with wget</title><content type='html'>Execute in shell&lt;br /&gt;&lt;code&gt; wget -rk  "http://wwwthis.com" &lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-3315576550245922180?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/3315576550245922180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=3315576550245922180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/3315576550245922180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/3315576550245922180'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/02/download-web-pages-recursively-with.html' title='Download web pages recursively  with wget'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-5627054362754959856</id><published>2008-02-22T21:56:00.000-08:00</published><updated>2008-02-22T22:05:34.938-08:00</updated><title type='text'>Simple user activity monitoring script for openMosix</title><content type='html'>&lt;a href="http://kuscsik.com/download/login.zip"&gt;This simple script&lt;/a&gt; calculates the number of active CPUs in an &lt;a href="http://openmosix.org/"&gt;openMosix cluster&lt;/a&gt; and the amount of resources used by the particular user. Copy it to your "/usr/local/bin/" folder and add it to your global bashrc file. The script works with the latest stable 2.4.26 openMosix and it was tested on &lt;a href="http://gentoo.org"&gt;Gentoo Linux&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Live free() or die()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-5627054362754959856?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/5627054362754959856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=5627054362754959856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/5627054362754959856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/5627054362754959856'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/02/simple-user-activity-monitoring-script.html' title='Simple user activity monitoring script for openMosix'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-4835633311632484873</id><published>2008-02-14T00:20:00.000-08:00</published><updated>2008-02-14T00:26:05.405-08:00</updated><title type='text'>How to create a histogram using awk</title><content type='html'>&lt;code&gt;&lt;span style="font-weight: bold;"&gt;Command:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;awk ' NF &gt; 0{ counts[$0] = counts[$0] + 1; } END { for (word in counts) print word, counts[word]; }' FILE.DAT&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;Example&lt;/span&gt;&lt;span style="font-size:85%;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;FILE.DAT&lt;br /&gt;--------&lt;br /&gt;A&lt;br /&gt;B&lt;br /&gt;C&lt;br /&gt;A&lt;br /&gt;B&lt;br /&gt;B&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The result:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;A 2&lt;br /&gt;B 3&lt;br /&gt;C 1&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-4835633311632484873?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/4835633311632484873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=4835633311632484873' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4835633311632484873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4835633311632484873'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/02/how-to-create-histogram-using-awk.html' title='How to create a histogram using awk'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-1648802019131298534</id><published>2008-02-06T14:35:00.000-08:00</published><updated>2008-02-06T16:51:40.170-08:00</updated><title type='text'>Animated computer simulation of in vitro cancer growth</title><content type='html'>On the next video sequences you can see the result of three state of the art models of cancer growth.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Spheric growth and the formation of necrotic  core &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;object height="350" width="425"&gt; &lt;param name="movie" value="http://www.youtube.com/v/mlq7CIvUyqs"&gt;  &lt;embed src="http://www.youtube.com/v/mlq7CIvUyqs" type="application/x-shockwave-flash" height="350" width="425"&gt;&lt;/embed&gt;  &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Mitosis of cancer cells&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;object height="350" width="425"&gt; &lt;param name="movie" value="http://www.youtube.com/v/xbWPTJRE4Kg"&gt;  &lt;embed src="http://www.youtube.com/v/xbWPTJRE4Kg" type="application/x-shockwave-flash" height="350" width="425"&gt;&lt;/embed&gt;  &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Fractal growth of two neighboring cancer cell colonies &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;object height="350" width="425"&gt; &lt;param name="movie" value="http://www.youtube.com/v/SBW6A8tR6K8"&gt;  &lt;embed src="http://www.youtube.com/v/SBW6A8tR6K8" type="application/x-shockwave-flash" height="350" width="425"&gt;&lt;/embed&gt;  &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The author of computer simulations: &lt;a href="http://158.197.33.91/%7Ehorvath/"&gt;Denis Horvath &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-1648802019131298534?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/1648802019131298534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=1648802019131298534' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/1648802019131298534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/1648802019131298534'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/02/animatied-computer-simulation-of-in.html' title='Animated computer simulation of in vitro cancer growth'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-1713914152029905441</id><published>2008-02-01T07:50:00.000-08:00</published><updated>2009-01-08T04:13:15.968-08:00</updated><title type='text'>How to userspace l7 filter on Ubuntu</title><content type='html'>L7-filter is a classifier for Linux's &lt;a href="http://netfilter.org/"&gt;Netfilter&lt;/a&gt; that identifies packets based on application layer data.  It can classify packets as Kazaa, &lt;abbr title="Hypertext Transfer Protocol"&gt;HTTP&lt;/abbr&gt;, Jabber, Citrix, Bittorrent, &lt;abbr title="File Transfer Protocol"&gt;FTP&lt;/abbr&gt;, Gnucleus, eDonkey2000, etc., regardless of port.  It complements existing classifiers that match on &lt;abbr title="Internet Protocol"&gt;IP&lt;/abbr&gt; address, port numbers and so on. L7 filter is usefull if you want to limit  or monitor different network protocols in your network. This article assumes that you have the basic knowledge how to use the terminal and set up a linux router.&lt;br /&gt;&lt;br /&gt;This how to describes the step by step installation of &lt;a href="http://l7-filter.sourceforge.net/HOWTO-userspace"&gt;Userspace L7&lt;/a&gt; filter on Ubuntu Linux.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Installation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Method:&lt;br /&gt;&lt;br /&gt;Add my PPA to you repository&lt;br /&gt;&lt;pre style="border: 1px solid gray; padding: 0.3em;" id="sources-list-entries"&gt;deb &lt;a href="http://ppa.launchpad.net/kuscsik/ubuntu"&gt;http://ppa.launchpad.net/kuscsik/ubuntu&lt;/a&gt; &lt;span id="series-deb"&gt;hardy&lt;/span&gt; main&lt;br /&gt;deb-src &lt;a href="http://ppa.launchpad.net/kuscsik/ubuntu"&gt;http://ppa.launchpad.net/kuscsik/ubuntu&lt;/a&gt; &lt;span id="series-deb-src"&gt;hardy&lt;/span&gt; main&lt;/pre&gt;and install          &lt;span style="font-style: italic;"&gt;l7-filter-userspace&lt;/span&gt; &lt;span style="font-style: italic;"&gt;          l7-protocols&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Method:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096"&gt;Add the universe repositories&lt;/a&gt; to your sources list.&lt;/li&gt;&lt;li&gt;Install some necessary packages&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;sudo apt-get install g++ build-essential&lt;br /&gt;sudo  apt-get  install libnetfilter-conntrack-dev libnetfilter-conntrack1 libnetfilter-queue-dev libnetfilter-queue1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Download the source package of &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=80085&amp;amp;package_id=214093"&gt;userspace l7 filter &lt;/a&gt;and the &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=80085&amp;amp;package_id=81756&amp;amp;release_id=568942"&gt;archive of the protocol definitions&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Unpack the protocol definitions and install it by&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;sudo make install&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Unpack the userspace l7 filter, compile and install it&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;# tar -xzf l7-filter-userspace-v0.10.tar.gz&lt;br /&gt;# cd l7-filter-userspace-v0.10/&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;&lt;span style="font-size:130%;"&gt;Download this patch&lt;br /&gt;&lt;br /&gt;# wget http://kuscsik.com/download/patch_l7_Zoltan_Kuscsik.patch&lt;br /&gt;&lt;br /&gt;# cd &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="font-size:130%;"&gt;l7-filter-userspace-v0.10&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;# patch -p1 &lt; ../patch_l7_Zoltan_Kuscsik.patch&lt;br /&gt;&lt;code&gt;&lt;span style="font-size:130%;"&gt;# /configure&lt;br /&gt;# make&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Load a necessary kernel module and add to the automatically loaded modules&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;# sudo modprobe ip_conntrack_netlink&lt;br /&gt;# sudo bash -c  "echo ip_conntrack_netlink &gt;&gt; /etc/modules"&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let assume that you have a Ubuntu server with two network devices with&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;/span&gt;WAN device &lt;span style="font-style: italic;"&gt;eth0&lt;/span&gt; and LAN device &lt;span style="font-style: italic;"&gt;eth1&lt;/span&gt;. With iptables we redirect forwarded packages to the userspace&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;# sudo iptables -A FORWARD -j NFQUEUE --queue-num 0&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Create a l7 config file in your favorite editor&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;sudo vi /etc/l7_filter.conf&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and add some protocols&lt;br /&gt;&lt;code&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;ssh          5&lt;br /&gt;bittorrent   6&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The list of all supported protocols can be found &lt;a href="http://l7-filter.sourceforge.net/protocols"&gt;here&lt;/a&gt;. From the config we can read  that l7 filter will assign the mark 5 to the packets of ssh protocol and it will sign with mark 6 the bittorrent packets.&lt;br /&gt;&lt;br /&gt;Start l7 filter in debuging mode&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;l7-filter -vv -f /etc/l7_filter.conf&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On your LAN client run a bittorrent session or make an ssh connection to an external server. If everything goes fine l7-filter will recognize your traffic and inform you trough the standard output.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Usage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, we are able to mark the connections. The next step is to set up the traffic control. For this you can use the &lt;a href="http://luxik.cdi.cz/%7Edevik/qos/htb/"&gt;HTB packet sheduller.&lt;/a&gt;&lt;br /&gt;[to be improved...]&lt;br /&gt;&lt;br /&gt;You can set up the start of l7-filter automatically by adding a line to /etc/rc.local&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;nohup /usr/local/bin/l7-filter -f /etc/l7-filter.conf &amp;amp;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Warning! &lt;/span&gt;This is a dangerous solution on a production server. If the program terminates unexpectedly your users will be cut off from the internet. You should set up some kind of monitoring for the l7-filter process.&lt;br /&gt;You will notice, that the filter uses significant amount of system resources. You can save some computation time and memory by improving the forwarding rule.&lt;br /&gt;For example, if you plan to shape the outgoing peer-to-peer connections it is a good idea to add some port specific selection to the userspace redirection rule&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;sudo iptables -A FORWARD -i eth0 -p tcp --dport 1024:  -j NFQUEUE --queue-num 0&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which will pass to the filter only the packets targeting higher ports than 1024.&lt;br /&gt;&lt;br /&gt;I will  improve this article, so please subscribe to the feed. If&lt;br /&gt;you have any question or comments don't hesitate to drop me a message.&lt;br /&gt;&lt;br /&gt;Please read the home page of Layer 7 Userspace&lt;br /&gt;&lt;br /&gt;&lt;a href="http://l7-filter.sourceforge.net/HOWTO-userspace"&gt;http://l7-filter.sourceforge.net/HOWTO-userspace&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Especially the section why it is a bad idea to use the packet filtering for service blocking.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-1713914152029905441?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/1713914152029905441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=1713914152029905441' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/1713914152029905441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/1713914152029905441'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/02/how-to-userspace-l7-filter-on-ubuntu.html' title='How to userspace l7 filter on Ubuntu'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7350985320515164023.post-497126917624193657</id><published>2008-01-30T14:24:00.000-08:00</published><updated>2008-01-30T16:27:27.542-08:00</updated><title type='text'>IX webhosting: the default backdoor</title><content type='html'>IX webhosting offers a very solid product for a reasonable price. Using cPanel it allows an easy administration of services and domains. You can choose between Linux or Windows hosting and with single clicks you can quickly install many of the available web applications.  In the first days, I was very happy, that after the infinite number of manual installation of applications on the university servers I don't need to care about  mail and mysql servers.&lt;br /&gt;&lt;br /&gt;However, the answer for my first bug report was interesting:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;Question:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;" - Using phpshell and runing the chsh program on server side &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;the users are able to change their default &lt;/span&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;shell from /bin/nologin to any other shell and get &lt;/span&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;access to the IX servers by ssh&lt;/span&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;I hope my effort to inform you about the flaw will &lt;/span&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;you not understand as a malicious activity. &lt;span style="color: rgb(153, 51, 0);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;The answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;br /&gt;" - &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;Although pointing out that minor security flaw wasn't viewed as malicious activity, please understand that any other attempts to hack into our system will be viewed as such, and it will be treated according to our policies. &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;Thank you very much for understanding."&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Nothing serious. It is not so interesting to be publish on a blog. The bug was fixed and someone in the deep universe realized that pam.d in the /etc directory is not the short of   &lt;span style="font-weight: bold;"&gt;PAM&lt;/span&gt;pers &lt;span style="font-weight: bold;"&gt;D&lt;/span&gt;iscount.&lt;br /&gt;&lt;br /&gt;Today I reported my second bug:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);"&gt;The  default installation of IX's "click and install"  E-commerce software allows read and write rights to users directory to anyone on the internet.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);"&gt;Probably you have lot of affected users.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No state of the art hacking needed. There is a nice php admin interface without password. OK, I know what is in your mind: You will notice at the first login that nobody asked your admin password.  The trap is that the admin interface is linked only in to the cPanel and when you access it you have the feeling that the password authentication is missing because  the authentication is derived from your cPanel access (as in many other applications and settings in cPanel). After all, a hacker can easily upload a malicious php file and execute some nice exec() calls affecting the rest of your domains hosted by IX webhosting.&lt;br /&gt;&lt;br /&gt;The response of the hosting service was simple with showing the signs of  deep philosophical understanding of basic forces governing the  universe&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;"If you don't like it, don't use our Easy Install products."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and some more words about that they will not change the security policy.&lt;br /&gt;&lt;br /&gt;....end of discussions ....&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion: &lt;/span&gt;&lt;br /&gt;If you are using the osCommerce product at IX webhosting check if you are able to login without password at  &lt;span style="font-style: italic;"&gt;www.your_domain.com/admin&lt;/span&gt; and if it necessary  secure your site by setting up a &lt;span style="font-style: italic;"&gt;.htpasswd&lt;/span&gt; file (google for how-to).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-497126917624193657?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/497126917624193657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=497126917624193657' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/497126917624193657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/497126917624193657'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/01/ix-webhosting-default-backdoor.html' title='IX webhosting: the default backdoor'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-8005270607734230571</id><published>2008-01-29T06:59:00.000-08:00</published><updated>2008-01-29T07:02:43.455-08:00</updated><title type='text'>List directories only using ls</title><content type='html'>Very basic and useful command&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ls -d */&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-8005270607734230571?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/8005270607734230571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=8005270607734230571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/8005270607734230571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/8005270607734230571'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/01/list-directories-only-using-ls.html' title='List directories only using ls'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-3636416772567357415</id><published>2008-01-27T11:53:00.000-08:00</published><updated>2008-08-19T11:18:58.431-07:00</updated><title type='text'>Transparent proxy with Squid 3 on Ubuntu server</title><content type='html'>&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;updated&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a short guide how to set up a transparent cache proxy on Ubuntu Server. Basically, there are two reasons why you may be interested setting up a Squid proxy: speed up your web access and save your bandwidth.  Let assume that you already set up a Linux gateway using iptables. It is possible to run squid also on Windows but unfortunately it is extremely hard to find a hardware on which Windows is able to survive more than one week. Other words, windows is out of scope of this article.&lt;br /&gt;The first step is to install squid 3&lt;br /&gt;&lt;code&gt;&lt;br /&gt;apt-get install squid3&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;edit the squid 3 configuration file in your favorite editor&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo vi /etc/squid3/squid.conf&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and set the transparency and the allowed hosts&lt;code&gt;&lt;br /&gt;&lt;br /&gt;http_port 3128 transparent&lt;br /&gt;acl our_networks src 192.168.0.0/24&lt;br /&gt;&lt;/code&gt;&lt;code&gt; acl localnet src 127.0.0.1/255.255.255.255&lt;/code&gt;&lt;br /&gt;&lt;code&gt;http_access allow our_networks&lt;br /&gt;&lt;/code&gt;&lt;code&gt;http_access allow localnet&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;where &lt;code&gt;192.168.0.0/24&lt;/code&gt; is the IP range of local network. Probably you need adjust the swap size&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cache_dir ufs /var/spool/squid3 7000 16 256&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;where the first number denotes the size of cache in megabytes. Save you changes and restart the squid proxy by&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo /etc/init.d/squid3 restart&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;For more detailed configuration read the manual of Squid or check the &lt;a href="http://wiki.squid-cache.org/ConfigExamples/"&gt;configuration examples on Squid wiki page&lt;/a&gt;.&lt;br /&gt;Remember, the memory and processor usage of squid is a function of swap size.&lt;br /&gt;Last but not the least we need to redirect the HTTP traffic to your new shiny proxy&lt;br /&gt;&lt;code&gt;&lt;br /&gt;iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1:3128&lt;br /&gt;iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;where eth1, eth0 are the LAN, WAN devices and 192.168.0.1 is the IP address of your LAN device.&lt;br /&gt;&lt;br /&gt;After all, probably you feel the need to monitor the performance of your proxy. Unfortunately, most of the squid log parsers in the Ubuntu repository are configured for Squid 2.x. Nevertheless, squid 3 uses the same log format, so you can change the log file path in your parser config file (sarg, calamaris, etd.) or simply link the log directory of squid 3 to the correct path&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ln -s /var/log/squid3 /var/log/squid&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Good luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-3636416772567357415?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/3636416772567357415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=3636416772567357415' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/3636416772567357415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/3636416772567357415'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/01/transparent-proxy-with-squid-3-on.html' title='Transparent proxy with Squid 3 on Ubuntu server'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7350985320515164023.post-4932268720158398832</id><published>2008-01-24T15:25:00.000-08:00</published><updated>2008-01-24T15:37:11.778-08:00</updated><title type='text'>How to jailbreak the 1.1.3 iphone firmware</title><content type='html'>According to&lt;b&gt; &lt;/b&gt;&lt;a href="http://cre.ations.net/blog"&gt;Nate True's blog&lt;/a&gt;   it is possible to jailbreak an 1.1.3  version iphone.&lt;br /&gt;&lt;br /&gt;The steps are the following:&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;- Start with a 1.1.1 or 1.1.2 jailbroken phone with Installer.app installed.&lt;br /&gt;- Plug in your phone via USB to your computer.&lt;br /&gt;- Download, extract, and run &lt;a href="http://devices.natetrue.com/iphone/ibrickr-jb113.zip"&gt;iBrickr Special 1.1.3 jailbreak edition&lt;/a&gt; (ibrickr.exe in the archive).&lt;br /&gt;- iBrickr will determine what firmware you are running on your phone and make sure you can run the update.&lt;br /&gt;- iBrickr will then guide you through the process of obtaining and modifying the 1.1.3 firmware (make sure to read everything thoroughly).&lt;br /&gt;- iBrickr will upload the new firmware image to your phone. Note that this only puts the file on your phone and does not modify it at all, yet.&lt;br /&gt;- When iBrickr finishes (should take about 10 minutes), it will tell you to go to Installer and install the "1.1.3 soft upgrade" package. Do that.&lt;br /&gt;- When the installer finishes (this should take another 10-15 minutes), your phone should reboot with a fresh activated 1.1.3 firmware.&lt;br /&gt;&lt;br /&gt;Anyway, watch the source blog for new informations:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cre.ations.net/blog/post/iphone-113-jailbreak-released"&gt; http://cre.ations.net/blog/post/iphone-113-jailbreak-released&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-4932268720158398832?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/4932268720158398832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=4932268720158398832' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4932268720158398832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4932268720158398832'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2008/01/how-to-jailbreak-113-iphone-firmware.html' title='How to jailbreak the 1.1.3 iphone firmware'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-614511233614167836</id><published>2007-08-28T07:54:00.000-07:00</published><updated>2010-05-16T09:16:35.305-07:00</updated><title type='text'>How to benchmark C++ code using gcc and gprof</title><content type='html'>As the last step of software development you should test the performance of your code. This is a simple example how to benchmark the time consumption of different procedures in a C or C++ code. We will compare two procedures: calculating sin and exponential values for 5e7 numbers. Let write a code with name &lt;span style="font-style: italic;"&gt;test.cpp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);font-size:85%;"&gt;#include  &lt;math.h&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-size:85%;"&gt;&lt;math.h&gt;&lt;/math.h&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(160, 32, 240);font-size:85%;"&gt;#define LIMIT &lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-size:85%;"&gt;50000000&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-size:85%;"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; exponential(){&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-size:85%;"&gt;&lt;b&gt;double&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; a;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;limit; a="exp(i/&lt;/span"&gt;&lt;/limit;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(165, 42, 42);font-size:85%;"&gt;&lt;b&gt;for&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;(&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-size:85%;"&gt;&lt;b&gt;int&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; i=1; i != LIMIT; i++)  &lt;br /&gt;a=exp(i/1000.0);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;limit; a="exp(i/&lt;/span"&gt;&lt;/limit;&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;limit; a="exp(i/&lt;/span"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-size:85%;"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; sinFunc(){&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-size:85%;"&gt;&lt;b&gt;double&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; a;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);font-size:85%;"&gt;&lt;b&gt;for&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;(&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-size:85%;"&gt;&lt;b&gt;int&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; i=1; i != LIMIT; i++&lt;/span&gt;&lt;/limit;&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;a=sin(i/1000.0);&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);font-size:85%;"&gt;&lt;b&gt;i&lt;span style="font-family:courier new;"&gt;nt&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; main(){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;expone&lt;/span&gt;ntial();&lt;br /&gt;sinFunc();&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);font-size:85%;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);font-size:85%;"&gt;0&lt;/span&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and &lt;span style="font-family:courier new;"&gt;compile&lt;/span&gt; by &lt;span style="font-style: italic;"&gt;g++:&lt;br /&gt;&lt;br /&gt;g++ -pg test.cpp -o test.out&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;After running the &lt;span style="font-style: italic;"&gt;./test.out&lt;/span&gt; file a new file &lt;span style="font-style: italic;"&gt;gmon.out&lt;/span&gt; will appear in your working directory. This file contains the profile information of your code. This information can be read by running the command&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;gprof test.out&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which will tell us:&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;Flat profile:&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Each sample counts as 0.01 seconds.&lt;br /&gt;%   cumulative   self              self       total&lt;br /&gt;time   seconds   seconds    calls   s/call   s/call  name&lt;br /&gt;51.66      1.17     1.17        1     1.17     1.17  sinus()&lt;br /&gt;48.99      2.27     1.11        1     1.11     1.11  exponential()&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;that our program 51.6% of time spent for calculation of &lt;span style="font-style: italic;"&gt;sinus()&lt;/span&gt; procedure and 48.99% for &lt;span style="font-style: italic;"&gt;exponential().&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-614511233614167836?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/614511233614167836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=614511233614167836' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/614511233614167836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/614511233614167836'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/08/how-to-benchmark-c-code-using-gcc.html' title='How to benchmark C++ code using gcc and gprof'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-5053530747419665799</id><published>2007-07-04T05:23:00.000-07:00</published><updated>2007-07-04T07:01:01.762-07:00</updated><title type='text'>Automatic upload to a ftp server (ubuntu)</title><content type='html'>Install ncftp2&lt;br /&gt;&lt;code&gt;&lt;br /&gt;apt-get install ncftp2&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and run&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ncftpput  -p my_password -u my_user_name -C ftp.my_server.com \&lt;br /&gt; file_to_copy.ogg /file_name_on_ftp.ogg&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For automatic upload in every hour edit cron by&lt;br /&gt;&lt;code&gt;&lt;br /&gt;crontab -e&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and add this line&lt;br /&gt;&lt;code&gt;&lt;br /&gt;0   * * * * ncftpput  -p my_password -u my_user_name -C ftp.my_server.com  file_to_copy.ogg &lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-5053530747419665799?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/5053530747419665799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=5053530747419665799' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/5053530747419665799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/5053530747419665799'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/07/automatic-upload-to-ftp-server-ubuntu.html' title='Automatic upload to a ftp server (ubuntu)'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-7304813314402595229</id><published>2007-07-04T00:02:00.000-07:00</published><updated>2007-07-04T00:09:09.054-07:00</updated><title type='text'>3D CA library</title><content type='html'>Peter wrote a &lt;a href="http://sourceforge.net/projects/threedcalib/"&gt; nice library &lt;/a&gt; for 3D cellular automaton (CA). There are many useful tricks inside how to write a memory and speed efficient CA code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-7304813314402595229?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/7304813314402595229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=7304813314402595229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/7304813314402595229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/7304813314402595229'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/07/3d-ca-library.html' title='3D CA library'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-2353417755529852951</id><published>2007-06-28T15:26:00.000-07:00</published><updated>2007-06-29T23:45:27.401-07:00</updated><title type='text'>Enemy territory nexus cheater list</title><content type='html'>For one of the ET server owner I made a one month monitoring of the Nexus IRC logs.&lt;br /&gt;&lt;a href="http://158.197.33.240/~kuscsik/nexus_cheat_list.zip"&gt; Here &lt;/a&gt; you can find a nearly complete list of nexus cheaters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-2353417755529852951?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/2353417755529852951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=2353417755529852951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/2353417755529852951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/2353417755529852951'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/06/enemy-territory-nexus-cheater-list.html' title='Enemy territory nexus cheater list'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-6890948750648676240</id><published>2007-06-25T16:07:00.000-07:00</published><updated>2008-03-27T06:12:39.252-07:00</updated><title type='text'>Edit eps on linux</title><content type='html'>There are many tools for converting between the formates eps, pdf, ps and latex but unfortunately&lt;br /&gt;there are not supported by the most of open source vector graphics programs.&lt;br /&gt;Our first task is to convert the eps file in to the native format of skencil. For this we will use the pstoedit program (standard package in most of distributions).&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;pstoedit -dt  -f sk my_file.eps my_file.sk&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The -dt flag is very important, which will convert the postscript fonts to polygons.&lt;br /&gt;&lt;br /&gt;Now, we need a second program called "skconvert" included in the skencil package. If it is not included as standard package in your Linux distro, you can download it from &lt;a href="http://www.skencil.org/"&gt;here&lt;/a&gt;&lt;br /&gt;After the installation you are ready to convert the sk file to svg&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;skconvert my_file.sk my_file.svg&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The resulted svg file can be now easily imported by &lt;a href="http://www.xaraxtreme.org/"&gt; Xara &lt;/a&gt; or &lt;a href="http://www.inkscape.org/"&gt;Inkscape &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here is a nice poster created by this technique.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://158.197.33.240/%7Ekuscsik/poster.png"&gt;"Structurally dynamic spin market networks" &lt;/a&gt; [5MB]&lt;br /&gt;&lt;br /&gt;The resulted graphics is a combination of latex, eps and svg graphics.&lt;br /&gt;&lt;br /&gt;Pstoedit may have problems with some of the EPS files. The solution is to convert those files to a Level 1 EPS (thanks  to cengiz for this useful comment):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;eps2eps -dLanguageLevel=1 input.eps output.eps&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Another solution of EPS editing is to convert the EPS to a PDF file using &lt;span style="font-style: italic;"&gt;epstopdf&lt;/span&gt;. The big news that PDF can be imported as a vector graphics by &lt;a href="http://www.google.ch/url?sa=t&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fwww.inkscape.org%2F&amp;amp;ei=zJzrR8nYLYG8ngOIptGEAQ&amp;amp;usg=AFQjCNE70ocRGcdCMwJsOZQ7zgFNw5HGTg&amp;amp;sig2=MTY6kGCxyDljCGo-leenBA"&gt;Inkscape&lt;/a&gt; 0.46 which is already included in &lt;a href="http://www.ubuntu.com/testing/hardy/beta"&gt;Ubuntu Hardy Heron Beta release&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;FOR ONLINE  EPS2SVG CONVERSION VISIT&lt;/span&gt;: &lt;a href="http://eps2svg.info/"&gt;eps2svg.info&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-6890948750648676240?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/6890948750648676240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=6890948750648676240' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/6890948750648676240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/6890948750648676240'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/06/how-to-edit-and-use-latex-eps-and-ps.html' title='Edit eps on linux'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7350985320515164023.post-5327159874589236801</id><published>2007-06-18T22:59:00.000-07:00</published><updated>2008-01-28T23:33:04.905-08:00</updated><title type='text'>How to install Intel iwlwifi 4965AGN wireless drivers on Ubuntu</title><content type='html'>&lt;span style="color: rgb(255, 0, 0);"&gt;This guide is not actual anymore. Just update to the latest Ubuntu Gutsy and boot with the &lt;span style="color: rgb(204, 102, 0);"&gt;generic kernel&lt;/span&gt;. The wireless module is not automatically loaded, so you must do it manually&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;sudo modprobe  iwl4965&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;The old guide:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(192, 192, 192);"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;Download some source code&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;code style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;wget http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-0.0.32.tgz&lt;br /&gt;tar -xzf iwlwifi-0.0.32.tgz&lt;br /&gt;&lt;br /&gt;wget http://intellinuxwireless.org/mac80211/downloads/mac80211-8.0.1.tgz&lt;br /&gt;tar -xzf mac80211-8.0.1.tgz&lt;br /&gt;&lt;br /&gt;wget http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-4965-ucode-4.44.15.tgz&lt;br /&gt;tar -xzf iwlwifi-4965-ucode-4.44.15.tgz&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;Download the kernel source and essential  compilation tools &lt;/span&gt;&lt;br /&gt;&lt;code style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;sudo apt-get install build-essential linux-headers-`uname -r`&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;Link the source in to the kernels binary directory. Without this the compilation will fail.&lt;/span&gt;&lt;br /&gt;&lt;code style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;ln -s  /usr/src/linux-headers-`uname -r` /lib/modules/`uname -r`/source&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;Compile the iwlwifi sources&lt;/span&gt;&lt;br /&gt;&lt;code style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;cd mac80211-8.0.1&lt;br /&gt;make patch_kernel&lt;br /&gt;cd ../iwlwifi-0.0.32&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;Copy the firmware in to the correct directory&lt;/span&gt;&lt;br /&gt;&lt;code style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;cd ../iwlwifi-4965-ucode-4.44.15&lt;br /&gt;cp iwlwifi-4965.ucode /lib/firmware/`uname -r`&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;and to load the wireless driver into the kernel:&lt;/span&gt;&lt;br /&gt;&lt;code style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;modprobe iwl4965&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;If you experience problem with the system stability try to turn the hardware switch OFF before booting or rebooting your PC.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-5327159874589236801?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/5327159874589236801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=5327159874589236801' title='35 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/5327159874589236801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/5327159874589236801'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/06/how-to-install-intel-4965-wireless.html' title='How to install Intel iwlwifi 4965AGN wireless drivers on Ubuntu'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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>35</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7350985320515164023.post-8300089948998693845</id><published>2007-05-30T12:41:00.000-07:00</published><updated>2007-05-30T12:50:02.368-07:00</updated><title type='text'>c2gnuplot</title><content type='html'>I wrote a small header file for passing data from C++ to gnuplot. It works only under unix based distros. You can download from &lt;a href="http://c2gnuplot.tuxfamily.org/"&gt;this&lt;/a&gt; site. Moreover, &lt;a href="http://158.197.33.240/%7Ekuscsik/video.mpg"&gt;here is a nice mpeg output&lt;/a&gt; for a cellular automata growth model.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-8300089948998693845?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/8300089948998693845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=8300089948998693845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/8300089948998693845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/8300089948998693845'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/05/c2gnuplot.html' title='c2gnuplot'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-6506829364706506977</id><published>2007-05-19T09:37:00.000-07:00</published><updated>2007-05-19T10:44:17.755-07:00</updated><title type='text'>Install Intel ICC on Ubuntu Feisty</title><content type='html'>&lt;ul&gt;&lt;li&gt;Download the Intel ICC compiler from the &lt;a href="http://www.intel.com/cd/software/products/asmo-na/eng/compilers/277618.htm"&gt;Intel website&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Extract the downloaded archive and run the install script&lt;br /&gt;&lt;br /&gt;&lt;code&gt; sudo tar -xzf l_cc_c_9.1.047.tar.gz&lt;br /&gt;sudo cd l_cc_c_9.1.047&lt;br /&gt;sudo ./install.sh&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The Install script will you ask for the password mailed by Intel and for your e-mail address. Finally, the install script will express its gratitude for choosing ICC. Unfortunately, the official script works only on rpm based distros, so  we need some additional work.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;We need to install &lt;span style="font-style: italic;"&gt;alien&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;sudo apt-get install alien&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;convert  and install the  Intel rpm package to deb&lt;br /&gt;&lt;br /&gt;&lt;code&gt;sudo cd data&lt;br /&gt;sudo alien intel-icc_ide91047-9.1.047-1.i386.rpm&lt;br /&gt;sudo dpkg -i intel-icc91047_9.1.047-2_i386.deb &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For different CPU architecture as i386 you need to choose another rpm file.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now, the compiler is installed and we are nearly there ;). Edit and replace the &amp;lt;INSTALLDIR&amp;gt; string  in /opt/intel/cc/9.1.047/bin/icc by  "/opt/intel/cc/9.1.047/bin"&lt;br /&gt;&lt;br /&gt;Replace the last lines:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if [ $# != 0 ]&lt;br /&gt;then&lt;br /&gt;exec -a "/opt/intel/cc/9.1.047//bin/icc" /opt/intel/cc/9.1.047//bin/iccbin "$@";&lt;br /&gt;else&lt;br /&gt;exec -a "/opt/intel/cc/9.1.047//bin/icc" /opt/intel/cc/9.1.047//bin/iccbin;&lt;br /&gt;fi&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;by&lt;br /&gt;&lt;br /&gt;&lt;code&gt; exec -a "/opt/intel/cc/9.1.047/bin/icc" /opt/intel/cc/9.1.047/bin/iccbin "$@";&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;save the changed file.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Finally we need to register the icc libraries&lt;br /&gt;&lt;code&gt;&lt;br /&gt;gksudo gedit /etc/ld.so.conf.d/icc.conf&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and paste a single line&lt;br /&gt;&lt;code&gt;/opt/intel/cc/9.1.047/lib/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Save the icc.conf file and run&lt;br /&gt;&lt;code&gt; sudo ldconfig &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Set the global path to the icc binaries&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo -i&lt;br /&gt;echo PATH=\$PATH:/opt/intel/cc/9.1.047/bin &gt;&gt; /etc/profile&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Enjoy!&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-6506829364706506977?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/6506829364706506977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/6506829364706506977'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/05/install-intel-icc-on-ubuntu-feisty.html' title='Install Intel ICC on Ubuntu Feisty'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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></entry><entry><id>tag:blogger.com,1999:blog-7350985320515164023.post-4355594702589654071</id><published>2007-01-01T13:45:00.000-08:00</published><updated>2007-10-17T04:50:31.287-07:00</updated><title type='text'>How to create a dynamic SSH tunnel and use your distant computer to access the Internet?</title><content type='html'>&lt;div class="sub-elem"&gt;To create a tunnel with dynamic port allocation open your terminal and write       &lt;p class="code"&gt;    &lt;code&gt;    ssh -N -f -D 1234 login@ServerIP    &lt;/code&gt;    &lt;/p&gt;   &lt;p&gt;   and set the socks proxy in your firefox browser   to &lt;code&gt; "localhost:1234"&lt;/code&gt;.&lt;br /&gt;In Firefox open the address  &lt;span style="font-style: italic;"&gt;about:config.&lt;/span&gt;&lt;br /&gt;In the filter box enter "DNS" and set the network.proxy.socks_remote_dns option to "true". This will allow to resolve the DNS address trough the ssh proxy.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For the unlimited freedom in tunneling install the    &lt;a href="http://foxyproxy.mozdev.org/"&gt; FoxyProxy &lt;/a&gt;  firefox plugin for fast proxy switching.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-4355594702589654071?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/4355594702589654071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=4355594702589654071' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4355594702589654071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4355594702589654071'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2007/01/how-to-create-dynamic-ssh-tunnel-and.html' title='How to create a dynamic SSH tunnel and use your distant computer to access the Internet?'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-4842444941743168472</id><published>2006-12-27T01:03:00.000-08:00</published><updated>2006-12-27T01:16:27.866-08:00</updated><title type='text'>Auto-sync and backup directories to ipod at connection to Ubuntu Edgy</title><content type='html'>This is a simple script to auto backup important directories to my ipod and sync the Evolution calendar.&lt;br /&gt;The scripts depends on the gtkpod package&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install gtkpod&lt;/li&gt;&lt;li&gt;Copy this &lt;a href="http://158.197.33.91/%7Ekuscsik/scripts/ipodsync.sh"&gt;script&lt;/a&gt; to your &lt;span style="font-weight: bold;"&gt;~/bin/&lt;/span&gt; directory and change DIRS_FOR_BACKUP variable.&lt;/li&gt;&lt;li style="text-align: left;"&gt;&lt;code&gt;chmod u+x ~/bin/ipodsync.sh&lt;/code&gt;&lt;/li&gt;&lt;li&gt;In System &gt; Preferences &gt; Removable Drives and Media &gt; Multimedia &gt; Portable Music Players&lt;br /&gt;write&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;code&gt; ~/bin/ipodsync.sh %m&lt;/code&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Connect the ipod&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-4842444941743168472?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/4842444941743168472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=4842444941743168472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4842444941743168472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/4842444941743168472'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2006/12/auto-sync-and-backup-directories-to.html' title='Auto-sync and backup directories to ipod at connection to Ubuntu Edgy'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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-7350985320515164023.post-9015987372647248605</id><published>2006-12-25T12:45:00.000-08:00</published><updated>2007-11-20T06:37:50.708-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LaTeX'/><title type='text'>How to create a new environment in LaTeX</title><content type='html'>This is an example how to create a new environment in latex.&lt;br /&gt;The \newenvironment  command have two important parts: the begin code and the and code. The begin code is executed when the environment is initialized (in our case \begin{example}) and the end code executed at the \end{example} command.&lt;code&gt;&lt;br /&gt;&lt;br /&gt;\documentclass[a4paper,12pt,oneside]{article}&lt;br /&gt;\newcounter{Examplecount}&lt;br /&gt;\setcounter{Examplecount}{0}&lt;br /&gt;\newenvironment{example}&lt;br /&gt;{% This is the begin code&lt;br /&gt;\stepcounter{Examplecount}  {\bf\small Example} \arabic{Examplecount}\scriptsize \begin{it}&lt;br /&gt;}&lt;br /&gt;{% This is the end code&lt;br /&gt;\end{it} }&lt;br /&gt;&lt;br /&gt;\begin{document}&lt;br /&gt;&lt;br /&gt;\begin{example}&lt;br /&gt;This is an example&lt;br /&gt;\end{example}&lt;br /&gt;&lt;br /&gt;\end{document}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7350985320515164023-9015987372647248605?l=kuscsik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kuscsik.blogspot.com/feeds/9015987372647248605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7350985320515164023&amp;postID=9015987372647248605' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/9015987372647248605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7350985320515164023/posts/default/9015987372647248605'/><link rel='alternate' type='text/html' href='http://kuscsik.blogspot.com/2006/12/how-to-create-new-environment-in-latex.html' title='How to create a new environment in LaTeX'/><author><name>Zoltan Kuscsik</name><uri>http://www.blogger.com/profile/12319289716883806840</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></feed>
