<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>ByteChemist</title>
	
	<link>http://www.bytechemist.com</link>
	<description />
	<lastBuildDate>Sun, 18 Oct 2009 22:50:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/bytechemist" /><feedburner:info uri="bytechemist" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>36.517261</geo:lat><geo:long>-121.894361</geo:long><item>
		<title>Using SCP to transfer files</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/NtURdjTF1Xg/</link>
		<comments>http://www.bytechemist.com/2009/08/13/using-scp-to-transfer-files/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:17:11 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scp]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/?p=16</guid>
		<description><![CDATA[Using SCP is a great way to transfer files from one machine to another.  SCP uses SSH and can move files to/from localhost  remotehost or remotehost  remotehost.
SCP Syntax: localhost -> remotehost

scp /path/to/source-file user@host:/path/to/destination-file

SCP Syntax: remotehost -> remotehost

scp user@src-host:/path/to/src-file user@dest-host:/path/to/dest-file

SCP Examples

scp file.txt mydomain.com:~/mydir/file.txt
&#160;
scp local_dir/filename myname@host1:remote_dir
&#160;
scp local_dir/* myname@host1:remote_dir
&#160;
scp myname@host1:remote_dir/filename .
&#160;
scp myname@host1:remote_dir/filename  myname@host2:another_dir

]]></description>
			<content:encoded><![CDATA[<p>Using SCP is a great way to transfer files from one machine to another.  SCP uses SSH and can move files to/from localhost <-> remotehost or remotehost <-> remotehost.</p>
<p><strong>SCP Syntax: localhost -> remotehost</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>source-file user<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>destination-file</pre></div></div>

<p><strong>SCP Syntax: remotehost -> remotehost</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> user<span style="color: #000000; font-weight: bold;">@</span>src-host:<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>src-file user<span style="color: #000000; font-weight: bold;">@</span>dest-host:<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>dest-file</pre></div></div>

<p><strong>SCP Examples</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> file.txt mydomain.com:~<span style="color: #000000; font-weight: bold;">/</span>mydir<span style="color: #000000; font-weight: bold;">/</span>file.txt
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> local_dir<span style="color: #000000; font-weight: bold;">/</span>filename myname<span style="color: #000000; font-weight: bold;">@</span>host1:remote_dir
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> local_dir<span style="color: #000000; font-weight: bold;">/*</span> myname<span style="color: #000000; font-weight: bold;">@</span>host1:remote_dir
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> myname<span style="color: #000000; font-weight: bold;">@</span>host1:remote_dir<span style="color: #000000; font-weight: bold;">/</span>filename .
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> myname<span style="color: #000000; font-weight: bold;">@</span>host1:remote_dir<span style="color: #000000; font-weight: bold;">/</span>filename  myname<span style="color: #000000; font-weight: bold;">@</span>host2:another_dir</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2009/08/13/using-scp-to-transfer-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2009/08/13/using-scp-to-transfer-files/</feedburner:origLink></item>
		<item>
		<title>Use cron and ntpdate to keep your linux server’s time updated</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/MuahcQgMIv4/</link>
		<comments>http://www.bytechemist.com/2009/06/25/use-cron-and-ntpdate-to-keep-your-linux-servers-time-updated/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 03:02:59 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/?p=27</guid>
		<description><![CDATA[To sync your linux server&#8217;s time with the NTP Pool Time Servers, use the following command.

ntpdate pool.ntp.org

If you&#8217;d like to sync with a time server weekly, add a new file named ntpdate-sync to /etc/cron.weekly.  Then set the file permissions to 755 and set owner:group to root:root.  Finally, exit set the file contents to [...]]]></description>
			<content:encoded><![CDATA[<p>To sync your linux server&#8217;s time with the <a href="http://support.ntp.org/bin/view/Servers/NTPPoolServers">NTP Pool Time Servers</a>, use the following command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ntpdate pool.ntp.org</pre></div></div>

<p>If you&#8217;d like to sync with a time server weekly, add a new file named ntpdate-sync to /etc/cron.weekly.  Then set the file permissions to 755 and set owner:group to root:root.  Finally, exit set the file contents to the following.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/sh</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ntpdate pool.ntp.org</pre></div></div>

<p>To sync on a custom schedule, add a new file named ntpdate-sync to /etc/cron.d.  Then set the file permissions to 644 and set owner:group to root:root.  Finally set the file contents as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/cron.d/ntpdate-sync: crontab fragment for ntpdate</span>
<span style="color: #666666; font-style: italic;"># Run ntpdate at 2:30AM on the first of every month</span>
<span style="color: #000000;">30</span> <span style="color: #000000;">2</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> root <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ntpdate <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">tee</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>ntpdate-sync.log</pre></div></div>

<p><strong>Update &#8211; 10/18/09</strong><br />
Changed custom schedule cron example from once every 15 minutes to once per month.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2009/06/25/use-cron-and-ntpdate-to-keep-your-linux-servers-time-updated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2009/06/25/use-cron-and-ntpdate-to-keep-your-linux-servers-time-updated/</feedburner:origLink></item>
		<item>
		<title>Using SVN copy to branch or tag within a repository</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/JSYw5dvfwS8/</link>
		<comments>http://www.bytechemist.com/2009/03/22/using-svn-copy-to-branch-or-tag-within-a-repository/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 19:45:44 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/?p=23</guid>
		<description><![CDATA[To &#8220;branch&#8221; or &#8220;tag&#8221; within a repository, use svn copy.  The syntax is simple.

svn copy &#123;SRC&#125; &#123;DST&#125;

The source and destination can be either a working copy path or full URL in any combination.  So to tag a revision from trunk the following command could be used.

svn copy --username myusername --password mypassword http://domain.com/svn/trunk http://domain.com/svn/tag/0.1.1332 [...]]]></description>
			<content:encoded><![CDATA[<p>To &#8220;branch&#8221; or &#8220;tag&#8221; within a repository, use svn copy.  The syntax is simple.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> copy <span style="color: #7a0874; font-weight: bold;">&#123;</span>SRC<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>DST<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>The source and destination can be either a working copy path or full URL in any combination.  So to tag a revision from trunk the following command could be used.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> copy <span style="color: #660033;">--username</span> myusername <span style="color: #660033;">--password</span> mypassword http:<span style="color: #000000; font-weight: bold;">//</span>domain.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>trunk http:<span style="color: #000000; font-weight: bold;">//</span>domain.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>tag<span style="color: #000000; font-weight: bold;">/</span>0.1.1332 <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;commit message&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2009/03/22/using-svn-copy-to-branch-or-tag-within-a-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2009/03/22/using-svn-copy-to-branch-or-tag-within-a-repository/</feedburner:origLink></item>
		<item>
		<title>SVN Clients</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/aaHLkHww_zc/</link>
		<comments>http://www.bytechemist.com/2008/10/16/svn-clients/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 00:49:29 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/?p=21</guid>
		<description><![CDATA[Mac SVN Clients


		Versions
	

		Cornerstone
	

		svnX
	

		SCPlugin
	

		Syncro SVN
	

Windows SVN Clients


		TortoiseSVN
	

]]></description>
			<content:encoded><![CDATA[<h3>Mac SVN Clients</h3>
<ul>
<li>
		<a href="http://www.versionsapp.com/">Versions</a>
	</li>
<li>
		<a href="http://www.zennaware.com/cornerstone/">Cornerstone</a>
	</li>
<li>
		<a href="http://www.lachoseinteractive.net/en/community/subversion/svnx/features/">svnX</a>
	</li>
<li>
		<a href="http://scplugin.tigris.org/">SCPlugin</a>
	</li>
<li>
		<a href="http://www.syncrosvnclient.com/">Syncro SVN</a>
	</li>
</ul>
<h3>Windows SVN Clients</h3>
<ul>
<li>
		<a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>
	</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/10/16/svn-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2008/10/16/svn-clients/</feedburner:origLink></item>
		<item>
		<title>Recover the MySQL Root Password in Linux</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/3rqmSeRE-jE/</link>
		<comments>http://www.bytechemist.com/2008/06/30/recover-the-mysql-root-password-in-linux/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 23:06:05 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/06/30/recover-the-mysql-root-password-in-linux/</guid>
		<description><![CDATA[Step 1 &#8211; At the linux shell, stop the current mysqld process, start the mysqld_safe process with &#8211;skip-grant-tables switch and login as root (no password).

/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &#38;
mysql -u root

Step 2 &#8211; At the mysql shell set the root password and flush privileges.

USE mysql;
UPDATE user SET password=PASSWORD&#40;&#34;new-password-here&#34;&#41; WHERE User='root';
FLUSH PRIVILEGES;
QUIT;

Step 3 &#8211; Back at the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Step 1</strong> &#8211; At the linux shell, stop the current mysqld process, start the mysqld_safe process with &#8211;skip-grant-tables switch and login as root (no password).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql stop
mysqld_safe <span style="color: #660033;">--skip-grant-tables</span> <span style="color: #000000; font-weight: bold;">&amp;</span>
mysql <span style="color: #660033;">-u</span> root</pre></div></div>

<p><strong>Step 2</strong> &#8211; At the mysql shell set the root password and flush privileges.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">USE</span> mysql<span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">UPDATE</span> <span style="color: #000099;">user</span> <span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #000099;">password</span><span style="color: #CC0099;">=</span><span style="color: #000099;">PASSWORD</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">&quot;new-password-here&quot;</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">WHERE</span> <span style="color: #000099;">User</span><span style="color: #CC0099;">=</span><span style="color: #008000;">'root'</span><span style="color: #000033;">;</span>
FLUSH <span style="color: #990099; font-weight: bold;">PRIVILEGES</span><span style="color: #000033;">;</span>
QUIT<span style="color: #000033;">;</span></pre></div></div>

<p><strong>Step 3</strong> &#8211; Back at the linux shell stop the mysqld_safe process and start the normal mysqld process.  At this point you should be able to successfully login as root using the password from Step 2.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql stop
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql start
mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/06/30/recover-the-mysql-root-password-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2008/06/30/recover-the-mysql-root-password-in-linux/</feedburner:origLink></item>
		<item>
		<title>Set MySQL Root Password</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/-KUKW9rxxWo/</link>
		<comments>http://www.bytechemist.com/2008/06/30/set-mysql-root-password/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 22:45:11 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/06/30/set-mysql-root-password/</guid>
		<description><![CDATA[To reset the MySQL root password, login to the mysql shell and run the following commands.

SET PASSWORD FOR root@localhost=PASSWORD&#40;'RootPasswordHere'&#41;;
FLUSH PRIVILEGES;

]]></description>
			<content:encoded><![CDATA[<p>To reset the MySQL root password, login to the mysql shell and run the following commands.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #000099;">PASSWORD</span> FOR root@localhost<span style="color: #CC0099;">=</span><span style="color: #000099;">PASSWORD</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'RootPasswordHere'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
FLUSH <span style="color: #990099; font-weight: bold;">PRIVILEGES</span><span style="color: #000033;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/06/30/set-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2008/06/30/set-mysql-root-password/</feedburner:origLink></item>
		<item>
		<title>Grant MySQL Privileges</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/Ez0n-33RMIc/</link>
		<comments>http://www.bytechemist.com/2008/06/30/grant-mysql-privileges/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 22:41:32 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/06/30/grant-mysql-privileges/</guid>
		<description><![CDATA[To grant all privileges to a user from any location login to the mysql shell and run the following queries.

GRANT ALL PRIVILEGES ON *.* TO username@localhost IDENTIFIED BY 'PasswordHere' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO username@&#34;%&#34; IDENTIFIED BY 'PasswordHere' WITH GRANT OPTION;
FLUSH PRIVILEGES;

]]></description>
			<content:encoded><![CDATA[<p>To grant all privileges to a user from any location login to the mysql shell and run the following queries.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">ALL</span> <span style="color: #990099; font-weight: bold;">PRIVILEGES</span> <span style="color: #990099; font-weight: bold;">ON</span> <span style="color: #CC0099;">*</span>.<span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">TO</span> username@localhost IDENTIFIED BY <span style="color: #008000;">'PasswordHere'</span> <span style="color: #990099; font-weight: bold;">WITH</span> <span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">OPTION</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">ALL</span> <span style="color: #990099; font-weight: bold;">PRIVILEGES</span> <span style="color: #990099; font-weight: bold;">ON</span> <span style="color: #CC0099;">*</span>.<span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">TO</span> username@<span style="color: #008000;">&quot;<span style="color: #008080; font-weight: bold;">%</span>&quot;</span> IDENTIFIED BY <span style="color: #008000;">'PasswordHere'</span> <span style="color: #990099; font-weight: bold;">WITH</span> <span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">OPTION</span><span style="color: #000033;">;</span>
FLUSH <span style="color: #990099; font-weight: bold;">PRIVILEGES</span><span style="color: #000033;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/06/30/grant-mysql-privileges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2008/06/30/grant-mysql-privileges/</feedburner:origLink></item>
		<item>
		<title>Apache Cache Control using mod_expires with Expires By Type</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/sPqFOXyQgzY/</link>
		<comments>http://www.bytechemist.com/2008/06/27/apache-cache-control-using-mod_expires-with-expires-by-type/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 17:14:54 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/06/27/apache-cache-control-using-mod_expires-with-expires-by-type/</guid>
		<description><![CDATA[Use Apache&#8217;s mod_expires to explicitly set the expiration of a file by it&#8217;s type.  This will enable to browser to cache these static assets and greatly increase performance.

&#60;IfModule mod_expires.c&#62;
    ExpiresActive on
    ExpiresDefault &#34;now&#34;
    ExpiresByType text/html &#34;now&#34;
    ExpiresByType text/xml &#34;now&#34;
    [...]]]></description>
			<content:encoded><![CDATA[<p>Use Apache&#8217;s mod_expires to explicitly set the expiration of a file by it&#8217;s type.  This will enable to browser to cache these static assets and greatly increase performance.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_expires.c<span style="color: #000000; font-weight: bold;">&gt;</span>
    ExpiresActive on
    ExpiresDefault <span style="color: #ff0000;">&quot;now&quot;</span>
    ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>html <span style="color: #ff0000;">&quot;now&quot;</span>
    ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>xml <span style="color: #ff0000;">&quot;now&quot;</span>
    ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>css <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>plain <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType application<span style="color: #000000; font-weight: bold;">/</span>x-javascript <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType application<span style="color: #000000; font-weight: bold;">/</span>x-shockwave-flash <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType application<span style="color: #000000; font-weight: bold;">/</span>pdf <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>gif <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>png <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>jpeg <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>x-icon <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType video<span style="color: #000000; font-weight: bold;">/</span>x-flv <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType video<span style="color: #000000; font-weight: bold;">/</span>quicktime <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/06/27/apache-cache-control-using-mod_expires-with-expires-by-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2008/06/27/apache-cache-control-using-mod_expires-with-expires-by-type/</feedburner:origLink></item>
		<item>
		<title>NewsGator, FeedDemon and NetNewsWire RSS Feed Readers</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/E2Y0cnIHw5s/</link>
		<comments>http://www.bytechemist.com/2008/01/12/newsgator-feeddemon-and-netnewswire-rss-feed-readers/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 16:44:44 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/01/12/newsgator-feeddemon-and-netnewswire-rss-feed-readers/</guid>
		<description><![CDATA[There are a ton a excellent desktop and web based RSS feed readers available to choose from.  My favorites by far are FeedDemon for Windows and NetNewsWire for Mac.  
The last few years I&#8217;ve been using both with NewsGator Online to read and sync my news feeds daily.  I&#8217;ve found this to [...]]]></description>
			<content:encoded><![CDATA[<p>There are a ton a excellent desktop and web based RSS feed readers available to choose from.  My favorites by far are <a href="http://www.newsgator.com/Individuals/FeedDemon/Default.aspx" title="FeedDemon Product Page">FeedDemon</a> for Windows and <a href="http://www.newsgator.com/Individuals/NetNewsWire/Default.aspx" title="NetNewsWire Product Page">NetNewsWire</a> for Mac.  </p>
<p>The last few years I&#8217;ve been using both with <a href="http://www.newsgator.com/Individuals/NewsGatorOnline/Default.aspx" title="NewsGator Online Product Page">NewsGator Online</a> to read and sync my news feeds daily.  I&#8217;ve found this to be the perfect combo, allowing me to move from one machine to the other without seeing the same news item twice.</p>
<p>Earlier this week it was <a href="http://blogs.newsgator.com/daily/2008/01/in-the-news-new.html" title="NewsGator Press Page">announced</a> that both FeedDemon and NetNewsWire would be available for <strong>FREE</strong> (previously $30 each).  If you&#8217;ve been looking for a commercial quality RSS feed reader then I highly recommend you give these a shot!</p>
<h4>NewsGator Online</h4>
<p><a href="http://www.newsgator.com/Individuals/NewsGatorOnline/Default.aspx" title="NewsGator Online Product Page"><img src='http://www.bytechemist.com/wp-content/uploads/2008/01/newsgator-online-screenshot.jpg' alt='NewsGator Online Screenshot' /></a></p>
<h4>FeedDemon</h4>
<p><a href="http://www.newsgator.com/Individuals/FeedDemon/Default.aspx" title="FeedDemon Product Page"><img src='http://www.bytechemist.com/wp-content/uploads/2008/01/feeddemon-screenshot.jpg' alt='FeedDemon Screenshot' /></a></p>
<h4>NetNewsWire</h4>
<p><a href="http://www.newsgator.com/Individuals/NetNewsWire/Default.aspx" title="NetNewsWire Product Page"><img src='http://www.bytechemist.com/wp-content/uploads/2008/01/netnewswire-screenshot.jpg' alt='NetNewsWire Screenshot' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/01/12/newsgator-feeddemon-and-netnewswire-rss-feed-readers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2008/01/12/newsgator-feeddemon-and-netnewswire-rss-feed-readers/</feedburner:origLink></item>
		<item>
		<title>Using the ternary operator in PHP</title>
		<link>http://feedproxy.google.com/~r/bytechemist/~3/OPo-7WkDKAM/</link>
		<comments>http://www.bytechemist.com/2008/01/11/using-the-ternary-operator-in-php/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 02:43:15 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/01/11/using-the-ternary-operator-in-php/</guid>
		<description><![CDATA[The ternary operator is an excellent and often underutilized way to quickly evaluate a variable in place of an if/else statement.  The syntax is clean and can greatly simplify code.

&#40; expr1 &#41; ? &#40; expr2 &#41; : &#40; expr3 &#41;

Take the following code for example where we determine how to greet a user.

&#60;?php
  [...]]]></description>
			<content:encoded><![CDATA[<p>The ternary operator is an excellent and often underutilized way to quickly evaluate a variable in place of an if/else statement.  The syntax is clean and can greatly simplify code.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#40;</span> expr1 <span style="color: #009900;">&#41;</span> ? <span style="color: #009900;">&#40;</span> expr2 <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span> expr3 <span style="color: #009900;">&#41;</span></pre></div></div>

<p>Take the following code for example where we determine how to greet a user.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Guest&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The code above is simple enough but let&#8217;s see how we can improve it by refactoring using a ternary operator.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Guest&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>Update 1:</strong> There is a <a href="http://php.dzone.com/news/php-shorthand-if-else-examples">great collection</a> of examples over at dzone.</p>
<p><strong>Update 2:</strong> Found another nice <a href="http://php.dzone.com/news/tips-tricks-learning-ternary-o">tips and tricks</a> post over at dzone.</p>
<p><strong>Update 3:</strong> One more to <a href="http://mikebernat.com/blog/The_Ternary_Operator">check out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/01/11/using-the-ternary-operator-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bytechemist.com/2008/01/11/using-the-ternary-operator-in-php/</feedburner:origLink></item>
	</channel>
</rss>
