<?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>Angel Monticelli</title>
	<atom:link href="http://www.angelmonticelli.com.ar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.angelmonticelli.com.ar</link>
	<description>My thoughts about...</description>
	<lastBuildDate>Mon, 09 Jan 2012 15:18:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Trying Google viewer</title>
		<link>http://www.angelmonticelli.com.ar/2010/06/trying-google-viewer/</link>
		<comments>http://www.angelmonticelli.com.ar/2010/06/trying-google-viewer/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 15:23:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://www.angelmonticelli.com.ar/?p=75</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://docs.google.com/viewer?url=http%3A%2F%2Fwww.angelmonticelli.com.ar%2Fgreenshots.pdf&#038;embedded=true" width="525" height="720" style="border: none;"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.angelmonticelli.com.ar/2010/06/trying-google-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing HTML5 from Scribd player</title>
		<link>http://www.angelmonticelli.com.ar/2010/06/testing-html5-from-scribd-player/</link>
		<comments>http://www.angelmonticelli.com.ar/2010/06/testing-html5-from-scribd-player/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 15:10:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://www.angelmonticelli.com.ar/?p=71</guid>
		<description><![CDATA[Scribd in HTML5  
]]></description>
			<content:encoded><![CDATA[<p><a title="View Scribd in HTML5 on Scribd" href="http://www.scribd.com/doc/30964170/Scribd-in-HTML5" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;">Scribd in HTML5</a> <object id="doc_984119134812367" name="doc_984119134812367" height="500" width="100%" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;" rel="media:presentation" resource="http://d1.scribdassets.com/ScribdViewer.swf?document_id=30964170&#038;access_key=key-1ar9e5ms2364hpdfeixn&#038;page=1&#038;viewMode=list" xmlns:media="http://search.yahoo.com/searchmonkey/media/" xmlns:dc="http://purl.org/dc/terms/" ><param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf"><param name="wmode" value="opaque"><param name="bgcolor" value="#ffffff"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="FlashVars" value="document_id=30964170&#038;access_key=key-1ar9e5ms2364hpdfeixn&#038;page=1&#038;viewMode=list"><embed id="doc_984119134812367" name="doc_984119134812367" src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=30964170&#038;access_key=key-1ar9e5ms2364hpdfeixn&#038;page=1&#038;viewMode=list" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="500" width="100%" wmode="opaque" bgcolor="#ffffff"></embed></object> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.angelmonticelli.com.ar/2010/06/testing-html5-from-scribd-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu, Asus 1005PE multitouch touchpad</title>
		<link>http://www.angelmonticelli.com.ar/2010/06/ubuntu-asus-1005pe-multitouch-touchpad/</link>
		<comments>http://www.angelmonticelli.com.ar/2010/06/ubuntu-asus-1005pe-multitouch-touchpad/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 21:36:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[1005PE]]></category>
		<category><![CDATA[asus]]></category>
		<category><![CDATA[touchpad]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.angelmonticelli.com.ar/?p=63</guid>
		<description><![CDATA[Hi everyone! I&#8217;ve got my new Asus 1005PE, my replacement for the 1000HA. I&#8217;m very happy with it. The battery life is great, and I&#8217;ve chosen it because of it. This new device has the latest Intel Atom processor, the N450. It has as a main feature the integration of the memory controller and the [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone! I&#8217;ve got my new <strong>Asus 1005PE</strong>, my replacement for the 1000HA. I&#8217;m very happy with it. The battery life is great, and I&#8217;ve chosen it because of it. This new device has the latest Intel Atom processor, the N450. It has as a main feature the integration of the memory controller and the video card in it. The result, great battery performance.</p>
<p>Ok, the first drawback is, the touchpad is not multitouch, I mean, at least by hardware it seems it doesn&#8217;t support this lovely feature with the latest Linux kernel (using Ubuntu 10.04, 2.6.32-22). Pretty bad, isn&#8217;t it? I&#8217;ve been really used to use the double tap (to press the secondary button) and using two finger for scrolling with my previous 1000HA.</p>
<p>Should I whine now? Nah, that&#8217;s for Windows users <img src='http://www.angelmonticelli.com.ar/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  So&#8230; what should I do? Google it, try some smart approach to the problem and solve it.</p>
<p>Alright, I&#8217;m cutting the crap and post the solution here.</p>
<h3>Step 1 (skip this step if you&#8217;re using 10.04 or higher)</h3>
<p>Create the file /etc/hal/fdi/policy/11-x11-synaptics.fdi and put the content below:</p>
<p><code> </code></p>
<p><code></p>
<blockquote>
<div id="_mcePaste">&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;</div>
<div id="_mcePaste">&lt;deviceinfo version="0.2"&gt;</div>
<div id="_mcePaste">&lt;device&gt;</div>
<div id="_mcePaste">&lt;match key="info.capabilities" contains="input.touchpad"&gt;</div>
<div id="_mcePaste">&lt;merge key="input.x11_driver" type="string"&gt;synaptics&lt;/merge&gt;</div>
<div id="_mcePaste">&lt;merge key="input.x11_options.SHMConfig" type="string"&gt;On&lt;/merge&gt;</div>
<div id="_mcePaste">&lt;merge key="input.x11_options.EmulateTwoFingerMinZ" type="string"&gt;40&lt;/merge&gt;</div>
<div id="_mcePaste">&lt;merge key="input.x11_options.VertTwoFingerScroll" type="string"&gt;1&lt;/merge&gt;</div>
<div id="_mcePaste">&lt;merge key="input.x11_options.HorizTwoFingerScroll" type="string"&gt;1&lt;/merge&gt;</div>
<div id="_mcePaste">&lt;merge key="input.x11_options.TapButton1" type="string"&gt;1&lt;/merge&gt;</div>
<div id="_mcePaste">&lt;merge key="input.x11_options.TapButton2" type="string"&gt;3&lt;/merge&gt;  &lt;!--two finger tap -&gt; middle clieck(3) --&gt;</div>
<div id="_mcePaste">&lt;merge key="input.x11_options.TapButton3" type="string"&gt;2&lt;/merge&gt;  &lt;!--three finger tap -&gt; right click(2). almost impossible to click --&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;/device&gt;</div>
<div id="_mcePaste">&lt;/deviceinfo&gt;</div>
</blockquote>
<p></code></p>
<h3>Step 2</h3>
<p>Put the next code in some executable file:</p>
<blockquote><p><code>#!/bin/sh</p>
<p># Set multi-touch emulation parameters</p>
<p>xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10</p>
<p>xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8</p>
<p>xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1</p>
<p>xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1</p>
<p># Disable edge scrolling</p>
<p>xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 8 0 0 0</p>
<p># This will make cursor not to jump if you have two fingers on the touchpad and you list one</p>
<p># (which you usually do after two-finger scrolling)</p>
<p>xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 110</code></p></blockquote>
<p>Restart the gdm, or Ubuntu, and try it. Remember to execute the shell file created in step 2. Later you could add it in your start up scripts.</p>
<p>I hope it works for you guys.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.angelmonticelli.com.ar/2010/06/ubuntu-asus-1005pe-multitouch-touchpad/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>How to change fonts in Ubuntu Linux (.fonts.conf)</title>
		<link>http://www.angelmonticelli.com.ar/2010/05/how-to-change-fonts-in-ubuntu-linux-fonts-conf/</link>
		<comments>http://www.angelmonticelli.com.ar/2010/05/how-to-change-fonts-in-ubuntu-linux-fonts-conf/#comments</comments>
		<pubDate>Thu, 13 May 2010 16:10:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://www.angelmonticelli.com.ar/?p=58</guid>
		<description><![CDATA[If you want to tweak a little how fonts should display in Ubuntu, you could play a little with a file called .fonts.conf. You just need to create that file within you home folder and put the code below.
Playing with it it&#8217;s easy and you will be able to understand what to do based on [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to tweak a little how fonts should display in Ubuntu, you could play a little with a file called .fonts.conf. You just need to create that file within you home folder and put the code below.</p>
<p>Playing with it it&#8217;s easy and you will be able to understand what to do based on my example. (I&#8217;ve download the MS Fonts Pack).</p>
<blockquote>
<div id="_mcePaste">&lt;?xml version=&#8217;1.0&#8242;?&gt;</div>
<div id="_mcePaste">&lt;!DOCTYPE fontconfig SYSTEM &#8216;fonts.dtd&#8217;&gt;</div>
<div id="_mcePaste">&lt;fontconfig&gt;</div>
<div id="_mcePaste">&lt;!&#8211; General &#8211;&gt;</div>
<div id="_mcePaste">&lt;match target=&#8221;font&#8221;&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;antialias&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;bool&gt;true&lt;/bool&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;hinting&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;bool&gt;true&lt;/bool&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;hintstyle&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;hintfull&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;lcdfilter&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;lcdlegacy&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;rgba&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;rgb&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;!&#8211; Fuentes sin alias &#8211;&gt;</div>
<div id="_mcePaste">&lt;match target=&#8221;font&#8221;&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;family&#8221; compare=&#8221;eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;string&gt;Tahoma&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;Verdana&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;Trebuchet MS&lt;/string&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;pixelsize&#8221; compare=&#8221;less_eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;double&gt;13.9&lt;/double&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;!&#8211;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;weight&#8221; compare=&#8221;less_eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;medium&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&#8211;&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;slant&#8221; compare=&#8221;eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;roman&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;antialias&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;bool&gt;false&lt;/bool&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;!&#8211; Fuentes bold con alias mayores a 14px &#8211;&gt;</div>
<div id="_mcePaste">&lt;match target=&#8221;font&#8221;&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;pixelsize&#8221; compare=&#8221;more&#8221;&gt;</div>
<div id="_mcePaste">&lt;double&gt;14&lt;/double&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;weight&#8221; compare=&#8221;more_eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;medium&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;antialias&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;bool&gt;true&lt;/bool&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;!&#8211; Prevenir fuentes mas chicas que 9.4px &#8211;&gt;</div>
<div id="_mcePaste">&lt;match target=&#8221;font&#8221;&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;pixelsize&#8221; compare=&#8221;less&#8221;&gt;</div>
<div id="_mcePaste">&lt;double&gt;9.4&lt;/double&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;pixelsize&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;double&gt;9.4&lt;/double&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;!&#8211;</div>
<div id="_mcePaste">Enable FreeType Auto-Hinter for select fonts.</div>
<div id="_mcePaste">Auto-Hinter is disabled by default if Bytecode Interpreter was compiled in.</div>
<div id="_mcePaste">Some Linux &#8220;native&#8221; fonts look better hinted by Auto-Hinter,</div>
<div id="_mcePaste">usually in sizes 11pt-13pt; others look better hinted by BCI.</div>
<div id="_mcePaste">&#8211;&gt;</div>
<div id="_mcePaste">&lt;!&#8211;</div>
<div id="_mcePaste">Set Auto-Hinter to full hinting style.</div>
<div id="_mcePaste">&#8217;slight&#8217; and &#8216;medium&#8217; hinting often produce pixel discoloration.</div>
<div id="_mcePaste">&#8211;&gt;</div>
<div id="_mcePaste">&lt;match target=&#8221;font&#8221;&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;hintstyle&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;hintfull&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;!&#8211;</div>
<div id="_mcePaste">font group #11: hinted via Auto-Hinter</div>
<div id="_mcePaste">&#8211;&gt;</div>
<div id="_mcePaste">&lt;match target=&#8221;font&#8221;&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;family&#8221; compare=&#8221;eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;string&gt;Bitstream Charter&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;Courier 10 Pitch&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;DejaVu Sans Condensed&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;DejaVu Serif Condensed&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;FreeMono&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;FreeSans&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;FreeSerif&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;Luxi Mono&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;Luxi Sans&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;Luxi Serif&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;MgOpen Canonica&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;MgOpen Cosmetica&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;MgOpen Modata&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;MgOpen Moderna&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;URW Bookman L&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;URW Chancery L&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;URW Gothic L&lt;/string&gt;</div>
<div id="_mcePaste">&lt;string&gt;URW Palladio L&lt;/string&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;autohint&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;bool&gt;true&lt;/bool&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;!&#8211;</div>
<div id="_mcePaste">font group #12: normal italic hinted via Auto-Hinter at 9-10pt</div>
<div id="_mcePaste">Arial hinted via BCI at 9pt has distorted &#8216;y&#8217;, at 10pt &#8211; &#8216;2&#8242;</div>
<div id="_mcePaste">&#8211;&gt;</div>
<div id="_mcePaste">&lt;match target=&#8221;font&#8221;&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;family&#8221; compare=&#8221;eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;string&gt;Arial&lt;/string&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;pixelsize&#8221; compare=&#8221;more_eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;double&gt;12&lt;/double&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;pixelsize&#8221; compare=&#8221;less_eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;double&gt;13.4&lt;/double&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;weight&#8221; compare=&#8221;less_eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;medium&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;slant&#8221; compare=&#8221;not_eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;const&gt;roman&lt;/const&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;autohint&#8221; mode=&#8221;assign&#8221;&gt;</div>
<div id="_mcePaste">&lt;bool&gt;true&lt;/bool&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;!&#8211; Reemplazo de Arial por Tahorma &#8211;&gt;</div>
<div id="_mcePaste">&lt;match target=&#8221;pattern&#8221;&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;family&#8221; compare=&#8221;eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;string&gt;Arial&lt;/string&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;test qual=&#8221;any&#8221; name=&#8221;pixelsize&#8221; compare=&#8221;less_eq&#8221;&gt;</div>
<div id="_mcePaste">&lt;double&gt;13&lt;/double&gt;</div>
<div id="_mcePaste">&lt;/test&gt;</div>
<div id="_mcePaste">&lt;edit name=&#8221;family&#8221; mode=&#8221;prepend&#8221; binding=&#8221;same&#8221;&gt;</div>
<div id="_mcePaste">&lt;string&gt;Tahoma&lt;/string&gt;</div>
<div id="_mcePaste">&lt;/edit&gt;</div>
<div id="_mcePaste">&lt;/match&gt;</div>
<div id="_mcePaste">&lt;/fontconfig&gt;</div>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.angelmonticelli.com.ar/2010/05/how-to-change-fonts-in-ubuntu-linux-fonts-conf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ultimate htaccess code snippets</title>
		<link>http://www.angelmonticelli.com.ar/2010/03/ultimate-htaccess-code-snippets/</link>
		<comments>http://www.angelmonticelli.com.ar/2010/03/ultimate-htaccess-code-snippets/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 18:28:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.angelmonticelli.com.ar/?p=47</guid>
		<description><![CDATA[Here&#8217;s my list of the ultimate htaccess code snippets and examples that I use all the time.  I tried to keep them extremely minimalistic.
Don&#8217;t miss checking out my example htaccess file, its very comprehensive
Heres the actual code that I use when I&#8217;m developing sites for clients
This lets google crawl the page, lets me access [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Here&#8217;s my list of the ultimate htaccess code snippets and examples that I use all the time.</strong>  I tried to keep them extremely minimalistic.</p>
<p>Don&#8217;t miss checking out my <a href="http://www.askapache.com/htaccess/ultimate-htaccess-file-sample.html">example htaccess file</a>, its very comprehensive</p>
<h4>Heres the actual code that I use when I&#8217;m developing sites for clients</h4>
<p>This lets google crawl the page, lets me access the whole site (24.205.23.222) without a password, and lets my client access the page WITH a password.  It also allows for XHTML and CSS validation! (w3.org)</p>
<div class="codeblock"><code>#     ELITE HTACCESS FOR WEBDEVELOPERS<br />
##############################################<br />
AuthName "SiteName Administration"<br />
AuthUserFile /home/sitename.com/.htpasswd<br />
AuthType basic<br />
Require valid-user<br />
Order deny,allow<br />
Deny from all<br />
Allow from 24\.205\.23\.222<br />
Allow from w3.org htmlhelp.com<br />
Allow from googlebot.com<br />
Satisfy Any</code></div>
<p>
Each code snippet has been copied from htaccesselite.  Additional and detailed info on each htaccess code snippet can be found at <a href="http://www.askapache.com/">askapache.com</a>
</p>
<p>
<strong>NOTE:</strong> Most of these snippets can be used with a <a href="http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html">Files or Filesmatch</a> directive to only apply to certain files.
</p>
<p>
<strong>NOTE:</strong> Any htaccess rewrite examples should always begin with:
</p>
<div class="codeblock"><code>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /</code></div>
<h4>Apache Documentation: <a href="http://httpd.apache.org/docs/1.3/">1.3</a> |  <a href="http://httpd.apache.org/docs/2.0/">2.0</a> |  <a href="http://httpd.apache.org/docs/2.2/">2.2</a> |  <a href="http://httpd.apache.org/docs/trunk/">Current</a></h4>
<h4>Make any file be a certain filetype (regardless of name or extension)</h4>
<div class="codeblock"><code>#Makes image.gif, blah.html, index.cgi all act as php<br />
ForceType application/x-httpd-php</code></div>
<h4>Redirect non-https requests to https server fixing double-login problem and ensuring that htpasswd authorization can only be entered using HTTPS</h4>
<p><a href="http://www.htaccesselite.com/htaccess/redirecting-all-or-part-of-a-server-to-ssl-vt61.html">Additional https/ssl information</a> and <a href="http://www.askapache.com/htaccess/apache-ssl-in-htaccess-examples.html">Apache SSL in htaccess examples</a></p>
<div class="codeblock"><code>SSLOptions +StrictRequire<br />
SSLRequireSSL<br />
SSLRequire %{HTTP_HOST} eq "google.com"<br />
ErrorDocument 403 https://google.com</code></div>
<h4>SEO Friendly redirects for bad/old links and moved links</h4>
<h4>For single moved file</h4>
<div class="codeblock"><code>Redirect 301 /d/file.html http://www.htaccesselite.com/r/file.html</code></div>
<h4>For multiple files like a blog/this.php?gh</h4>
<div class="codeblock"><code>RedirectMatch 301 /blog(.*) http://www.askapache.com/$1</code></div>
<h4>different domain name</h4>
<div class="codeblock"><code>Redirect 301 / http://www.newdomain.com</code></div>
<h4>Require the www</h4>
<div class="codeblock"><code>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_URI} !^/robots\.txt$<br />
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]<br />
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] </code></div>
<h4>Require the www without hardcoding</h4>
<div class="codeblock"><code>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_URI} !^/robots\.txt$ [NC]<br />
RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC]<br />
RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$     [NC]<br />
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]</code></div>
<h4>Require no subdomain</h4>
<div class="codeblock"><code>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_URI} !^/robots\.txt$<br />
RewriteCond %{HTTP_HOST} \.([a-z-]+\.[a-z]{2,6})$ [NC]<br />
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]</code></div>
<h4>Require no subdomain</h4>
<div class="codeblock"><code>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} \.([^\.]+\.[^\.0-9]+)$<br />
RewriteCond %{REQUEST_URI} !^/robots\.txt$ [NC]<br />
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]</code></div>
<h4>Redirect everyone to different site except 1 IP address (useful for web-development)</h4>
<div class="codeblock"><code>ErrorDocument 403 http://www.someothersite.com<br />
Order deny,allow<br />
Deny from all<br />
Allow from 24.33.65.6</code></div>
<h4>CHMOD your files</h4>
<p>
chmod .htpasswd files 640<br />
chmod .htaccess files 644<br />
chmod php files 600<br />
chmod files that you really dont want people to see as 400<br />
<strong>NEVER chmod 777</strong>, if something requires write access use 766
</p>
<h4>Variable (<a href="http://httpd.apache.org/docs/2.2/mod/mod_env.html">mod_env</a>) Magic</h4>
<h4>Set the Timezone of the server:</h4>
<div class="codeblock"><code>SetEnv TZ America/Indianapolis </code></div>
<h4>Set the Server Administrator Email:</h4>
<div class="codeblock"><code>SetEnv SERVER_ADMIN webmaste@htaccesselite.com</code></div>
<h4>Turn off the ServerSignature</h4>
<div class="codeblock"><code>ServerSignature Off</code></div>
<h4>Add a &#8220;en-US&#8221; language tag and &#8220;text/html; UTF-8&#8243; headers without meta tags</h4>
<p>Article: <a href="http://www.askapache.com/htaccess/setting-charset-in-htaccess.html">Setting Charset in htaccess</a></p>
<p>Article: <a href="http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html">Using FilesMatch and Files in htaccess</a></p>
<div class="codeblock"><code>AddDefaultCharset UTF-8<br />
# Or AddType 'text/html; charset=UTF-8' html<br />
DefaultLanguage en-US</code></div>
<h4>Using the Files Directive</h4>
<div class="codeblock"><code>&lt;Files ~ "\.(htm|html|css|js|php)$"&gt;<br />
&nbsp;&nbsp;&nbsp;AddDefaultCharset UTF-8<br />
&nbsp;&nbsp;&nbsp;DefaultLanguage en-US<br />
&lt;/Files&gt;</code></div>
<h4>Using the FilesMatch Directive <em>(preferred)</em></h4>
<div class="codeblock"><code>&lt;FilesMatch "\.(htm|html|css|js|php)$"&gt;<br />
&nbsp;&nbsp;&nbsp;AddDefaultCharset UTF-8<br />
&nbsp;&nbsp;&nbsp;DefaultLanguage en-US<br />
&lt;/FilesMatch&gt;</code></div>
<h4>Use a custom php.ini with mod_php or php as a cgi</h4>
<p>Article: <a href="http://www.askapache.com/php/custom-phpini-tips-and-tricks.html">Custom PHP.ini tips and tricks</a></p>
<blockquote><p>
When php run as Apache Module (mod_php)<br />
in root .htaccess<br />
SetEnv PHPRC /location/todir/containing/phpinifile</p>
<p>When php run as CGI<br />
Place your php.ini file in the dir of your cgi’d php, in this case /cgi-bin/</p>
<p>htaccess might look something like this<br />
AddHandler php-cgi .php .htm Action php-cgi /cgi-bin/php5.cgi</p>
<p>When cgi’d php is run with wrapper (for FastCGI)<br />
You will have a shell wrapper script something like this:</p>
<p>#!/bin/sh<br />
export PHP_FCGI_CHILDREN=3<br />
exec /user3/x.com/htdocs/cgi-bin/php5.cgi</p>
<p>Change To</p>
<p>#!/bin/sh<br />
export PHP_FCGI_CHILDREN=3<br />
exec /x.com/cgi-bin/php.cgi -c /abs/path/to/php.ini</p>
</blockquote>
<h4>Securing directories: Remove the ability to execute scripts </h4>
<p>
    Heres a couple different ways I do it
</p>
<div class="codeblock"><code>AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi <br />
Options -ExecCGI</code></div>
<p>
This is cool, you are basically categorizing all those files that end in those extensions so that they fall under the jurisdiction of the -ExecCGI command, which also means -FollowSymLinks <em>(and the opposite is also true, +ExecCGI also turns on +FollowSymLinks)</em>
</p>
<h4>Only allow GET and PUT request methods to your server.</h4>
<div class="codeblock"><code>Options -ExecCGI -Indexes -All +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_METHOD} !^(GET|PUT)<br />
RewriteRule .* - [F]</code></div>
<h4>Processing All gif files to be processed through a cgi script</h4>
<div class="codeblock"><code>Action image/gif /cgi-bin/filter.cgi</code></div>
<h4>Process request/file depending on the request method</h4>
<div class="codeblock"><code>Script PUT /cgi-bin/upload.cgi</code></div>
<h4>Force Files to download, not be displayed in browser</h4>
<div class="codeblock"><code>AddType application/octet-stream .avi <br />
AddType application/octet-stream .mpg</code></div>
<p>Then in your HTML you could just link directly to the file..</p>
<div class="codeblock"><code>&lt;a href="http://www.askapache.com/movies/mov1.avi"&gt;Download Movie1&lt;/a&gt;</code></div>
<p>And then you will get a pop-up box asking whether you want to save the file or open it.</p>
<h4>Show the source code of dynamic files</h4>
<p>If you&#8217;d rather have .pl, .py, or .cgi files displayed in the browser as source rather than be executed as scripts, simply create a .htaccess file in the relevant directory with the following:</p>
<div class="codeblock"><code>RemoveHandler cgi-script .pl .py .cgi</code></div>
<h4>Dramatically Speed up your site by implementing Caching!</h4>
<p>Article: <a href="http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html">Speed Up Sites with htaccess Caching</a></p>
<div class="codeblock"><code># MONTH<br />
&lt;FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$"&gt;<br />
&nbsp;&nbsp;&nbsp;Header set Cache-Control "max-age=2592000"<br />
&lt;/FilesMatch&gt;</p>
<p># WEEK<br />
&lt;FilesMatch "\.(js|css|pdf|txt)$"&gt;<br />
&nbsp;&nbsp;&nbsp;Header set Cache-Control "max-age=604800"<br />
&lt;/FilesMatch&gt;</p>
<p># DAY<br />
&lt;FilesMatch "\.(html|htm)$"&gt;<br />
&nbsp;&nbsp;&nbsp;Header set Cache-Control "max-age=43200"<br />
&lt;/FilesMatch&gt;</code></div>
<h4>Prevent Files image/file hotlinking and bandwidth stealing</h4>
<div class="codeblock"><code>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?askapache.com/.*$ [NC]<br />
RewriteRule \.(gif|jpg|swf|flv|png)$ http://www.askapache.com/feed.gif [R=302,L]</code></div>
<h4>ErrorDocuments</h4>
<p>Article: <a href="http://www.htaccesselite.com/htaccess/htaccess-errordocument-examples-vt11.html">Additional ErrorDocument Info and Examples</a></p>
<div class="codeblock"><code>ErrorDocument 404 /favicon.ico<br />
ErrorDocument 403 https://secure.htaccesselite.com<br />
ErrorDocument 404 /cgi-bin/error.php<br />
ErrorDocument 400 /cgi-bin/error.php<br />
ErrorDocument 401 /cgi-bin/error.php<br />
ErrorDocument 403 /cgi-bin/error.php<br />
ErrorDocument 405 /cgi-bin/error.php<br />
ErrorDocument 406 /cgi-bin/error.php<br />
ErrorDocument 409 /cgi-bin/error.php<br />
ErrorDocument 413 /cgi-bin/error.php<br />
ErrorDocument 414 /cgi-bin/error.php<br />
ErrorDocument 500 /cgi-bin/error.php<br />
ErrorDocument 501 /cgi-bin/error.php</code></div>
<p><strong>Note:</strong> You can also do an external link, but don&#8217;t do an external link to your site or you will cause a loop that will hurt your SEO.</p>
<h4>Authentication Magic</h4>
<h4>Require password for 1 file:</h4>
<div class="codeblock"><code>&lt;Files login.php&gt;<br />
&nbsp;&nbsp;&nbsp;AuthName "Prompt"<br />
&nbsp;&nbsp;&nbsp;AuthType Basic<br />
&nbsp;&nbsp;&nbsp;AuthUserFile /home/askapache.com/.htpasswd<br />
&nbsp;&nbsp;&nbsp;Require valid-user<br />
&lt;/Files&gt;</code></div>
<h4>Protect multiple files:</h4>
<div class="codeblock"><code>&lt;FilesMatch "^(exec|env|doit|phpinfo|w)\.*$"&gt;<br />
&nbsp;&nbsp;&nbsp;AuthName "Development"<br />
&nbsp;&nbsp;&nbsp;AuthUserFile /.htpasswd<br />
&nbsp;&nbsp;&nbsp;AuthType basic<br />
&nbsp;&nbsp;&nbsp;Require valid-user<br />
&lt;/FilesMatch&gt;</code></div>
<h4>Example uses of the Allow Directive:</h4>
<div class="codeblock"><code># A (partial) domain-name<br />
Allow from 10.1.0.0/255.255.0.0</p>
<p># Full IP address<br />
Allow from 10.1.2.3</p>
<p># More than 1 full IP address<br />
Allow from 192.168.1.104 192.168.1.205</p>
<p># Partial IP addresses <br />
# first 1 to 3 bytes of IP, for subnet restriction.<br />
Allow from 10.1<br />
Allow from 10 172.20 192.168.2</p>
<p># network/netmask pair<br />
Allow from 10.1.0.0/255.255.0.0</p>
<p># network/nnn CIDR specification<br />
Allow from 10.1.0.0/16</p>
<p># IPv6 addresses and subnets<br />
Allow from 2001:db8::a00:20ff:fea7:ccea<br />
Allow from 2001:db8::a00:20ff:fea7:ccea/10</code></div>
<h4>Using visitor dependent environment variables:</h4>
<p>Article: <a href="http://www.htaccesselite.com/htaccess/setenvif-examples-vt134.html">Additional SetEnvIf examples</a></p>
<div class="codeblock"><code>SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in<br />
Order Deny,Allow<br />
Deny from all<br />
Allow from env=let_me_in</code></div>
<h4>Allow from apache.org but deny from foo.apache.org</h4>
<div class="codeblock"><code>Order Allow,Deny<br />
Allow from apache.org<br />
Deny from foo.apache.org</code></div>
<h4>Allow from IP address with no password prompt, and also allow from non-Ip address with password prompt:</h4>
<div class="codeblock"><code>AuthUserFile /home/www/site1-passwd<br />
AuthType Basic<br />
AuthName MySite<br />
Require valid-user<br />
Allow from 172.17.10<br />
Satisfy Any</code></div>
<h4>block access to files during certain hours of the day</h4>
<div class="codeblock"><code>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /<br />
# If the hour is 16 (4 PM) Then deny all access<br />
RewriteCond %{TIME_HOUR} ^16$<br />
RewriteRule ^.*$ - [F,L]</code></div>
<h4>A good default example .htaccess file</h4>
<p>I use this when I start a new site, and uncomment or delete parts of the file depending on the sites needs</p>
<div class="codeblock"><code>#            DEFAULT SETTINGS<br />
##############################################<br />
Options +ExecCGI -Indexes<br />
DirectoryIndex index.php index.html index.htm</p>
<p>### DEFAULTS ###<br />
ServerSignature Off<br />
AddType video/x-flv .flv<br />
AddType application/x-shockwave-flash .swf<br />
AddType image/x-icon .ico<br />
AddDefaultCharset UTF-8<br />
DefaultLanguage en-US<br />
SetEnv TZ America/Indianapolis<br />
SetEnv SERVER_ADMIN webmaster@askapache.com</p>
<p>### FAST-CGI ###<br />
AddHandler fastcgi-script fcgi<br />
AddHandler php-cgi .php<br />
Action php-cgi /cgi-bin/php5-wrapper.fcgi</p>
<p>#           HEADERS and CACHING<br />
##############################################<br />
#### CACHING ####<br />
# YEAR<br />
&lt;FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$"&gt;<br />
&nbsp;&nbsp;&nbsp;Header set Cache-Control "max-age=2592000"<br />
&lt;/FilesMatch&gt;<br />
# WEEK<br />
&lt;FilesMatch "\.(js|css|pdf|swf)$"&gt;<br />
&nbsp;&nbsp;&nbsp;Header set Cache-Control "max-age=604800"<br />
&lt;/FilesMatch&gt;<br />
# 10 minutes<br />
&lt;FilesMatch "\.(html|htm|txt)$"&gt;<br />
&nbsp;&nbsp;&nbsp;Header set Cache-Control "max-age=600"<br />
&lt;/FilesMatch&gt;<br />
# DONT CACHE<br />
&lt;FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"&gt;<br />
&nbsp;&nbsp;&nbsp;Header unset Cache-Control<br />
&lt;/FilesMatch&gt;</p>
<p>#          REWRITES AND REDIRECTS<br />
##############################################<br />
### SEO REDIRECTS ###<br />
Redirect 301 /2006/uncategorized/htaccesselitecom-aboutus.html http://www.^^SITE^^.^^TLD^^</p>
<p>### REWRITES ###<br />
RewriteEngine On<br />
RewriteBase /</p>
<p>### WORDPRESS ###<br />
# BEGIN WordPress<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&lt;/IfModule&gt;</p>
<p># END WordPress</p>
<p>#           AUTHENTICATION <br />
##############################################<br />
AuthName "askapache.com"<br />
Require valid-user<br />
AuthUserFile /askapache/.htpasswd<br />
AuthType basic</code></div>
<p><a href="http://www.askapache.com/htaccess/apache-htaccess.html" target="_blank">Ultimate htaccess Article</a><br />
<a href="http://www.evolt.org/ultimate_htaccess_examples" target="_blank">source here</a><br />
Thanks to <a href="http://evolt.org/user/71186" target="_blank">AskApache</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.angelmonticelli.com.ar/2010/03/ultimate-htaccess-code-snippets/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Sphinx daemon in Ubuntu</title>
		<link>http://www.angelmonticelli.com.ar/2010/03/sphinx-daemon-in-ubuntu/</link>
		<comments>http://www.angelmonticelli.com.ar/2010/03/sphinx-daemon-in-ubuntu/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 13:45:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sphinx]]></category>
		<category><![CDATA[searchd]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.angelmonticelli.com.ar/?p=34</guid>
		<description><![CDATA[Read the bottom of this post to see the updated version!
After install Sphinx Search following the instructions here, I wanted to get the daemon (searchd) running automatically after my Ubuntu Server box restarts.
The trick is to install the daemon in the init.d doing the following (as a root sudo -s):
First, create /etc/init.d/searchd with this content:
 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Read the bottom of this post to see the updated version!</strong></p>
<p>After install Sphinx Search following the instructions <a title="installing sphinx on Linux" href="http://www.sphinxsearch.com/docs/current.html#installing" target="_blank">here</a>, I wanted to get the daemon (<em>searchd</em>) running automatically after my Ubuntu Server box restarts.</p>
<p>The trick is to install the daemon in the init.d doing the following (as a root <strong>sudo -s</strong>):</p>
<p>First, create <strong>/etc/init.d/searchd</strong> with this content:</p>
<p><code> #!/bin/sh<br />
case "${1:-''}" in<br />
'start')<br />
/usr/local/sphinx/bin/searchd<br />
;;<br />
'stop')<br />
/usr/local/sphinx/bin/searchd --stop<br />
;;<br />
'status')<br />
/usr/local/sphinx/bin/searchd --status<br />
;;<br />
'iostats')<br />
/usr/local/sphinx/bin/searchd --iostats<br />
;;<br />
'cpustats')<br />
/usr/local/sphinx/bin/searchd --cpustats<br />
;;<br />
*)<br />
echo "Usage: $SELF start|stop|status|iostats|cpustats"<br />
exit 1<br />
;;<br />
esac<br />
exit 0</code></p>
<p>Change the mod with: <strong>chmod a+x /etc/init.d/searchd</strong></p>
<p>Last, execute this command to add the script into the runlevels: <strong>update-rc.d searchd defaults</strong></p>
<p>That&#8217;s it. <img src='http://www.angelmonticelli.com.ar/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>UPDATE</strong>: Since Sphinxsearch now has a .DEB file to download, you could have it installed from that source in 5&#8242; <img src='http://www.angelmonticelli.com.ar/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Just go to http://sphinxsearch.com/downloads/release/ get the .DEB (32 or 64 bits) and run: dpkg &#8211;install XXXXX.deb (where XXXXX.deb should be the name of the downloaded file). Check if you have any dependencies requirements to fulfill, but that&#8217;s it. Pretty straight forward. Doing this, you don&#8217;t need to compile, or build your own scripts to get it started on the startup. Furthermore, you could use &#8220;<em>service sphinxsearch (start|stop|restart|status)</em>&#8221; to manage the daemon. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.angelmonticelli.com.ar/2010/03/sphinx-daemon-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Become a Google Guru</title>
		<link>http://www.angelmonticelli.com.ar/2010/02/become-a-google-guru/</link>
		<comments>http://www.angelmonticelli.com.ar/2010/02/become-a-google-guru/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 12:46:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://www.angelmonticelli.com.ar/?p=29</guid>
		<description><![CDATA[beginning of the player&#8230;


&#160;

Go to document page

end of the player&#8230;
]]></description>
			<content:encoded><![CDATA[<p>beginning of the player&#8230;
<div style="width: 100%; height: 580px; position: relative;">
<div style="background-color: rgb(234, 234, 234);"><object width="100%" height="540" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="http://staging.yellowdocuments.com/mod/yd_site/PDFToFlex.swf" name="movie"><param value="high" name="quality"><param value="siteUrl=http%3A%2F%2Fstaging.yellowdocuments.com&amp;docId=1215611&amp;embedded=1" name="flashvars"><param value="true" name="allowfullscreen"><param value="always" name="allowscriptaccess"><embed width="100%" height="540" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always" allowfullscreen="true" flashvars="siteUrl=http%3A%2F%2Fstaging.yellowdocuments.com&amp;docId=1215611&amp;embedded=1" quality="high" src="http://staging.yellowdocuments.com/mod/yd_site/PDFToFlex.swf"></object></div>
<div style="height: 27px; background-image: url(&quot;http://staging.yellowdocuments.com/mod/yd_site/img/bgplayer.gif&quot;);">&nbsp;</div>
<div style="background: url(&quot;http://mariano.servidoruno.com.ar:8280/ydoc/ydFooterLogo.png&quot;) no-repeat scroll 0pt 0pt transparent; float: left; position: absolute; left: 15px; width: 151px; height: 18px; bottom: 17px;"></div>
<div style="position: absolute; right: 5px; bottom: 15px; width: 200px; font-size: 11px; text-align: right; color: rgb(112, 109, 109);"><a style="color: rgb(112, 109, 109);" href="http://staging.yellowdocuments.com">Go to document page</a></div>
</div>
<p>end of the player&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.angelmonticelli.com.ar/2010/02/become-a-google-guru/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sphinx index and MySQL</title>
		<link>http://www.angelmonticelli.com.ar/2010/01/sphinx-index-and-mysql/</link>
		<comments>http://www.angelmonticelli.com.ar/2010/01/sphinx-index-and-mysql/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 14:29:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sphinx]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.angelmonticelli.com.ar/?p=8</guid>
		<description><![CDATA[The problem
I&#8217;ve been trying to optimize multiple MySQL databases to perform full-text searches. My first attempt was using MyISAM table engine with full-text index support (at this moment the only engine with full-text search compatibility). At the very beginning this was acceptable (performance-wise). But as soon the data on the table was growing the first issues appears.
A MyISAM full-text index operates on [...]]]></description>
			<content:encoded><![CDATA[<h2>The problem</h2>
<p>I&#8217;ve been trying to optimize multiple <strong>MySQL</strong> databases to perform full-text searches. My first attempt was using MyISAM table engine with full-text index support (at this moment the only engine with full-text search compatibility). At the very beginning this was acceptable (performance-wise). But as soon the data on the table was growing the first issues appears.</p>
<p>A MyISAM full-text index operates on a full-text collection (made up of one or more character columns from a single table). In effect, MySQL builds the index by concatenating the columns in the collection and indexing them as one long string of text.</p>
<p>One of the limitations is that unlike normal queries, the full-text search results are automatically ordered by relevance. MySQL cannot use an index for sorting when you perform a full-text search. Therefore, you shouldn’t specify an ORDER BY clause if you want to <strong>avoid a filesort</strong>.</p>
<p>On the other hand the problem with large datasets is if the whole full-text indexes doesn&#8217;t fit in memory, you will have a lot of I/O disk operations in order to find and update data into the index. MyISAM doesn&#8217;t perform well doing phase searches, because it doesn&#8217;t store the words together, in fact if you want to search for &#8220;nice cat&#8221; it should search for &#8220;nice&#8221; then &#8220;cat&#8221; and at the end sorting those results again to find those two words together, plus, if the index doesn&#8217;t fit in memory you will be in trouble.</p>
<p>As I said before, you shouldn&#8217;t use ORDER BY clause, or even worse, you shouldn&#8217;t combine full-text indexes with standard B-Tree indexes. Lets put this into an example. Suppose that we want to search for books containing &#8220;nice cat&#8221; of a given author, let say author_id = 4. In this particular case you should combine both indexes, but what MySQL will do is to use a full table scan to get the results.</p>
<h2>The solution</h2>
<p>Combining the limitations of MyISAM and the requirements of today applications a new index technique is mandatory. I&#8217;ve been looking for the right solution for my application and one of the best one was <a title="Sphinx index" href="http://www.sphinxsearch.com" target="_blank">Sphinx</a>.</p>
<p>To be continue&#8230; keep in touch!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.angelmonticelli.com.ar/2010/01/sphinx-index-and-mysql/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

