<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Tips and Tricks on Justin Carmony</title>
		<link>https://www.justincarmony.com/tags/tips-and-tricks/</link>
		<description>Recent content in Tips and Tricks on Justin Carmony</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sat, 14 Jan 2012 02:24:49 +0000</lastBuildDate>
		
			<atom:link href="https://www.justincarmony.com/tags/tips-and-tricks/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Debugging Nginx Configuration Trick</title>
				<link>https://www.justincarmony.com/2012/01/14/debugging-nginx-configuration-trick/</link>
				<pubDate>Sat, 14 Jan 2012 02:24:49 +0000</pubDate>
				<guid>https://www.justincarmony.com/2012/01/14/debugging-nginx-configuration-trick/</guid>
				<description>&lt;p&gt;Today I had an issue where I was trying to debug a problem with an &lt;a href=&#34;http://nginx.org/&#34;&gt;nginx&lt;/a&gt; configuration, I came up with a simple trick. One of the hardest parts of nginx configurations, especially with rewrites, is you might not know which &amp;ldquo;location&amp;rdquo; directive is not working as expected.&lt;/p&gt;&#xA;&lt;p&gt;In PHP, sometimes you would just add something like this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;I&amp;#39;m here!&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, in Nginx configuration files, it isn&amp;rsquo;t as easy&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&amp;hellip; or is it?&lt;/p&gt;</description>
			</item>
			<item>
				<title>PHP Workers with Redis &amp; Solo</title>
				<link>https://www.justincarmony.com/2012/01/10/php-workers-with-redis-solo/</link>
				<pubDate>Tue, 10 Jan 2012 18:20:10 +0000</pubDate>
				<guid>https://www.justincarmony.com/2012/01/10/php-workers-with-redis-solo/</guid>
				<description>&lt;p&gt;I&amp;rsquo;ve come across an awesome combination of tools for managing PHP Workers, and thought I&amp;rsquo;d share.&lt;/p&gt;&#xA;&lt;h3 id=&#34;why-workers&#34;&gt;Why Workers?&lt;/h3&gt;&#xA;&lt;p&gt;Sometimes there are situations when you want to parallel process things. Other times you might have a list of tasks to accomplish, and you don&amp;rsquo;t want to make the user wait after pressing a button. This is where &amp;ldquo;Workers&amp;rdquo; can come in. They are independent scripts that run along side of your application, performing tasks, or &amp;ldquo;jobs.&amp;rdquo;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Siege with User Authentication</title>
				<link>https://www.justincarmony.com/2011/11/03/siege-with-user-login/</link>
				<pubDate>Thu, 03 Nov 2011 16:33:02 +0000</pubDate>
				<guid>https://www.justincarmony.com/2011/11/03/siege-with-user-login/</guid>
				<description>&lt;p&gt;If you want to stress test your application, the quickest and best way to do so is with &lt;a href=&#34;http://www.joedog.org/index/siege-home&#34;&gt;siege&lt;/a&gt;. From the siege website:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Siege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of simulated web browsers. Those browsers place the server &amp;ldquo;under siege.&amp;rdquo;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Simple Trick: History Command</title>
				<link>https://www.justincarmony.com/2011/05/31/simple-trick-history-command/</link>
				<pubDate>Tue, 31 May 2011 21:05:08 +0000</pubDate>
				<guid>https://www.justincarmony.com/2011/05/31/simple-trick-history-command/</guid>
				<description>&lt;p&gt;So today I quickly installed Redis on a server, and I wanted to keep a copy of all the commands I had used to do so. I knew there was a better way than hitting the up arrow each time to copy and paste each command in reverse order. So after some Googling, I found out about the history command. So I was able to type the command &amp;ldquo;history&amp;rdquo; and it showed me the last two thousand or so commands I had used. I was able to copy and paste that into a wiki, and was good to go. You could also search your history by piping the history command to grep. Cool stuff I don&amp;rsquo;t want to forget.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Restoring Large MySQL Dump - 900 Million Rows</title>
				<link>https://www.justincarmony.com/2011/04/07/restoring-large-mysql-dump-900-million-rows/</link>
				<pubDate>Thu, 07 Apr 2011 03:05:12 +0000</pubDate>
				<guid>https://www.justincarmony.com/2011/04/07/restoring-large-mysql-dump-900-million-rows/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://www.justincarmony.com/images/wp/2011/04/mysql-logo2.png&#34;&gt;&lt;img src=&#34;https://www.justincarmony.com/images/wp/2011/04/mysql-logo2.png&#34; alt=&#34;&#34; title=&#34;mysql-logo2&#34;&gt;&lt;/a&gt;This last weekend I had a fun opportunity of restoring roughly 912 Million Rows to a database. 902 Million belonged to one single table (902,966,645 rows, to be exact). To give an idea of growth, &lt;a href=&#34;https://www.justincarmony.com/2009/01/12/mysql-40-million-rows-myisam-innodb/&#34;&gt;the last time I blogged&lt;/a&gt; about this database we had about 40 million rows. This giant table, the &amp;ldquo;Scores&amp;rdquo; table, is has a very small schema: two ints, a tiny int, and a DECIMAL(5,2).&lt;/p&gt;&#xA;&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;&#xA;&lt;p&gt;Our current backup system uses mysqldump. It dumps a 25 GB sql dump file, which compresses to about 2.5GB using gzip. The last time we needed to restore a backup it was only about 9GB, and it took several hours.&lt;/p&gt;</description>
			</item>
			<item>
				<title>PHP, Nginx, and Output Flushing</title>
				<link>https://www.justincarmony.com/2011/01/25/php-nginx-and-output-flushing/</link>
				<pubDate>Tue, 25 Jan 2011 04:01:00 +0000</pubDate>
				<guid>https://www.justincarmony.com/2011/01/25/php-nginx-and-output-flushing/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://www.justincarmony.com/images/wp/2011/01/nginx-logo.png&#34;&gt;&lt;img src=&#34;https://www.justincarmony.com/images/2011/01/nginx-logo-300x77.png&#34; alt=&#34;&#34; title=&#34;nginx-logo&#34;&gt;&lt;/a&gt;Alright, so one of the few hangups I&amp;rsquo;ve ran into with moving from &lt;a href=&#34;http://httpd.apache.org/&#34;&gt;Apache&lt;/a&gt; to &lt;a href=&#34;http://nginx.org/&#34;&gt;Nginx&lt;/a&gt; was output buffering. Now, we have a few administrative tools we use to perform large operations on our library and data. These scripts can take normally 3-5 minutes to run, and they output their progress and what step they are on as they run. The way they do this is after ever step in PHP I issue the same two commands:&lt;/p&gt;</description>
			</item>
			<item>
				<title>jQuery UI - Disable Title On Dialog</title>
				<link>https://www.justincarmony.com/2010/09/16/jquery-ui-disable-title-on-dialog/</link>
				<pubDate>Thu, 16 Sep 2010 05:56:35 +0000</pubDate>
				<guid>https://www.justincarmony.com/2010/09/16/jquery-ui-disable-title-on-dialog/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://www.justincarmony.com/images/wp/2010/09/jquery-ui-logo.png&#34;&gt;&lt;img src=&#34;https://www.justincarmony.com/images/wp/2010/09/jquery-ui-logo.png&#34; alt=&#34;&#34; title=&#34;jquery-ui-logo&#34;&gt;&lt;/a&gt;For some reason, this was turning out to be kind of hard to accomplish, and everyone on the internet wanted to do it with JavaScript hacks. My issue was if the JavaScript hack didn&amp;rsquo;t execute fast enough, causing the title to flash for just a second, so I&amp;rsquo;d much rather do it with CSS. Unfortunately, there are no built in ways to hide it in jQuery. However, there is an option you can pass in the &lt;strong&gt;.dialog()&lt;/strong&gt; method: &lt;strong&gt;dialogClass&lt;/strong&gt;. This places a custom class in the main div element, allowing you to do something like this:&lt;/p&gt;</description>
			</item>
			<item>
				<title>VirtualBox Networking Setup</title>
				<link>https://www.justincarmony.com/2010/03/22/virtualbox-networking-setup/</link>
				<pubDate>Mon, 22 Mar 2010 06:32:43 +0000</pubDate>
				<guid>https://www.justincarmony.com/2010/03/22/virtualbox-networking-setup/</guid>
				<description>&lt;p&gt;Every time I go to set up VirtualBox and several VMs I always forget how I setup the networking for them. Once again, I went through the pain of trying to figure it all out, so I might as well document it for future use.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-problem&#34;&gt;The Problem&lt;/h3&gt;&#xA;&lt;p&gt;When creating virtual machines, especially virtual linux servers, I want them to be able to do the following things:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Connect to the Internet&lt;/li&gt;&#xA;&lt;li&gt;Connect over SSH from my Host Machine to the Guest Machine&lt;/li&gt;&#xA;&lt;li&gt;Have the servers connect to each other on a private internal network&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Out of the box, a VM is configured for #1, however it cannot do #2 and #3. There are some solutions that do some &lt;a href=&#34;http://mydebian.blogdns.org/?p=148&#34;&gt;archaic port forwarding&lt;/a&gt; by issuing special commands from the Terminal. This is just painful, and if you just want &lt;em&gt;&lt;strong&gt;one&lt;/strong&gt;&lt;/em&gt; port to work, that&amp;rsquo;s manageable, but what if you want ssh, ftp, myql, http, https, etc? Any on multiple VMs? What a nightmare! What is painful is when googling for a solution, almost &lt;em&gt;&lt;strong&gt;every&lt;/strong&gt;&lt;/em&gt; &amp;ldquo;answer&amp;rdquo; is this crazy port forwarding method. There is a much cleaner, better way!&lt;/p&gt;</description>
			</item>
			<item>
				<title>Presentation: Real Life Scaling</title>
				<link>https://www.justincarmony.com/2009/10/11/presentation-real-life-scaling/</link>
				<pubDate>Sun, 11 Oct 2009 18:39:44 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/10/11/presentation-real-life-scaling/</guid>
				<description>&lt;p&gt;Here are my slides for the presentation that I gave at the Utah Open Source Conference on Friday. It was an awesome conference, and I am glad that I was able to be involved.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.slideshare.net/JustinCarmony/real-life-scaling-a-tale-of-two-websites&#34; title=&#34;Real Life Scaling: A Tale of Two Websites&#34;&gt;Real Life Scaling: A Tale of Two Websites&lt;/a&gt;&lt;a href=&#34;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=reallifescaling-ataleoftwowebsites-small-091010143045-phpapp02&amp;amp;stripped_title=real-life-scaling-a-tale-of-two-websites&#34;&gt;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=reallifescaling-ataleoftwowebsites-small-091010143045-phpapp02&amp;amp;stripped_title=real-life-scaling-a-tale-of-two-websites&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;View more &lt;a href=&#34;http://www.slideshare.net/&#34;&gt;presentations&lt;/a&gt; from &lt;a href=&#34;http://www.slideshare.net/JustinCarmony&#34;&gt;Justin Carmony&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If you have any questions or comments, please feel free to leave them below.&lt;/p&gt;</description>
			</item>
			<item>
				<title>My New External Hard Drive: Blacx &#43; 1TB Drive</title>
				<link>https://www.justincarmony.com/2009/09/26/my-new-external-hard-drive-blacx-1tb-drive/</link>
				<pubDate>Sat, 26 Sep 2009 18:03:10 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/09/26/my-new-external-hard-drive-blacx-1tb-drive/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;https://www.justincarmony.com/images/2009/09/blacx-300x236.jpg&#34; alt=&#34;blacx&#34; title=&#34;blacx&#34;&gt;These last few weeks I&amp;rsquo;ve been dealing with larger and larger sets of data that I would need to download to my PC to work on. When working with multiple copies of data that are 10-20 GBs each, it started to fill up my two HDDs very quickly. I decided I need to go buy a new hard drive to give me plenty of room. The question was &amp;ldquo;internal&amp;rdquo; or &amp;ldquo;external&amp;rdquo; and how big.&lt;/p&gt;</description>
			</item>
			<item>
				<title>&#34;Nerfing&#34; a PHP Object</title>
				<link>https://www.justincarmony.com/2009/09/20/nerfing-a-php-object/</link>
				<pubDate>Sun, 20 Sep 2009 18:26:35 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/09/20/nerfing-a-php-object/</guid>
				<description>&lt;p&gt;I was trying to think of something with PHP I could blog about that would be short and sweet. Then I thought of something that a good friend of my taught me: &lt;strong&gt;nerfing objects&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Many times while working with PHP and bigger frameworks, you&amp;rsquo;ll have classes that extend classes that extand classes. We have an &lt;a href=&#34;http://en.wikipedia.org/wiki/Object-relational_mapping&#34;&gt;ORM system&lt;/a&gt; that interfaces our Database with PHP classes. This makes accessing and updating information easy for us. So lets say we have a class called &amp;ldquo;Post&amp;rdquo; that stores a blog post. Our ORM class just takes a few lines of code to hook up our &amp;ldquo;Post&amp;rdquo; class to the &amp;ldquo;posts&amp;rdquo; database tables. We just extend our base DataObject, which contains all sorts of references to other class isntances. Long story short, this PHP code is awesome, but there is one issue.&lt;/p&gt;</description>
			</item>
			<item>
				<title>jQuery Tip: Better Toggle</title>
				<link>https://www.justincarmony.com/2009/09/15/jquery-tip-better-toggle/</link>
				<pubDate>Tue, 15 Sep 2009 18:28:05 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/09/15/jquery-tip-better-toggle/</guid>
				<description>&lt;p&gt;For many web developers, &lt;a href=&#34;http://jquery.com/&#34; title=&#34;jQuery JavaScript &#34;&gt;jQuery&lt;/a&gt; is the most awesome JavaScript library out there. For me, it has turned JavaScript from being a nightmare into a power tool. I love JavaScript now, where as before I truely hated it. Takes all the hassel out of &lt;em&gt;most&lt;/em&gt; compatibility issues across browsers. I spend less time debuging it and more time writing it. While I&amp;rsquo;m on my goal to write more blog posts, I&amp;rsquo;m going to share a few jQuery tricks.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Memcached: Simple, Effective, and Powerful</title>
				<link>https://www.justincarmony.com/2009/05/20/memcached-simple-effective-and-powerful/</link>
				<pubDate>Wed, 20 May 2009 16:12:01 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/05/20/memcached-simple-effective-and-powerful/</guid>
				<description>&lt;p&gt;Realizing once again I haven&amp;rsquo;t written a blog post for quite some time, I thought I would just write a few smaller posts on things I&amp;rsquo;ve learned these last few months. Hopefully I can get back into the habit of blogging regularly again.&lt;/p&gt;&#xA;&lt;p&gt;This last month I finally broke down and learned how to use &lt;a href=&#34;http://www.danga.com/memcached/&#34;&gt;memcached&lt;/a&gt;.  While I have known about memcached for a very long time, I just never got around to using it. While I heard it was beyond easy to implement, I still assumed it would take a few days to get the hang of it and figure out its quirks. However, when the forces of high load on a webserver and the file-based caching system that I have previously used were found to be too I/O intensive, I had no choice but to take the plunge.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Recursively Add New Files to SVN</title>
				<link>https://www.justincarmony.com/2009/02/20/recursively-add-new-files-to-svn/</link>
				<pubDate>Fri, 20 Feb 2009 16:51:33 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/02/20/recursively-add-new-files-to-svn/</guid>
				<description>&lt;p&gt;One great thing about running Windows is TortoiseSVN. I makes managing my SVN so easy. One of the problems I&amp;rsquo;ve ran into on other systems was I had been working for several hours. I would have dozens of new files and with TortoiseSVN it would show me a list of all the new files and I could hit &amp;ldquo;select all&amp;rdquo; and commit. However, on Mac I haven&amp;rsquo;t found an SVN client that I like, so I just use the terminal commands. There are also times, like when managing a WordPress installation, that WordPress and its plug-ins could auto update. I wanted to be able to add all the new files on the linux server back into the svn.&lt;/p&gt;</description>
			</item>
			<item>
				<title>List of 50 PHP Tools</title>
				<link>https://www.justincarmony.com/2009/01/21/list-of-50-php-tools/</link>
				<pubDate>Wed, 21 Jan 2009 18:08:58 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/01/21/list-of-50-php-tools/</guid>
				<description>&lt;p&gt;Found a &lt;a href=&#34;http://www.smashingmagazine.com/2009/01/20/50-extremely-useful-php-tools/&#34;&gt;great article&lt;/a&gt; listing popular tools that every PHP developer should be away of. Here is an excerpt:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt; is one of the most widely used open-source server-side scripting languages that exist today. With over 20 million indexed domains using PHP, including major websites like Facebook, Digg and WordPress, there are good reasons why many Web developers prefer it to other server-side scripting languages, such as Python and Ruby.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&amp;amp;lang=php&amp;amp;lang2=ruby&#34;&gt;PHP is faster&lt;/a&gt; (&lt;em&gt;updated&lt;/em&gt;), and it is &lt;a href=&#34;http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html&#34;&gt;the most used scripting language&lt;/a&gt; in practice; it has detailed documentation, a huge community, numerous ready-to-use scripts and well-supported frameworks; and most importantly, it’s much easier to get started with PHP than with other scripting languages (Python, for example). That’s why it makes perfect sense to provide the huge community of PHP developers with an overview of useful tools and resources that can make their development process easier and more effective.&lt;/p&gt;</description>
			</item>
			<item>
				<title>MySQL, 40 Million Rows, MyISAM to InnoDB, 45 Minutes</title>
				<link>https://www.justincarmony.com/2009/01/13/mysql-40-million-rows-myisam-innodb/</link>
				<pubDate>Tue, 13 Jan 2009 05:13:08 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/01/13/mysql-40-million-rows-myisam-innodb/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://www.justincarmony.com/images/wp/2009/01/logo_mysql.png&#34;&gt;&lt;img src=&#34;https://www.justincarmony.com/images/2009/01/logo_mysql-296x300.png&#34; alt=&#34;&#34; title=&#34;logo_mysql&#34;&gt;&lt;/a&gt;&lt;em&gt;&lt;strong&gt;Warning: This blog post is NOT a walk-through or tutorial. If you don&amp;rsquo;t know what you&amp;rsquo;re doing, you could seriously screw up your database. This is just talking theory and ideas on how I solved my problem.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The other night (really, the other morning) I had the wonderful pleasure of trying to convert a table with 40 millions from MyISAM to InnoDB. The reason for the conversion was this table had a high amount of queries, and a high amount of writes. With this table growing and updating daily, the table locks were killing us. Because MyISAM needs to peform a lock on the entire table, we would have dozens of queries backlog as locks and writes were taking place. It was causing the site to screech to a halt, waiting for the locks the be released. It was a total nightmare.&lt;/p&gt;</description>
			</item>
			<item>
				<title>CSS – I’m 100% Converted</title>
				<link>https://www.justincarmony.com/2009/01/08/css-im-100-converted/</link>
				<pubDate>Thu, 08 Jan 2009 06:01:35 +0000</pubDate>
				<guid>https://www.justincarmony.com/2009/01/08/css-im-100-converted/</guid>
				<description>&lt;p&gt;It has been a hard, long road. But these last few days, I&amp;rsquo;ve finally have reached a realization of a great step in my life as a web design: I&amp;rsquo;m 100% converted to CSS layouts, and have forsaken tables. 5 years ago I would have believed that would be impossible, and that I would love and use tables for my layouts until the day I die. I remember hearing the lectures and heated discussions on using CSS instead, but I couldn&amp;rsquo;t bring myself to using CSS for layouts. Don&amp;rsquo;t get me wrong, using CSS was amazing for &lt;strong&gt;formatting&lt;/strong&gt; and &lt;strong&gt;styling&lt;/strong&gt;, such a color, size, bolding, etc. I love it every second and my conversion to CSS for those scenarios was very quick. However, the positioning of content, headers, footers, side menus and navigation was a nightmare for me at first. I just didn&amp;rsquo;t get it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>PHP Singletons, Sub-Classing, and HAS-A Relationships</title>
				<link>https://www.justincarmony.com/2008/12/03/php-singletons-sub-classing-and-has-a-relationships/</link>
				<pubDate>Wed, 03 Dec 2008 06:37:53 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/12/03/php-singletons-sub-classing-and-has-a-relationships/</guid>
				<description>&lt;p&gt;I&amp;rsquo;ve been very busy these last fews weeks and have neglected making any posts. While there are a variety of subjects I&amp;rsquo;d love to post about, they&amp;rsquo;ll most likely have to wait until the next year. However, I thought I might be able to throw up a quick example of how to use PHP Singletons and extending public classes.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;http://en.wikipedia.org/wiki/Singleton_pattern#PHP_5&#34;&gt;Singleton Pattern&lt;/a&gt; &amp;ldquo;is a &lt;a href=&#34;http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29&#34; title=&#34;Design pattern (computer science)&#34;&gt;design pattern&lt;/a&gt; that is used to restrict &lt;a href=&#34;http://en.wikipedia.org/wiki/Instantiation_%28computer_science%29&#34; title=&#34;Instantiation (computer science)&#34;&gt;instantiation&lt;/a&gt; of a class to one &lt;a href=&#34;http://en.wikipedia.org/wiki/Object-oriented_programming&#34; title=&#34;Object-oriented programming&#34;&gt;object&lt;/a&gt;.&amp;rdquo; (Wikipedia) In PHP, a singleton is created by making the constructor protected or private. &amp;ldquo;How do you create an object then?&amp;rdquo; Its done in two parts. First, you make a static class variable that is private, to hold the instance. Second, create a static function to return the instance. Here is an example:&lt;/p&gt;</description>
			</item>
			<item>
				<title>MySQL - Does Table Exist w/o Throwing Errors</title>
				<link>https://www.justincarmony.com/2008/11/04/mysql-does-table-exist-wo-throwing-errors/</link>
				<pubDate>Tue, 04 Nov 2008 00:34:33 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/11/04/mysql-does-table-exist-wo-throwing-errors/</guid>
				<description>&lt;p&gt;There are times where you would like to know if a table exists before executing an query. Most solutions require having MySQL throw an error saying &amp;ldquo;table does not exist,&amp;rdquo; but I prefer a cleaner way. I found on this forum post a clean way to do it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;/* example with table name: table_name */&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;SHOW&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TABLES&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;LIKE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;table_name&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This solution will return 1 row if it exists, and 0 rows if it doesn&amp;rsquo;t. Here is a PHP example using this:&lt;/p&gt;</description>
			</item>
			<item>
				<title>PHP Design - Biggest Database Oversights</title>
				<link>https://www.justincarmony.com/2008/10/25/php-design-biggest-database-oversights/</link>
				<pubDate>Sat, 25 Oct 2008 07:56:44 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/10/25/php-design-biggest-database-oversights/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://www.justincarmony.com/images/wp/2008/10/database-vector.png&#34;&gt;&lt;img src=&#34;https://www.justincarmony.com/images/wp/2008/10/database-vector.png&#34; alt=&#34;&#34; title=&#34;database-vector&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Over the last three years I&amp;rsquo;ve had the opportunity to work on several PHP projects, some of them having grown rapidly and required to scale quickly. Three in particular have been a fantastic learning experience for me. Now I don&amp;rsquo;t consider myself a total expert, but I thought I would share my experiences. Many PHP developers are self-taught, like I was, and are learning PHP to be able to create dynamic websites. Many haven&amp;rsquo;t had studied or learned best practices for Object-Oriented Programming (OOP). They are web designers first, and programming in PHP is just a way to do things simple HTML can&amp;rsquo;t do.&lt;/p&gt;</description>
			</item>
			<item>
				<title>PHP Video Tutorial – Getting Started – Installing XAMPP</title>
				<link>https://www.justincarmony.com/2008/10/15/php-video-tutorial-getting-started-installing-xampp/</link>
				<pubDate>Wed, 15 Oct 2008 01:32:30 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/10/15/php-video-tutorial-getting-started-installing-xampp/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://www.justincarmony.com/images/wp/2008/10/12381.jpg&#34;&gt;&lt;img src=&#34;https://www.justincarmony.com/images/2008/10/12381-300x90.jpg&#34; alt=&#34;&#34; title=&#34;12381&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve decided to give this a try and make a video on Installing &amp;amp; Running XAMPP, the easy to instal web stack for developing websites on your own computer. This video is for beginners who need help walking through the installation of XAMPP.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.justincarmony.com/blog/videos/php_tutorial_xampp/php_tutorial_xampp.html&#34;&gt;&lt;strong&gt;View Video Tutorial - Installing XAMPP&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you have any questions or comments, feel free to leave them here. If you enjoyed this tutorial and are in need of a web server, check out &lt;a href=&#34;http://www.shareasale.com/r.cfm?b=113509&amp;amp;u=301560&amp;amp;m=15960&amp;amp;urllink=&amp;amp;afftrack=&#34;&gt;Layered Tech&lt;/a&gt;, a server host that I &lt;a href=&#34;http://www.justincarmony.com/blog/recommendations/layered-tech/&#34;&gt;highly recommend.&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Local LAMP Developement &amp; User Content</title>
				<link>https://www.justincarmony.com/2008/10/10/local-lamp-developement-user-content/</link>
				<pubDate>Fri, 10 Oct 2008 20:37:26 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/10/10/local-lamp-developement-user-content/</guid>
				<description>&lt;p&gt;I&amp;rsquo;ve come up with a simple solution for handling user uploaded content when trying to work in a local development environment. I&amp;rsquo;ve installed XAMPP on my windows machine and at the beginning of every week I take a database snapshot and update my local database. I had a pretty smooth system going with one problem: user uploaded content.&lt;/p&gt;&#xA;&lt;p&gt;When working with social networking sites, many times they allow for users to upload their own videos, pictures, etc. My current project wasn&amp;rsquo;t different, but I didn&amp;rsquo;t want to download 80GB of user content every week to store on my PC. I wanted a way to point my browser to the live server to get recent images, etc.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Two-Way Sync between Google Calendar, Windows, OS X, and iPhone</title>
				<link>https://www.justincarmony.com/2008/08/23/two-way-sync-between-google-calendar-windows-os-x-and-iphone/</link>
				<pubDate>Sat, 23 Aug 2008 21:43:36 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/08/23/two-way-sync-between-google-calendar-windows-os-x-and-iphone/</guid>
				<description>&lt;p&gt;Since my wife and I got our new iPhones, I&amp;rsquo;ve been playing around with a way unify our calendars. When we first got married we started to use Google Calendar. We have three calendars: mine, hers, and ours. Its great for staying organized, especially when we&amp;rsquo;re trying to organize two lives. It worked well for several weeks, except one thing&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;We had to be on-line and on the browser to view our Google Calendars.&lt;/strong&gt; Lot of the time when we needed to see our calendar we were with family or friends without computer access. Also, when I work I have twenty or so browser windows open, and it can be difficult to find my calendar in the mix. I also am biased towards desktop client applications when I&amp;rsquo;m using them every hour of the day. So I set out on my quest to find a way to sync across all the different mediums I use. Now that I think I&amp;rsquo;ve found my solution, I thought I would share my findings with the rest of the world.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Collection of Useful Plesk Tricks</title>
				<link>https://www.justincarmony.com/2008/07/10/collection-of-useful-plesk-tricks/</link>
				<pubDate>Thu, 10 Jul 2008 01:01:17 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/07/10/collection-of-useful-plesk-tricks/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;http://www.interversal.co.uk/2006/09/29/useful-commands-on-plesk/&#34;&gt;Found this blog post&lt;/a&gt; with a handful of Plesk tricks while searching for a different problem. Posting it here to remember it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Mac Keyboard Quirks - Making Mac more like Windows</title>
				<link>https://www.justincarmony.com/2008/07/03/mac-keyboard-quirks-making-mac-more-like-windows/</link>
				<pubDate>Thu, 03 Jul 2008 16:16:00 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/07/03/mac-keyboard-quirks-making-mac-more-like-windows/</guid>
				<description>&lt;p&gt;Alright, the sound of dying Apple fanboys are crying through out the internet at the posting of this entry, but there are two things I can&amp;rsquo;t stand about the Mac:&lt;/p&gt;&#xA;&lt;p&gt;Command &amp;amp; Control are switched - this is a major pain, especially when using a KVM to switch between a Windows, Mac, and Linux machine. It is just crazy!&lt;/p&gt;&#xA;&lt;p&gt;Home &amp;amp; End - They don&amp;rsquo;t work like they should on every other OS. I&amp;rsquo;ve never really figured out exactly what they do on Mac, but on Windows they go to the beginning or end of a line.&lt;/p&gt;</description>
			</item>
			<item>
				<title>OS X and Tabs - Skipping Drop Down Controls</title>
				<link>https://www.justincarmony.com/2008/06/17/os-x-and-tabs-skipping-drop-down-controls/</link>
				<pubDate>Tue, 17 Jun 2008 07:33:15 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/06/17/os-x-and-tabs-skipping-drop-down-controls/</guid>
				<description>&lt;p&gt;This was driving me crazy for this last week. Since moving to my new house I&amp;rsquo;ve been without internet for a week. Comcast is supposed to come tomorrow to hook up my house, but until then I&amp;rsquo;ve been mooching of relatives&amp;rsquo; WI-FI on my Mac Book Pro. This has forced me to use it for all of my work, including web development and graphics design. However, while tabbing through forms on websites, the tab would skip over drop down boxes. Why this is the default is beyond me. It is not user friendly at all. Fortunately I found through a website how to change it. Of course the OS X elite call this change simple and easy, but I&amp;rsquo;d think it&amp;rsquo;d be easy to just have it work in the first place.&lt;/p&gt;</description>
			</item>
			<item>
				<title>MS SQL 2005 (T-SQL) Row Count for Each Table</title>
				<link>https://www.justincarmony.com/2008/02/19/ms-sql-2005-t-sql-row-count-for-each-table/</link>
				<pubDate>Tue, 19 Feb 2008 16:08:38 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/02/19/ms-sql-2005-t-sql-row-count-for-each-table/</guid>
				<description>&lt;p&gt;At work I needed a solution to give me a count of how many rows each table contained. I&amp;rsquo;ve always liked phpMyAdmin&amp;rsquo;s ability to list all the tables and show their size and row count. I&amp;rsquo;ve found it immensely helpful. However, I couldn&amp;rsquo;t find anything similar for SQL Server Manager Studio 2005. I found a &lt;a href=&#34;http://www.chrisacton.co.uk/code-5002.asp&#34; title=&#34;Blog Post&#34;&gt;blog post&lt;/a&gt; that pointed me in the right direction on how to get the row counts, but I couldn&amp;rsquo;t get their script to run on the SQL Server 2005. Since I figured this would be a useful script to have I would re-write it and comment it for others. Here it is:&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
