<?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>Marco Rodrigues - Personal Page</title>
	<atom:link href="http://www.marblehole.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marblehole.com</link>
	<description>TI, Coding, Ideas, Facts and News</description>
	<lastBuildDate>Thu, 17 Feb 2011 10:45:03 +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>Auto convert WordPress post content URLs to Hyperlinks and open in a new window</title>
		<link>http://www.marblehole.com/2011/01/auto-convert-wordpress-post-content-url-to-hyperlink-and-open-in-a-new-window/</link>
		<comments>http://www.marblehole.com/2011/01/auto-convert-wordpress-post-content-url-to-hyperlink-and-open-in-a-new-window/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 11:27:25 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marblehole.com/?p=368</guid>
		<description><![CDATA[I needed to have all of my post content plain text URLs converted to Hyperlinks, but it needs to open in a new window when clicked. The make_clickable() function in wordpress doesn&#8217;t allow to specify any option for the target. function make_clickable2($content) { $content = preg_replace(&#34;/http:\/\/[a-zA-Z.&#38;\-\/]+[a-zA-Z&#38;\-\/]+/&#34;, &#34;&#60;a href=\&#34;\${0}\&#34; target=\&#34;_blank\&#34;&#62;\${0}&#60;/a&#62;&#34;, $content); return $content; } add_filter(&#039;the_content&#039;, &#039;make_clickable2&#039;);]]></description>
			<content:encoded><![CDATA[<p>I needed to have all of my post content plain text URLs converted to Hyperlinks, but it needs to open in a new window when clicked. The make_clickable() function in wordpress doesn&#8217;t allow to specify any option for the target.</p>
<pre class="brush: php">
function make_clickable2($content) {
    $content = preg_replace(&quot;/http:\/\/[a-zA-Z.&amp;\-\/]+[a-zA-Z&amp;\-\/]+/&quot;, &quot;&lt;a href=\&quot;\${0}\&quot; target=\&quot;_blank\&quot;&gt;\${0}&lt;/a&gt;&quot;, $content);
    return $content;
}

add_filter(&#039;the_content&#039;, &#039;make_clickable2&#039;);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2011/01/auto-convert-wordpress-post-content-url-to-hyperlink-and-open-in-a-new-window/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add title and description to youtubeplaylist jquery plugin</title>
		<link>http://www.marblehole.com/2010/09/add-title-and-description-to-youtubeplaylist/</link>
		<comments>http://www.marblehole.com/2010/09/add-title-and-description-to-youtubeplaylist/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 21:56:09 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[playlist]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.marblehole.com/?p=307</guid>
		<description><![CDATA[I needed to use Dan&#8217;s youtubeplaylist jquery plugin for a work, but the client requested title and description fields below the player to users know more about what they&#8217;ll watch. I&#8217;ve sent this patch to Dan Drayne, so he can include it in the next version.  I&#8217;m attaching below the code I&#8217;ve done to add [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to use Dan&#8217;s <a href="http://www.geckonewmedia.com/blog/2009/8/14/jquery-youtube-playlist-plugin---youtubeplaylist" target="_blank">youtubeplaylist</a> jquery plugin for a work, but the client requested title and description fields below the player to users know more about what they&#8217;ll watch.</p>
<p>I&#8217;ve sent this patch to Dan Drayne, so he can include it in the next version.  I&#8217;m attaching below the code I&#8217;ve done to add this feature.</p>
<pre class="brush: xml">
&lt;div id=&quot;yt_holder&quot;&gt;
&lt;ul class=&quot;ytmovie&quot;&gt;
&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=QBBWKvY-VDc&quot; ydesc=&quot;Description&quot;&gt;Video 1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre>
<p>This is the HTML example. There is a new field named ydesc, so we can add some cool description. Now the CSS style for it.</p>
<pre class="brush: css">#ytvideo #ytitle {
margin-top: 10px;
font-size: 14px;
color: #66CCFF;
font-weight: bold;
width: 420px;
}
#ytvideo #ydesc {
margin-top: 10px;
width: 420px;
}</pre>
<p>And finally the youtubeplaylist patch that you can download <a href="http://www.marblehole.com/stuff/youtubeplaylist.patch">here</a>. Enjoy =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2010/09/add-title-and-description-to-youtubeplaylist/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tondela Lan Party 2007</title>
		<link>http://www.marblehole.com/2010/03/tondela-lan-party-2007/</link>
		<comments>http://www.marblehole.com/2010/03/tondela-lan-party-2007/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 22:51:52 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[jornal]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[lan]]></category>
		<category><![CDATA[lanparty]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[party]]></category>
		<category><![CDATA[tondela]]></category>

		<guid isPermaLink="false">http://marco.tondela.org/?p=300</guid>
		<description><![CDATA[Este ano a Tondela Lan Party, teve um incremento de participantes, e mesmo que não tivessem ido por causa dos computadores e das novas tecnologias, alguns foram para jogar matrecos, ping pong ou até fazer escalada, outra forma de diversão, ou até talvez para tirarem aquele medo e verem como aquilo é na realidade, para [...]]]></description>
			<content:encoded><![CDATA[<p>Este ano a Tondela Lan Party, teve um incremento de participantes, e mesmo que não tivessem ido por causa dos computadores e das novas tecnologias, alguns foram para jogar matrecos, ping pong ou até fazer escalada, outra forma de diversão, ou até talvez para tirarem aquele medo e verem como aquilo é na realidade, para participarem numa próxima edição. Começou com uns problemas na distribuição dos IP&#8217;s automáticos (DHCP) para cada máquina e apesar dos 34 mbit/s de ligação à Internet fornecida pela PT, a velocidade não era nada do esperado, muito pelo contrário, desiludiu muito, mas como os participantes estavam lá sobretudo pelo convívio, e os jogos em rede, não deram muita importância à velocidade da Internet, estavam mais preocupados com o funcionamento da rede.</p>
<p>Os torneios basearam-se nos jogos Counter Strike Source, F.E.A.R, UT 2004, PES 6 e o WARCRAFT 3, mas cada um poderia jogar o que quisesse e com quem quisesse. Foi bom o espírito de entre-ajuda de todos para a resolução dos problemas que vinham aparecendo, desde não conseguirem ligar à Internet, limpar os vírus do computador e aprender a trabalhar com Linux Ubuntu (versão Feisty Fawn).</p>
<p>Nesta edição cada pessoa poderia ser um DJ, pois houve um computador com ecrã táctil, fornecido pela Ficha d&#8217;Ouro para cada um escolher uma música e todos poderiam ouvi-la. Na madrugada de sexta-feira para sábado, foi passado o filme Norbit (Comédia / Romance) com Eddy Murphy.</p>
<p>No Sábado de manhã tivemos uma agradável surpresa, o Sr. Presidente da Câmara Municipal de Tondela, o Dr. Carlos Marta foi ao local ver e conversar com alguns participantes, saber as suas opiniões e mostrar que apoia este tipo de iniciativas, o que é de louvar. Ele foi uma das pessoas que contribuiu para que este evento se pudesse realizar, já que era completamente gratuita a entrada e os patrocinadores não foram muitos. Também nesta manhã foram distribuídos 50 cd&#8217;s da distribuição de Linux, Ubuntu – http://www.Ubuntu-PT.org, gentilmente fornecidos pelo Marco Rodrigues, o que quer dizer, que o evento apoiou o Software Livre, como já vem acontecendo com mais frequência em Portugal.</p>
<p>O Domingo foi um dia mais calmo, mas onde ouve também ganhadores.. não dos torneiros, mas das rifas, em que os prémios eram os seguintes: Uma Impressora multi-funções, um Leitor de Mp3, uma Pen-Drive de 1 Gb e o quarto e último prémio CD&#8217;s e DVD&#8217;s.</p>
<p>É sempre bom reviver o passado =)</p>
<p><strong>Artigo publicado na “Folha de Tondela” em 2007.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2010/03/tondela-lan-party-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cães &#8211; Animais incompreendidos</title>
		<link>http://www.marblehole.com/2010/03/caes-animais-incompreendidos/</link>
		<comments>http://www.marblehole.com/2010/03/caes-animais-incompreendidos/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 22:53:11 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[jornal]]></category>
		<category><![CDATA[portugal]]></category>
		<category><![CDATA[portuguese]]></category>
		<category><![CDATA[abandono]]></category>
		<category><![CDATA[animais]]></category>
		<category><![CDATA[animal]]></category>
		<category><![CDATA[caes]]></category>
		<category><![CDATA[canino]]></category>
		<category><![CDATA[cao]]></category>
		<category><![CDATA[praia]]></category>
		<category><![CDATA[verao]]></category>

		<guid isPermaLink="false">http://marco.tondela.org/?p=289</guid>
		<description><![CDATA[Todos nós, de uma maneira geral, gostamos de ter o nosso bichinho de estimação, normalmente um cão, porque é o animal que nos desperta mais interesse. Tem a alcunha de melhor amigo do Homem, mas muitas vezes caímos no erro de adquirirmos um para agradar um filho ou satisfazer uma fantasia nossa ou até dar [...]]]></description>
			<content:encoded><![CDATA[<p>Todos nós, de uma maneira geral, gostamos de ter o nosso bichinho de estimação, normalmente um cão, porque é o animal que nos desperta mais interesse. Tem a alcunha de melhor amigo do Homem, mas muitas vezes caímos no erro de adquirirmos um para agradar um filho ou satisfazer uma fantasia nossa ou até dar de presente a alguém, apesar de não haver a disponibilidade de espaço físico, de carinho e a devida compreensão que eles realmente merecem. Todos nós queremos muita coisa, mas raramente estamos dispostos a dar-lhe o devido valor, acabando por perdê-la de uma forma ou de outra. Hoje em dia, isto é comum acontecer. Quando “brincamos” a fazer sexo, sem nos protegermos para que nada que não queiramos aconteça, e de repente nos aparece um filho inesperado e indesejado, e não sabemos o que fazer. Recorre-se muitas vezes ao aborto, ao abandono e aos maus tratos, que demonstram a falta de capacidade de saber lidar com esta situação, ou até mau carácter dos pais, que não sabem o mal que estão a fazer, fisicamente e/ou psicologicamente, além de um dia o filho poder vir a fazer o mesmo.</p>
<p>Com o cão acontece a mesma coisa. É muito bonito quando é pequenino, pois parece um peluche, mas quando cresce e ocupa muito espaço ou dá um certo trabalho e estraga umas coisas lá em casa (sofás, cadeiras, móveis, etc..) já não gostamos dele e a melhor solução é levá-lo para uma rua desconhecida e deixá-lo lá, para que alguém ou algum canil municipal o recolha, e tente arranjar-lhe um dono, ou então proceda ao seu abate. Ou então agredimos o animal e um dia ele vira-se contra nós e não percebemos o porquê e mandamos abatê-lo injustamente. Estas são algumas das coisas que já se deveriam saber antes de ter um cão, para que ele não venha a ter tais procedimentos.</p>
<p>Como um amante de animais em geral, não aceite ter um animal se não está disposto a tudo o que foi dito anteriormente, porque não vai conseguir tê-lo por muito tempo e esse animal vai acabar por sofrer quando o abandonar, e é realmente muito triste isso acontecer. Aconselho-o a ler revistas, jornais e documentos sobre este tema ou consultar um criador/treinador canino, para estar informado de tudo antes de tomar qualquer decisão, para que esta não seja tomada irresponsavelmente.</p>
<p>“O cão é fiel quando há tempestade; o Homem nem sequer quando há vento&#8230;”</p>
<p><strong>Artigo publicado na &#8220;Folha de Tondela&#8221; em 2004.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2010/03/caes-animais-incompreendidos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your public_html with PHP5 isn&#8217;t working in Ubuntu 10.04 Lucid ?</title>
		<link>http://www.marblehole.com/2010/03/your-public_html-with-php5-isnt-working-in-ubuntu-lucid/</link>
		<comments>http://www.marblehole.com/2010/03/your-public_html-with-php5-isnt-working-in-ubuntu-lucid/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 23:19:44 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[public_html]]></category>

		<guid isPermaLink="false">http://marco.tondela.org/?p=235</guid>
		<description><![CDATA[This weekend I&#8217;ve dist-upgraded from Ubuntu 9.10 *Karmic* to Ubuntu 10.04 *Lucid*, but only today I got a problem&#8230; This was a big headache to figure out. First I got uninstallable packages for Apache2. In one or two hours I got the mirror updated and then installed it again, but my public_html with PHP5 stopped [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I&#8217;ve dist-upgraded from Ubuntu 9.10 *Karmic* to Ubuntu 10.04 *Lucid*, but only today I got a problem&#8230;</p>
<p>This was a big headache to figure out. First I got uninstallable packages for Apache2. In one or two hours I got the mirror updated and then installed it again, but my public_html with PHP5 stopped working.<br />
I tried many things, like apt-get &#8211;reinstall, aptitude -o DPkg::Options::=&#8221;&#8211;force-confmiss&#8221; on apache2 + php5 packages and nothing was solving my problem.</p>
<p>So I&#8217;ve investigated a little more.. why the hell my ~userdir isn&#8217;t working with PHP5 and keep me asking to download the php source file, when the &#8216;localhost&#8217; was working perfectly. Damn.. a bad day? ;(</p>
<p>So let&#8217;s analyze it..</p>
<p>$ sudo vim /etc/apache2/mods-enabled/php5.conf</p>
<pre class="brush: xml">
    &lt;ifmodule mod_userdir.c&gt;
        &lt;directory /home/*/public_html&gt;
            php_admin_value engine Off
        &lt;/directory&gt;
    &lt;/ifmodule&gt;
</pre>
<p>Looks like the php engine was disabled for public_html directories, so we need to change it from Off to On and then: $ sudo service apache2 reload</p>
<p>Still not working.. but after some hours later of investigation, I figured out that if I comment that lines of mod_userdir.c and then: $ sudo service apache2 reload, it will just work like always.</p>
<pre class="brush: xml">
#    &lt;ifmodule mod_userdir.c&gt;
#        &lt;directory /home/*/public_html&gt;
#            php_admin_value engine On
#        &lt;/directory&gt;
#    &lt;/ifmodule&gt;
</pre>
<p>Just this <img src='http://www.marblehole.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Why &#8220;php_admin_value engine On&#8221; doesn&#8217;t work? It was supposed too..</p>
<p><strong>P.S:.</strong> This bug was fixed in version 5.3.1-5ubuntu2 at Ubuntu Lucid 10.04.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2010/03/your-public_html-with-php5-isnt-working-in-ubuntu-lucid/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>3D Engine v1.0 em C &#8211; Trabalho final de 12º ano de TLP</title>
		<link>http://www.marblehole.com/2010/02/3d-engine-v1-0-em-c-trabalho-final-de-12%c2%ba-ano-de-tlp/</link>
		<comments>http://www.marblehole.com/2010/02/3d-engine-v1-0-em-c-trabalho-final-de-12%c2%ba-ano-de-tlp/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 11:28:49 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[c]]></category>
		<category><![CDATA[escola]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Turbo C++]]></category>

		<guid isPermaLink="false">http://marco.tondela.org/?p=218</guid>
		<description><![CDATA[Encontrei uma daquelas relíquias nos meus backups, que é sempre bom partilhar, pois poderá ajudar alguém que precise de umas dicas / ideias para o projecto final de TLP do 12º ano. Ao contrário de alguns colegas meus da altura, em que nada foi partilhado, eu não tenho qualquer problema em fazê-lo, bem porque a [...]]]></description>
			<content:encoded><![CDATA[<p>Encontrei uma daquelas relíquias nos meus backups, que é sempre bom partilhar, pois poderá ajudar alguém que precise de umas dicas / ideias para o projecto final de TLP do 12º ano. Ao contrário de alguns colegas meus da altura, em que nada foi partilhado, eu não tenho qualquer problema em fazê-lo, bem porque a minha base serviu na altura para outros colegas.</p>
<p>/*<br />
 <strong>3D Engine v1.0 em C com duas funções em Assembly!</strong> <img src='http://www.marblehole.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Composição de quatro pirâmides pentagonais de base centrada na origem com a altura oito vezes superior a medida da aresta da base.</p>
<p>Por Marco Rodrigues em 2003 &#8211; http://Marco.Tondela.org</p>
<p>Requisitos: Turbo C++ 3.0 para Ms-Dos.<br />
 Nota: Devido ao Assembly a Instruction Set do compilador tem de ser 80186.<br />
 */</p>
<p><a href="http://www.marblehole.com/stuff/3dengine10.cpp">3D Engine v1.0 em C</a></p>
<p>P.S:. Obrigado Prof. Cortez por toda a ajuda quando precisei.</p>
<p>EnJoY It <img src='http://www.marblehole.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2010/02/3d-engine-v1-0-em-c-trabalho-final-de-12%c2%ba-ano-de-tlp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Qmailtoaster change &#8216;postmaster&#8217; password for all domains</title>
		<link>http://www.marblehole.com/2010/02/qmailtoaster-change-postmaster-password-for-all-domains/</link>
		<comments>http://www.marblehole.com/2010/02/qmailtoaster-change-postmaster-password-for-all-domains/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 15:25:42 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[qmailtoaster]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://marco.tondela.org/?p=209</guid>
		<description><![CDATA[Last year I needed to change the password of all postmaster accounts at company server and I didn&#8217;t googled anything, so I made this script: #!/bin/bash ############################################################# # Qmailtoaster change &#039;postmaster&#039; password for all domains # ############################################################# # bY Marco Rodrigues (Kmos) in 2k # # http://Marco.Tondela.org # ############################################################# # Check every directory (domain) recursively [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I needed to change the password of all postmaster accounts at company server and I didn&#8217;t googled anything, so I made this script:</p>
<pre class="brush: bash">
#!/bin/bash
#############################################################
# Qmailtoaster change &#039;postmaster&#039; password for all domains #
#############################################################
# bY Marco Rodrigues (Kmos) in 2k                           #
# http://Marco.Tondela.org                                  #
#############################################################

# Check every directory (domain) recursively and change postmaster password.
for dir in `ls -R`; do
    if [[ $dir =~ [^\.]+\.(com|net|org|pt)$ ]]; then
        /home/vpopmail/bin/vpasswd postmaster@$dir password
        echo &quot;Password changed for postmaster@$dir&quot;
    fi
done
</pre>
<p>I hope it could help *you* some day <img src='http://www.marblehole.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2010/02/qmailtoaster-change-postmaster-password-for-all-domains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check Machines Network Status</title>
		<link>http://www.marblehole.com/2010/01/check-machines-network-status-2/</link>
		<comments>http://www.marblehole.com/2010/01/check-machines-network-status-2/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 23:05:16 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://marco.tondela.org/?p=194</guid>
		<description><![CDATA[This is a little script I wrote some time ago for a friend in a big ISP. It could be also useful for someone. Feel free to use it. #!/bin/bash ################################### # Check Machines Network Status # ################################### # bY Marco Rodrigues (Kmos) in 2k # # http://Marco.Tondela.org # ################################### # Results: # - Answers [...]]]></description>
			<content:encoded><![CDATA[<p>This is a little script I wrote some time ago for a friend in a big ISP. It could be also useful for someone. Feel free to use it.</p>
<pre class="brush: bash">
#!/bin/bash
###################################
# Check Machines Network Status   #
###################################
# bY Marco Rodrigues (Kmos) in 2k #
# http://Marco.Tondela.org       #
###################################

# Results:
# - Answers without problems (UP)
# - Not responding (DOWN)
# - Unknown host (DNS not configured)

# Ask range of machines to ping.
printf &quot;\nPlease enter the hostnames that you want to check: (e.g: console{1..100}.pt1)\n&quot;
read consoles_to_check

# Check hosts and ping results.
for console in `bash -c &quot;echo $consoles_to_check&quot;` ; do
        if [ -x &#039;/bin/ping&#039; ] ; then
                PINGTEST=`/bin/ping -c 1 $console 2&gt;&amp;amp;amp;amp;1`

                if [ -n &quot;`echo $PINGTEST | grep -o &#039;100% packet loss&#039;`&quot; ] ; then
                        result=&quot;DOWN&quot;
                elif [ -n &quot;`echo $PINGTEST | grep -o &#039;0% packet loss&#039;`&quot; ] ; then
                        result=&quot;UP&quot;
                elif [ -n &quot;`echo $PINGTEST | grep -o &#039;unknown host&#039;`&quot; ] ; then
                        result=&quot;DNS not configured&quot;
                fi
        else
            result=&quot;Error: Ping is not correctly installed...&quot;
        fi
        echo $console &quot;:&quot; $result
done

exit 0
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2010/01/check-machines-network-status-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SAPO PunyURL for Ubiquity</title>
		<link>http://www.marblehole.com/2009/08/sapo-punyurl-for-ubiquity/</link>
		<comments>http://www.marblehole.com/2009/08/sapo-punyurl-for-ubiquity/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 20:45:22 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[firefox]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[puny]]></category>
		<category><![CDATA[punyurl]]></category>
		<category><![CDATA[sapo]]></category>
		<category><![CDATA[software livre]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu-pt]]></category>

		<guid isPermaLink="false">http://marco.tondela.org/?p=180</guid>
		<description><![CDATA[I saw the latest news about Ubiquity and decided to give a try in my Firefox 3.5 / Ubuntu and I notice it can be helpful in various ways. It&#8217;s like an keyboard shortcut always there for something we need instantly. So I decided to use my jQuery knowledge and work on something cool in [...]]]></description>
			<content:encoded><![CDATA[<p>I saw the latest news about Ubiquity and decided to give a try in my Firefox 3.5 / Ubuntu and I notice it can be helpful in various ways. It&#8217;s like an keyboard shortcut always there for something we need instantly. So I decided to use my jQuery knowledge and work on something cool in Portugal.</p>
<p>Nothing better to do it with <a href="http://services.sapo.pt/Metadata/Service/PunyURL?culture=EN" target="_blank">SAPO PunyURL</a> <img src='http://www.marblehole.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Just install <a href="http://ubiquity.mozilla.com/" target="_blank">Ubiquity</a> first and after <a href="https://wiki.mozilla.org/Labs/Ubiquity/Commands_In_The_Wild#PunyURL" target="_blank">this</a>. Enjoy =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2009/08/sapo-punyurl-for-ubiquity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAPO PunyURL PHP Class</title>
		<link>http://www.marblehole.com/2009/07/sapo-punyurl-php-class/</link>
		<comments>http://www.marblehole.com/2009/07/sapo-punyurl-php-class/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 19:50:37 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[class]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpclasses]]></category>
		<category><![CDATA[puny]]></category>
		<category><![CDATA[punyurl]]></category>
		<category><![CDATA[sapo]]></category>
		<category><![CDATA[software livre]]></category>

		<guid isPermaLink="false">http://marco.tondela.org/?p=177</guid>
		<description><![CDATA[O PunyURL é um produto nacional criado no SAPO, e por isso utilize-o até não poder mais senão o esforço que tive em criar a Class será em vão Agora já podemos adicionar links &#8220;curtos&#8221; para o twitter (entre outros..) em PHP de uma forma simplificada e rápida. Como descarregar? fácil.. é só visitar este [...]]]></description>
			<content:encoded><![CDATA[<p>O <a href="http://puny.sapo.pt" target="_blank">PunyURL</a> é um produto nacional criado no SAPO, e por isso utilize-o até não poder mais <img src='http://www.marblehole.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  senão o esforço que tive em criar a Class será em vão <img src='http://www.marblehole.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /><br />
Agora já podemos adicionar links &#8220;curtos&#8221; para o twitter (entre outros..) em PHP de uma forma simplificada e rápida.</p>
<p>Como descarregar? fácil.. é só visitar este <a href="http://www.phpclasses.org/punyurl" target="_blank">link</a> no PHP Classes ou este <a href="http://github.com/gothicx/php-shorten-punyurl/" target="_blank">link</a> no github.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marblehole.com/2009/07/sapo-punyurl-php-class/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
