<?xml version="1.0" encoding="utf-8"?>
	<rss version="2.0"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		xmlns:admin="http://webns.net/mvcb/"
		xmlns:atom="http://www.w3.org/2005/Atom"
		xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
		xmlns:content="http://purl.org/rss/1.0/modules/content/">
		<channel>
			<title>[CWH] Code Snips</title>
			<link>http://www.crucialwebhost.com/code//</link>
			<description>Ready To Split-Shared Hosting?</description>
			<dc:language>en-us</dc:language>
			<dc:creator>code@crucialwebhost.com</dc:creator>
			<dc:rights>Copyright 2010</dc:rights>
			<dc:date>2010-02-02T10:29:15+00:00</dc:date>
			<atom:link href="http://www.crucialwebhost.com/feeds/code/" rel="self" type="application/rss+xml" />
			
				<item>
					<title>Block IP Address</title>
					<link>http://www.crucialwebhost.com/code/block-ip-address/</link>
					<guid>http://www.crucialwebhost.com/code/block-ip-address/#When:10:29:15Z</guid>
					<description>iptables &#45;I INPUT &#45;s 25.22.22.22 &#45;j DROP</description>
					<dc:date>2010-02-02T10:29:15+00:00</dc:date>
				</item>
			
				<item>
					<title>Validate Email Address With JavaScript</title>
					<link>http://www.crucialwebhost.com/code/validate-email-address-with-javascript/</link>
					<guid>http://www.crucialwebhost.com/code/validate-email-address-with-javascript/#When:13:00:14Z</guid>
					<description>/^&#40;&#40;&#40;&#91;a&#45;z&#93;|d|&#91;!#$%&amp;amp;&#39;*+&#45;/=?^_`{|}~]|[u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF])+(.([a&#45;z]|d|[!#$%&amp;amp;&#39;*+&#45;/=?^_`&#123;|&#125;~&#93;|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;+&#41;*&#41;|&#40;&#40;x22&#41;&#40;&#40;&#40;&#40;x20|x09&#41;*&#40;x0dx0a&#41;&#41;?&#40;x20|x09&#41;+&#41;?&#40;&#40;&#91;x01&#45;x08x0bx0cx0e&#45;x1fx7f&#93;|x21|&#91;x23&#45;x5b&#93;|&#91;x5d&#45;x7e&#93;|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;|&#40;\&#40;&#91;x01&#45;x09x0bx0cx0d&#45;x7f&#93;|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;&#41;&#41;&#41;*&#40;&#40;&#40;x20|x09&#41;*&#40;x0dx0a&#41;&#41;?&#40;x20|x09&#41;+&#41;?&#40;x22&#41;&#41;&#41;@&#40;&#40;&#40;&#91;a&#45;z&#93;|d|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;|&#40;&#40;&#91;a&#45;z&#93;|d|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;&#40;&#91;a&#45;z&#93;|d|&#45;|.|_|~|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;*&#40;&#91;a&#45;z&#93;|d|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;&#41;&#41;.&#41;+&#40;&#40;&#91;a&#45;z&#93;|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;|&#40;&#40;&#91;a&#45;z&#93;|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;&#40;&#91;a&#45;z&#93;|d|&#45;|.|_|~|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;*&#40;&#91;a&#45;z&#93;|&#91;u00A0&#45;uD7FFuF900&#45;uFDCFuFDF0&#45;uFFEF&#93;&#41;&#41;&#41;.?$/i</description>
					<dc:date>2010-01-08T13:00:14+00:00</dc:date>
				</item>
			
				<item>
					<title>Find Duplicate MySQL Records</title>
					<link>http://www.crucialwebhost.com/code/find-duplicate-mysql-records/</link>
					<guid>http://www.crucialwebhost.com/code/find-duplicate-mysql-records/#When:12:52:27Z</guid>
					<description>SELECT email, count&#40;email&#41; AS total FROM `tbl_mailing_list` GROUP BY email HAVING total &amp;gt; 1 ORDER BY total;</description>
					<dc:date>2009-12-16T12:52:27+00:00</dc:date>
				</item>
			
				<item>
					<title>Embed Audio Using The Audio Tag</title>
					<link>http://www.crucialwebhost.com/code/embed-audio-using-the-audio-tag/</link>
					<guid>http://www.crucialwebhost.com/code/embed-audio-using-the-audio-tag/#When:18:34:46Z</guid>
					<description>&amp;lt;audio controls autoplay autobuffer src=&amp;quot;song.mp3&amp;quot;&amp;gt;&amp;lt;/audio&amp;gt;</description>
					<dc:date>2009-12-07T18:34:46+00:00</dc:date>
				</item>
			
				<item>
					<title>Import MySQL Dump</title>
					<link>http://www.crucialwebhost.com/code/import-mysql-dump/</link>
					<guid>http://www.crucialwebhost.com/code/import-mysql-dump/#When:21:27:27Z</guid>
					<description>mysql &#45;h DBHOST &#45;u DBUSER &#45;pDBPASS DBNAME &amp;lt; dump.sql
Replace text in uppercase with the appropriate information:

    DBHOST &#45; Database hostname, usually localhost
    DBUSER &#45; User with privileges to the database
    DBPASS &#45; Password for the user
    DBNAME &#45; Database name</description>
					<dc:date>2009-12-04T21:27:27+00:00</dc:date>
				</item>
			
				<item>
					<title>Google API jQuery Include</title>
					<link>http://www.crucialwebhost.com/code/google-api-jquery-include/</link>
					<guid>http://www.crucialwebhost.com/code/google-api-jquery-include/#When:21:19:27Z</guid>
					<description>&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
    $&#40;function&#40;&#41; &#123;
&amp;nbsp;
    &#125;&#41;;
&amp;lt;/script&amp;gt;</description>
					<dc:date>2009-12-04T21:19:27+00:00</dc:date>
				</item>
			
				<item>
					<title>Print Active Connections To Port 80 Per IP Address</title>
					<link>http://www.crucialwebhost.com/code/print-active-connections-to-port-80-per-ip-address/</link>
					<guid>http://www.crucialwebhost.com/code/print-active-connections-to-port-80-per-ip-address/#When:20:10:53Z</guid>
					<description>netstat &#45;plan | grep :80 | grep &#45;E &amp;quot;(EST|LIST)&amp;quot; | awk &#123;&#39;print $5&#39;&#125; | cut &#45;d: &#45;f 1 | sort | uniq &#45;c | sort &#45;nk 1</description>
					<dc:date>2009-12-04T20:10:53+00:00</dc:date>
				</item>
			
				<item>
					<title>Send Email From Shell</title>
					<link>http://www.crucialwebhost.com/code/send-email-from-shell/</link>
					<guid>http://www.crucialwebhost.com/code/send-email-from-shell/#When:20:08:18Z</guid>
					<description>mail &#45;s &amp;quot;Subject&amp;quot; email@address.com &amp;lt; message.txt</description>
					<dc:date>2009-12-04T20:08:18+00:00</dc:date>
				</item>
			
				<item>
					<title>Install CSF (Firewall) And LFD (Log File Daemon)</title>
					<link>http://www.crucialwebhost.com/code/install-csf-firewall-and-lfd-log-file-daemon/</link>
					<guid>http://www.crucialwebhost.com/code/install-csf-firewall-and-lfd-log-file-daemon/#When:20:00:12Z</guid>
					<description>cd /usr/src/
wget http://www.configserver.com/free/csf.tgz
tar &#45;xzf csf.tgz
cd csf
sh install.sh</description>
					<dc:date>2009-12-04T20:00:12+00:00</dc:date>
				</item>
			
				<item>
					<title>Show Process CPU Usage</title>
					<link>http://www.crucialwebhost.com/code/show-process-cpu-usage/</link>
					<guid>http://www.crucialwebhost.com/code/show-process-cpu-usage/#When:19:56:20Z</guid>
					<description>Display how much CPU a process is using:
ps &#45;eo pcpu,pid &#45;o comm= | sort &#45;k1 &#45;n &#45;r | head &#45;1
For example, show top five CPU using processes:
ps &#45;eo pcpu,pid &#45;o comm= | sort &#45;k1 &#45;n &#45;r | head &#45;5
Which will output the following:
0.6 24458 bash
0.3 24457 cphulkd.pl
0.2  7704 php5
0.1  7706 php5
0.1  7705 php5</description>
					<dc:date>2009-12-04T19:56:20+00:00</dc:date>
				</item>
			
				<item>
					<title>Show Each Process Memory Usage</title>
					<link>http://www.crucialwebhost.com/code/show-each-process-memory-usage/</link>
					<guid>http://www.crucialwebhost.com/code/show-each-process-memory-usage/#When:19:50:23Z</guid>
					<description>ps axu
Show full command in ps display:
ps axu &#45;&#45;width=500</description>
					<dc:date>2009-12-04T19:50:23+00:00</dc:date>
				</item>
			
				<item>
					<title>HTML5 Starter Page</title>
					<link>http://www.crucialwebhost.com/code/html5-starter-page/</link>
					<guid>http://www.crucialwebhost.com/code/html5-starter-page/#When:16:53:48Z</guid>
					<description>&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang=&amp;quot;en&#45;us&amp;quot;&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;utf&#45;8&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;My Site&amp;lt;/title&amp;gt;
    &amp;lt;!&#45;&#45;[if lte IE 8]&amp;gt;
      &amp;lt;script src=&amp;quot;http://js.cwhcode.com/html5/&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;![endif]&#45;&#45;&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;section&amp;gt;
      &amp;lt;header role=&amp;quot;banner&amp;quot;&amp;gt;
        &amp;lt;hgroup&amp;gt;
          &amp;lt;h1&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;My Site&amp;lt;/a&amp;gt;&amp;lt;/h1&amp;gt;
          &amp;lt;h2&amp;gt;Tagline&amp;lt;/h2&amp;gt;
        &amp;lt;/hgroup&amp;gt;
        &amp;lt;nav&amp;gt;
          &amp;lt;ul role=&amp;quot;navigation&amp;quot;&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
          &amp;lt;/ul&amp;gt;
        &amp;lt;/nav&amp;gt;
      &amp;lt;/header&amp;gt;
      &amp;lt;article role=&amp;quot;main&amp;quot;&amp;gt;
        &amp;lt;header&amp;gt;
          &amp;lt;h3&amp;gt;Article Title&amp;lt;/h3&amp;gt;
          &amp;lt;time datetime=&amp;quot;2010&#45;04&#45;20&amp;quot;&amp;gt;April, 20, 2010&amp;lt;/time&amp;gt;
        &amp;lt;/header&amp;gt;
        &amp;lt;section&amp;gt;
          &amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit.&amp;lt;/p&amp;gt;
        &amp;lt;/section&amp;gt;
      &amp;lt;/article&amp;gt;
      &amp;lt;aside&amp;gt;
        &amp;lt;h4&amp;gt;Sidebar Heading&amp;lt;/h4&amp;gt;
        &amp;lt;ul&amp;gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
          &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
      &amp;lt;/aside&amp;gt;
      &amp;lt;footer&amp;gt;Copyright &amp;amp;copy; 2010 My Site. All Rights Reserved.&amp;lt;/footer&amp;gt;
    &amp;lt;/section&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;</description>
					<dc:date>2009-12-04T16:53:48+00:00</dc:date>
				</item>
			
				<item>
					<title>CSS Debug</title>
					<link>http://www.crucialwebhost.com/code/css-debug/</link>
					<guid>http://www.crucialwebhost.com/code/css-debug/#When:16:33:44Z</guid>
					<description>* &#123; outline:2px dotted red &#125;
* * &#123; outline:2px dotted green &#125;
* * * &#123; outline:2px dotted orange &#125;
* * * * &#123; outline:2px dotted blue &#125;
* * * * * &#123; outline:1px solid red &#125;
* * * * * * &#123; outline:1px solid green &#125;
* * * * * * * &#123; outline:1px solid orange &#125;
* * * * * * * * &#123; outline:1px solid blue &#125;</description>
					<dc:date>2009-12-04T16:33:44+00:00</dc:date>
				</item>
			
				<item>
					<title>Create A MySQL User</title>
					<link>http://www.crucialwebhost.com/code/create-a-mysql-user/</link>
					<guid>http://www.crucialwebhost.com/code/create-a-mysql-user/#When:15:05:38Z</guid>
					<description>GRANT ALL PRIVILEGES ON `db_name.table_name` &#40;or .*&#41; TO &#39;username&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;password&#39;;</description>
					<dc:date>2009-12-04T15:05:38+00:00</dc:date>
				</item>
			
				<item>
					<title>MySQL Find And Replace</title>
					<link>http://www.crucialwebhost.com/code/mysql-find-and-replace/</link>
					<guid>http://www.crucialwebhost.com/code/mysql-find-and-replace/#When:15:03:10Z</guid>
					<description>UPDATE `tbl_name` SET tbl_field = replace&#40;tbl_field, &#39;FIND&#39;, &#39;REPLACE&#39;&#41;;</description>
					<dc:date>2009-12-04T15:03:10+00:00</dc:date>
				</item>
			
		</channel>
	</rss>