<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Stupid Minds</title>
	<atom:link href="http://www.stupizii.ro/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stupizii.ro</link>
	<description>because normal things don&#039;t happen very often</description>
	<lastBuildDate>Mon, 12 Dec 2011 12:34:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Configuring network in Linux</title>
		<link>http://www.stupizii.ro/geek/2011-02/configuring-network-in-linux/</link>
		<comments>http://www.stupizii.ro/geek/2011-02/configuring-network-in-linux/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 17:19:42 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=185</guid>
		<description><![CDATA[Setting your hostname, IP address, netmask, gateway, DNS server via files It is sometimes helpful to know what is going on behind the scenes or if you want to modify the network configuration via changing files. For example, assume you want to modify the network configuration by modifying files with the following: hostname: server domainname: [...]]]></description>
			<content:encoded><![CDATA[<h2>Setting your hostname, IP address, netmask, gateway, DNS server via files</h2>
<p>It is sometimes helpful to know what is going on behind the scenes or if you want to modify the network configuration via changing files.</p>
<p>For example, assume you want to modify the network configuration by modifying files with the following:</p>
<blockquote><p>hostname: <strong>server</strong><br />
domainname: <strong>demo.eu</strong><br />
Static IP address: <strong>10.0.1.23</strong><br />
Netmask: <strong>255.255.255.0</strong><br />
Gateway: <strong>10.0.1.254</strong><br />
Primary DNS server: <strong>10.0.1.1</strong><br />
Secondary DNS server: <strong>10.0.1.253</strong></p></blockquote>
<ul></ul>
<p>Networking is set up in these files:</p>
<blockquote><p><strong>/etc/sysconfig/network </strong><br />
<strong>/etc/sysconfig/network-scripts/ifcfg-eth0 </strong><br />
<strong>/etc/resolv.conf </strong></p></blockquote>
<p>First, add your host to the <strong>/etc/hosts</strong> file:</p>
<blockquote>
<pre># The next line "127.0.0.1" is needed. Do not remove it.
127.0.0.1       localhost.localdomain localhost
<strong>10.0.1.23       server</strong>
</pre>
</blockquote>
<p>Your <strong>/etc/sysconfig/network</strong> file would be:</p>
<blockquote>
<pre>NETWORKING=yes
HOSTNAME=server
GATEWAY=10.0.1.23</pre>
</blockquote>
<p>Your <strong>/etc/sysconfig/network-scripts/ifcfg-eth0</strong>:</p>
<blockquote>
<pre>DEVICE=eth0
BOOTPROTO=static
BROADCAST=10.0.1.255
IPADDR=10.0.1.23
NETMASK=255.255.255.0
NETWORK=10.0.1.0
ONBOOT=yes</pre>
</blockquote>
<p>DNS servers are set in: <strong>/etc/resolv.conf</strong>. An example:</p>
<blockquote>
<pre>domain <em>demo.eu</em>
search <em>demo.eu</em>
nameserver <em>10.0.1.1</em>
nameserver <em>10.0.1.253</em></pre>
</blockquote>
<h3>Using ifconfig and route</h3>
<p>You normally would not need to use <strong>ifconfig</strong> or <strong>route</strong> unless you want to change your IP address, disable the Ethernet interface, etc. change your gateway, etc. This is sometimes helpful, so the information is here. To set an ip address:</p>
<blockquote>
<pre>ifconfig eth0 10.0.1.23 netmask 255.255.255.0 up
</pre>
</blockquote>
<p>To set a default route or gateway (&#8220;gw&#8221; = &#8220;gateway&#8221;):</p>
<blockquote>
<pre>route add default gw 10.0.1.254 eth0
</pre>
</blockquote>
<hr /><a name="trouble"></a></p>
<h3>Troubleshooting</h3>
<p>If your system is saying there is no Ethernet card found, make sure the card is in the kernel.</p>
<p>Type:</p>
<blockquote>
<pre><strong>modprobe eth0
dmesg | less
    </strong><em>Look for any info about eth0 to help track down the problem.
    </em><strong>
cat /etc/modules.conf</strong>
    <em>Look for a line line this:</em>
    <strong>alias eth0 driver-name-like-wdi</strong> or <strong>3c503</strong>
</pre>
</blockquote>
<p><em>Source: <a href="http://www.linuxmigration.com/quickref/install/network.html" target="_blank">http://www.linuxmigration.com/quickref/install/network.html</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/geek/2011-02/configuring-network-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create filesystem backup with dd</title>
		<link>http://www.stupizii.ro/geek/2011-01/create-filesystem-backup-with-dd/</link>
		<comments>http://www.stupizii.ro/geek/2011-01/create-filesystem-backup-with-dd/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 20:47:00 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=111</guid>
		<description><![CDATA[The dd utility can be successfully used to create a backup of a filesystem (in lack of more specialised backup utilites). dd if=/dev/sdaX &#124; gzip &#62; /backup/sdaX.gz where sdaX is the partition you want to backup, and the /backup folder is located on a different disk/partition than the one you&#8217;re backing up.. Only note that [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>dd</strong> utility can be successfully used to create a backup of a filesystem (in lack of more specialised backup utilites).</p>
<blockquote><p><strong>dd if=/dev/sdaX | gzip &gt; /backup/sdaX.gz</strong></p></blockquote>
<p>where <strong>sdaX </strong>is the partition you want to backup, and the /backup folder is located on a different disk/partition than the one you&#8217;re backing up..</p>
<p>Only note that dd does not care whether a sector is used or not, it will copy it to the image file nonetheless. <a href="http://www.stupizii.ro/geek/2011-01/zero-out-free-disk-space/" target="_self">Zeroing out all free space</a> before backup up is a good way to keep wasted backup space to a minimum (since the backup will be compressed)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/geek/2011-01/create-filesystem-backup-with-dd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zero out free disk space</title>
		<link>http://www.stupizii.ro/geek/2011-01/zero-out-free-disk-space/</link>
		<comments>http://www.stupizii.ro/geek/2011-01/zero-out-free-disk-space/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 20:40:22 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=109</guid>
		<description><![CDATA[This function comes in handy when you want to make a compressed sector-by-sector backup of the filesystem and you don&#8217;t want to include/waste space with the unused sector (which still have information on them) Running nice cat /dev/zero &#62; zero.fill;sync;sleep 1;sync;rm -f zero.fill before the actual backup will make sure all unused sectors contain zero [...]]]></description>
			<content:encoded><![CDATA[<p>This function comes in handy when you want to make a compressed sector-by-sector backup of the filesystem and you don&#8217;t want to include/waste space with the unused sector (which still have information on them)</p>
<p>Running</p>
<blockquote><p><strong>nice cat /dev/zero &gt; zero.fill;sync;sleep 1;sync;rm -f zero.fill</strong></p></blockquote>
<p>before the actual backup will make sure all unused sectors contain zero (so they will not waste any space in the archives).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/geek/2011-01/zero-out-free-disk-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Count occurences of character X in all files in current directory</title>
		<link>http://www.stupizii.ro/geek/2011-01/count-occurences-of-character-x-in-all-files-in-current-directory/</link>
		<comments>http://www.stupizii.ro/geek/2011-01/count-occurences-of-character-x-in-all-files-in-current-directory/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 20:36:33 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=106</guid>
		<description><![CDATA[If you ever need to count the occurences of a character in all (or some) files, this next series of commands would come in handy: for f in `ls`; do cat $f; done &#124; awk &#8216;{ for ( i=1; i&#60;=length; i++ ) arr[substr($0, i, 1)]++ }END{ for ( i in arr ) { print i, [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to count the occurences of a character in all (or some) files, this next series of commands would come in handy:</p>
<blockquote><p><strong>for f in `ls`; do cat $f; done | awk &#8216;{ for ( i=1; i&lt;=length; i++ ) arr[substr($0, i, 1)]++ }END{ for ( i in arr ) { print i, arr[i] } }&#8217; | grep X</strong></p></blockquote>
<p>Replace <strong>X</strong> with the character in question. The command is all in one line. &#8220;<strong>ls</strong>&#8221; can be replaced with a more specific list (eg: &#8220;<strong>ls *.c</strong>&#8220;)<strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/geek/2011-01/count-occurences-of-character-x-in-all-files-in-current-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merry New Year!</title>
		<link>http://www.stupizii.ro/news/2011-01/merry-new-year/</link>
		<comments>http://www.stupizii.ro/news/2011-01/merry-new-year/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 16:43:42 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=86</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<h2><strong> </strong></h2>
<p style="text-align: center;"><a href="http://www.stupizii.ro/wp-content/uploads/2011/01/fireworks3.jpg"><img class="aligncenter size-full wp-image-94" title="fireworks3" src="http://www.stupizii.ro/wp-content/uploads/2011/01/fireworks3.jpg" alt="" width="512" height="375" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/news/2011-01/merry-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SNM (System Network Monitor) UPS Module</title>
		<link>http://www.stupizii.ro/geek/2010-12/snm-system-network-monitor-ups-module/</link>
		<comments>http://www.stupizii.ro/geek/2010-12/snm-system-network-monitor-ups-module/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 18:41:25 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SNM Modules]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=69</guid>
		<description><![CDATA[Two days ago I&#8217;ve just bought myself a new UPS, which comes with a nice little handy app that displays useful technical data. The UPS is an Alberex Vesta Pro 1500, and the monitoring software is named Emily2 (alternative download v2.01, v2.031). &#160; The good thing about it is that it stores all data in [...]]]></description>
			<content:encoded><![CDATA[<p>Two days ago I&#8217;ve just bought myself a new UPS, which comes with a nice little handy app that displays useful technical data. The UPS is an <a href="http://www.ablerex.com.tw/HTM/product-vesta.htm" target="_blank">Alberex Vesta Pro 1500</a>, and the monitoring software is named <a href="http://www.ablerex.com.tw/html_en/support_SL.php" target="_blank">Emily2</a> (alternative download <a href="http://www.stupizii.ro/storage/software/Emily201.rar">v2.01</a>, <a href="http://www.stupizii.ro/storage/software/Emily2031.rar">v2.031</a>).</p>
<p>&nbsp;</p>
<p><a href="http://www.stupizii.ro/wp-content/uploads/2010/12/screenshot110920-200744.jpg"><img class="size-full wp-image-201 alignnone" title="Emily v2.0.3.1" src="http://www.stupizii.ro/wp-content/uploads/2010/12/screenshot110920-200744.jpg" alt="" width="444" height="391" /></a></p>
<p>The good thing about it is that it stores all data in its log, a MS Access database file named Data.mdb.  So I thought it&#8217;s a nice ideea to include all this data as graphs in my already-running <a href="http://cnt.stupizii.com/snm/" target="_blank">System Network Monitor page</a>.</p>
<p>So I write this nice little module that reads data from the log and includes it in SNM.</p>
<p>The only pre-requisite is that you&#8217;ll have to install mdbtools on your Linux (for the module to be able to export the necessary table out of the database to a text file)</p>
<p>To use, include it in your graphs.xml as a</p>
<blockquote>
<pre><strong>cntUps::sensor( 'sensor_id', 'mdb log file' [,'table name'] );</strong></pre>
</blockquote>
<p>where sensor_id can be one of</p>
<blockquote>
<pre><strong>involt, outvolt, load, freq, bat, temp</strong></pre>
</blockquote>
<p>and &#8220;mdb log file&#8221; is the full path of the Data.mdb file (this file can also be accessed through network shares)</p>
<p>&#8216;table name&#8217; is optional, and is needed only if you renamed the default Machine0 field in Emily2&#8242;s configuration to something else.</p>
<p>The perl file can be viewed/downloaded <a href="http://www.stupizii.ro/storage/snm-modules/cntUps.pm" target="_blank"><strong>here</strong></a>.</p>
<p>Now my SNM displays two more nice graphs <img src='http://www.stupizii.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://cnt.stupizii.com/snm/snm.cgi?target=2"><img class="alignnone" title="UPS Status 1" src="http://cnt.stupizii.com/snm/graphs/page2graph13_day.png" alt="" width="494" height="200" /></a></p>
<pre><a href="http://cnt.stupizii.com/snm/snm.cgi?target=2"><img class="alignnone" title="Ups status 2" src="http://cnt.stupizii.com/snm/graphs/page2graph14_day.png" alt="" width="494" height="222" /></a></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/geek/2010-12/snm-system-network-monitor-ups-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change default inactive selection color &#8211; Windows</title>
		<link>http://www.stupizii.ro/geek/2010-12/change-default-inactive-selection-color-windows/</link>
		<comments>http://www.stupizii.ro/geek/2010-12/change-default-inactive-selection-color-windows/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 23:57:28 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=16</guid>
		<description><![CDATA[You know how when you select an item in explorer, the color of the text for the highlighted item is white on dark-blue. When you have an item selected in explorer and you switch to another program (but can see the explorer selected text still due to window overlap arrangement), you see that the selected item [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">You know how when you select an item in explorer, the color of the text for the highlighted item is white on dark-blue.</p>
<p style="text-align: justify;">When  you have an item selected in explorer and you switch to another program  (but can see the explorer selected text still due to window overlap  arrangement), you see that the selected item color changes to black on  very-light-grey. This is very close to black on white (like all of the  unselected items).</p>
<p style="text-align: justify;">Any bad light conditions at all make this  selection really difficult to see but I can&#8217;t find a Display properties  color change selection for this.</p>
<p style="text-align: justify;">This color is read from the<strong> HKEY_CURRENT_USER\Control Panel\Colors\ButtonFace</strong> registry key (as a Red Green Blue set), and changing it requires a restart for the setting to take effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/geek/2010-12/change-default-inactive-selection-color-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Stupid Minds website</title>
		<link>http://www.stupizii.ro/news/2010-12/new-website/</link>
		<comments>http://www.stupizii.ro/news/2010-12/new-website/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 20:38:16 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=6</guid>
		<description><![CDATA[I have decided to migrate the website to WordPress, leaving behind the good old Joomla, as it was far too much for what I actually needed (and I got kind of behind on keeping it updated). In due time all past content will be migrated here, but in the meanwhile, the (trusty) old Joomla version [...]]]></description>
			<content:encoded><![CDATA[<p>I have decided to migrate the website to WordPress, leaving behind the good old Joomla, as it was far too much for what I actually needed (and I got kind of behind on keeping it updated).</p>
<p><del>In due time all past content will be migrated here, but in the meanwhile, the (trusty) old Joomla version can still be accessed at <a href="http://old.stupizii.ro" target="_blank">http://old.stupizii.ro/</a>.</del> About 75% of the content has been migrated here, so the old website has been disabled.</p>
<p>All other items are still available at their permanent locations:</p>
<ul>
<li>File Zone &#8211; <a href="http://up.stupizii.ro" target="_blank">http://up.stupizii.ro</a></li>
<li>Gallery &#8211; <a href="http://galerie.stupizii.ro" target="_blank">http://galerie.stupizii.ro</a></li>
<li>IT Stuff &#8211; <a href="http://ti.stupizii.ro" target="_blank">http://ti.stupizii.ro</a></li>
</ul>
<p>The downloads section is still incomplete, but hopefully I&#8217;ll get the time to rebuild it soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/news/2010-12/new-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merry Christmas!</title>
		<link>http://www.stupizii.ro/news/2010-12/merry-christmas/</link>
		<comments>http://www.stupizii.ro/news/2010-12/merry-christmas/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 17:20:25 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=100</guid>
		<description><![CDATA[Merry Christmas everyone]]></description>
			<content:encoded><![CDATA[<p>Merry Christmas everyone <img src='http://www.stupizii.ro/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/YTT5Cq43Uv0" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/YTT5Cq43Uv0"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/news/2010-12/merry-christmas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to expand multiple files from the Windows CD</title>
		<link>http://www.stupizii.ro/geek/2009-11/how-to-expand-multiple-files-from-the-windows-cd/</link>
		<comments>http://www.stupizii.ro/geek/2009-11/how-to-expand-multiple-files-from-the-windows-cd/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 00:38:57 +0000</pubDate>
		<dc:creator>lucian</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.stupizii.ro/?p=22</guid>
		<description><![CDATA[If you&#8217;ve ever needed to expand and restore multiple files from the Windows Xp CD (and don&#8217;t want to run expand for each file by hand), the following batch file might come in handy: @echo off setlocal set List=X:\path\*.ex_ for /f &#8220;delims=&#8221; %%a in (&#8216;dir /b &#8220;%List%&#8221;&#8216;) do expand %%a %%~na.exe You&#8217;ll need to change [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">If you&#8217;ve ever needed to expand and restore multiple files from the  Windows Xp CD (and don&#8217;t want to run expand for each file by hand), the  following batch file might come in handy:</p>
<blockquote style="text-align: justify;"><p><strong>@echo off<br />
setlocal<br />
set List=X:\path\*.ex_<br />
for /f &#8220;delims=&#8221; %%a in (&#8216;dir /b &#8220;%List%&#8221;&#8216;) do expand %%a %%~na.exe</strong></p></blockquote>
<p style="text-align: justify;">You&#8217;ll  need to change<strong> &#8220;X:\path\&#8221;</strong> into the right path (where the source files  are located. You should copy the files in question from the Xp CD to a  folder on the hard disk).</p>
<p style="text-align: justify;">Then replace<strong> *.ex_ </strong>(in that same line)  with the right file type (for example <strong>*.dl_</strong> &#8211; you can only expand one  filetype at a time, since &#8220;expand&#8221; expects you to manually specify the  output filename).</p>
<p style="text-align: justify;">Finally, replace the<strong> %%~na.exe</strong> with the right output extension, for example <strong>%%~na.dll</strong>.</p>
<p style="text-align: justify;">Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stupizii.ro/geek/2009-11/how-to-expand-multiple-files-from-the-windows-cd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

