<?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>TGE-Studios</title>
	<atom:link href="http://www.tge-studio.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tge-studio.com</link>
	<description>Just Another Blog</description>
	<lastBuildDate>Mon, 07 May 2012 21:22:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Laravel 3.2 Custom Auth Driver</title>
		<link>http://www.tge-studio.com/2012/05/laravel-3-2-custom-auth-driver/</link>
		<comments>http://www.tge-studio.com/2012/05/laravel-3-2-custom-auth-driver/#comments</comments>
		<pubDate>Thu, 03 May 2012 20:54:47 +0000</pubDate>
		<dc:creator>Medalink</dc:creator>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[3.2]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[driver]]></category>

		<guid isPermaLink="false">http://www.tge-studio.com/?p=77</guid>
		<description><![CDATA[Laravel 3.2 introduces a lot of new features that will make your life, programming life that is, so much easier. Today I am going to show you how to extend upon the authentication built into laravel using a custom auth<span class="ellipsis">&#8230;</span> <a href="http://www.tge-studio.com/2012/05/laravel-3-2-custom-auth-driver/"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
			<content:encoded><![CDATA[<p>Laravel 3.2 introduces a lot of new features that will make your life, programming life that is, so much easier. Today I am going to show you how to extend upon the authentication built into laravel using a custom auth driver.</p>
<p><em>Quick note on naming convention, the driver itself will be lowercase in this example while the class will be camel case. You can have the driver whatever you like.</em></p>
<p>Custom auth drivers can be a bundle, a class, or a closure. I am going with the library approach for a simple example. Let&#8217;s start off with changing our configuration file.</p>
<pre>// application/config/auth.php
'driver' =&gt; 'eloquent',</pre>
<p>For this example our custom auth driver will be called customauth. Change the default driver from eloquent to customauth.</p>
<pre>// application/config/auth.php
'driver' =&gt; 'customauth',</pre>
<p>Let&#8217;s make a new file in our libraries folder named customauth.php.</p>
<pre>// application/libraries/customauth.php
use Laravel\Hash, Laravel\Config;
class CustomAuth extends Laravel\Auth\Drivers\Driver {
    public function attempt()
    {
        // Your custom attempt function should replace this.
    }
}</pre>
<p>This will set you up to place your custom attempt function, be sure to check out laravel/auth/drivers for examples.</p>
<pre>// application/start.php
Auth::extend( 'customauth', function()
{
     return new CustomAuth();
} );</pre>
<p>Let&#8217;s go over how this works, first we tell the Auth class to map a new driver named customauth using a closure style syntax. Within our closure we return a new object of our custom auth driver. Once this is done the Auth class takes care of the internal workings and our new driver is working.</p>
<p>From this point you can create the driver however you like. I would suggest sticking with the built-in naming convention if your planning to release the driver as a bundle so it&#8217;s drop in.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tge-studio.com/2012/05/laravel-3-2-custom-auth-driver/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Github based themes &amp; WordPress</title>
		<link>http://www.tge-studio.com/2012/02/github-based-themes-wordpress/</link>
		<comments>http://www.tge-studio.com/2012/02/github-based-themes-wordpress/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 22:50:23 +0000</pubDate>
		<dc:creator>Medalink</dc:creator>
				<category><![CDATA[GIT]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github.com]]></category>
		<category><![CDATA[jeff johnson]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[wordpress.org]]></category>

		<guid isPermaLink="false">http://www.tge-studio.com/?p=60</guid>
		<description><![CDATA[So you like git and you like wordpress? I do too! Here is a short and simple way you can work with a single github.com based repository and host all your WordPress themes. I was faced with designing and programming a<span class="ellipsis">&#8230;</span> <a href="http://www.tge-studio.com/2012/02/github-based-themes-wordpress/"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
			<content:encoded><![CDATA[<p>So you like git and you like wordpress? I do too! Here is a short and simple way you can work with a single <a href="http://www.github.com" target="_blank">github.com</a> based repository and host all your <a href="http://www.wordpress.org" target="_blank">WordPress</a> themes.</p>
<p>I was faced with designing and programming a lot of WP themes but no way to share assets or push changes from library updates. What I came up with was a way to use the master branch as a skeleton theme with all my libraries in it. Each time a lib was updated I swapped to the master branch and pushed the changes to the server. I then merged the master branch into each theme (branch) that required it. This gave me powerful version tracking on the libraries and a way to manage which themes use what version. When you have your master branch set up like this you can create a copy of the master branch into your project branch and delete any unneeded libs. It&#8217;s then as simple as pushing the new branch to the server and building out your theme.</p>
<p>On a Mac you can use the native <a href="http://mac.github.com/" target="_blank">github.com app</a> to manage your repository and switching branches without losing code. You can also symlink your github theme repo into <em>wp-content/themes</em> and each time you switch a branch it will auto switch your current theme&#8230; magic!</p>
<p>Once you have your repository setup it&#8217;s a simple matter of installing WP and cloning your project&#8217;s branch into the theme directory.</p>
<pre>cd /home/project/public_html</pre>
<pre>wget wordpress.org/latest.tar.gz &amp;&amp; tar -xvf latest.tar.gz &amp;&amp; rm -rf latest.tar.gz</pre>
<p>Download, extract, cleanup.</p>
<pre>cd wordpress &amp;&amp; mv * .. &amp;&amp; cd .. &amp;&amp; rm -rf wordpress</pre>
<p>Mv the wordpress files up a directory so they live within the root of <em>public_html</em></p>
<pre>cd wp-content/themes</pre>
<pre>git clone --branch project git@github.com:Medalink/wp-themes/project.git</pre>
<p>Switch to the themes directory and clone in your git project.</p>
<p>&nbsp;</p>
<p>Now just setup your database.</p>
<pre>mysql -u user -p
mysql&gt; CREATE DATABASE wp_project;
mysql&gt; GRANT ALL ON wp_project.* TO user@host IDENTIFIED BY 'pass';</pre>
<p>Visit http://www.project.com and install wordpress. Done.</p>
<p>Looking for a way to move WP from one server to another?  <a href="http://jrjdev.net/jeff-johnson-web-developer/" target="_blank">Jeff Johnson</a> posted about it <a href="http://jrjdev.net/2012/02/moving-a-wordpress-site-with-bash-scripts/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tge-studio.com/2012/02/github-based-themes-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eloquent Terminal in Mac.</title>
		<link>http://www.tge-studio.com/2012/02/eloquent-terminal-in-mac/</link>
		<comments>http://www.tge-studio.com/2012/02/eloquent-terminal-in-mac/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 17:49:28 +0000</pubDate>
		<dc:creator>Medalink</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bash profile]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tge-studio.com/?p=29</guid>
		<description><![CDATA[I was working on my Mac this morning and was using the terminal to do some work with GIT and moving some files around and it dawned on me that the Mac terminal is very plain and lacks some of<span class="ellipsis">&#8230;</span> <a href="http://www.tge-studio.com/2012/02/eloquent-terminal-in-mac/"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
			<content:encoded><![CDATA[<p>I was working on my Mac this morning and was using the terminal to do some work with GIT and moving some files around and it dawned on me that the Mac terminal is very plain and lacks some of the great aspects from linux that I am used too. Here is a screenshot of the default terminal in mac.</p>
<p>&nbsp;</p>
<p><img class="aligncenter size-full wp-image-32" title="Default Mac Terminal" src="http://www.tge-studio.com/wp-content/uploads/2012/02/terminal-1.jpg" alt="Default Mac Terminal" width="908" height="484" /></p>
<p>&nbsp;</p>
<p>First and formost this is black text on a white background which I am not all that happy with so I swapped over to pro which is white text on a black background. Take a look:</p>
<p><a href="http://www.tge-studio.com/wp-content/uploads/2012/02/terminal-21.jpg"><img class="aligncenter size-full wp-image-49" title="Default Mac Pro Terminal" src="http://www.tge-studio.com/wp-content/uploads/2012/02/terminal-21.jpg" alt="Default Mac Pro Terminal" width="908" height="484" /></a></p>
<p>The problem here is that the default typography is not up to par. Let&#8217;s change a few settings.</p>
<p>Terminal &gt; Preferences &gt; Settings &gt; Text</p>
<p>Change the font type to Menlo Bold 12 pt. Check the Antialias text box.</p>
<p><a href="http://www.tge-studio.com/wp-content/uploads/2012/02/terminal-2.jpg"><img class="aligncenter size-full wp-image-34" title="Mac's Terminal Pro Custom" src="http://www.tge-studio.com/wp-content/uploads/2012/02/terminal-2.jpg" alt="Mac's Terminal Pro Custom" width="908" height="484" /></a></p>
<p>Now that is much more traditional than the default but this now lacks a few things like colors, some really nice alias commands and some tweaks to the way command line history works.</p>
<p>Now in Ubuntu you normally edit your ~/.profile or your ~/.bashrc but on a Mac the default is ~/.bash_profile. Here we export certain settings and adjust the default terminal.</p>
<p>First let&#8217;s set our default editor to nano. This is my preference but you may like something else. By default Mac uses VIM.</p>
<pre># Default editors
export SVN_EDITOR=nano
export GIT_EDITOR=nano</pre>
<p>Next we want to uses colors for file names so we can have a visual indicator for file and folders and even seeing when a folder has public permissions.</p>
<pre># Use colors
export CLICOLOR=1;</pre>
<p>One thing I do not like is directory listing defaults on Mac. Let&#8217;s make an alias that will display the contents in a list, short and simple file sizes and show hidden files/folders. You could override the default ls command with this but I prefer to assign it to ll as Ubuntu and many other linux based distros use.</p>
<pre># A better directory listing
alias ll="ls -lha"</pre>
<p>Let&#8217;s tweak the history size to not only hold more but to ensure we do not store duplicate commands and we expand the history properly on resizing the terminal window.</p>
<pre># History
export HISTCONTROL=ignoredups:ignorespace
export HISTSIZE=10000
export HISTFILESIZE=2000
shopt -s histappend checkwinsize</pre>
<p>Adjust the bash shell to show us the current user and what machine we are working on as well as the current folder of the current directory. We also add some color to match the default in Ubuntu. This is really helpful if you work on a lot of different console windows or tabs at once.</p>
<pre># Bash shell
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]# '</pre>
<p>Alright after all of this your ~/.bash_profile should look like this:</p>
<pre># Default editors
export SVN_EDITOR=nano
export GIT_EDITOR=nano</pre>
<pre># Use colors
export CLICOLOR=1;</pre>
<pre># A better directory listing
alias ll="ls -lha"</pre>
<pre># History
export HISTCONTROL=ignoredups:ignorespace
export HISTSIZE=10000
export HISTFILESIZE=2000
shopt -s histappend checkwinsize</pre>
<pre># Bash shell
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]# '</pre>
<p>To apply the changes you need to reopen a terminal window or type</p>
<pre>source ~/.bash_profile</pre>
<p>Here is a screenshot for reference:</p>
<p><a href="http://www.tge-studio.com/wp-content/uploads/2012/02/terminal-3.jpg"><img class="aligncenter size-full wp-image-35" title="Custom Mac Pro Terminal" src="http://www.tge-studio.com/wp-content/uploads/2012/02/terminal-3.jpg" alt="Custom Mac Pro Terminal" width="908" height="484" /></a></p>
<p>As you can see folders are purple, files are white, public permissions show up as green highlight and yellow highlight. I also use a few different settings for terminal, I use a very transparent block cursor that&#8217;s tinted grey and my window background color is semi-transparent so I can see other windows behind it or other terminals.</p>
<p>Enjoy your new eloquent terminal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tge-studio.com/2012/02/eloquent-terminal-in-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on SVN</title>
		<link>http://www.tge-studio.com/2011/12/thoughts-on-svn/</link>
		<comments>http://www.tge-studio.com/2011/12/thoughts-on-svn/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 20:59:48 +0000</pubDate>
		<dc:creator>Medalink</dc:creator>
				<category><![CDATA[SVN]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[love]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.tge-studio.com/?p=22</guid>
		<description><![CDATA[Today I was committing some changes to my SVN repository when it dawned on me how much I love SVN. Why do I love SVN so much you might ask? Simple, I can track all my changes and interact with other developers<span class="ellipsis">&#8230;</span> <a href="http://www.tge-studio.com/2011/12/thoughts-on-svn/"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
			<content:encoded><![CDATA[<p>Today I was committing some changes to my SVN repository when it dawned on me how much I love SVN. Why do I love SVN so much you might ask? Simple, I can track all my changes and interact with other developers easily and efficiently. Back before I found SVN I used FTP to manage my files on a central server and that was a pain when I needed to roll back a change I no longer wanted. I made hourly backups when I would be in develop mode and then could roll back. I do not miss those days.</p>
<p>&nbsp;</p>
<p>I also love how you can look over the logs from long ago and see what you where doing and the progress you have made. It&#8217;s a nice way to remind yourself of the work you have put into a project. This post does not serve much of anything but to say I love SVN. You should check it or GIT out if you don&#8217;t use one or the other. You will fall in love too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tge-studio.com/2011/12/thoughts-on-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVC Frameworks, Yes or No?</title>
		<link>http://www.tge-studio.com/2011/10/mvc-frameworks-yes-or-no/</link>
		<comments>http://www.tge-studio.com/2011/10/mvc-frameworks-yes-or-no/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 13:28:27 +0000</pubDate>
		<dc:creator>Medalink</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php mvc framework developer]]></category>

		<guid isPermaLink="false">http://www.tge-studio.com/?p=11</guid>
		<description><![CDATA[I get asked a lot if MVC Frameworks are useful or not and when they should be used. I think the answer to that questions can be answered generically. Let&#8217;s face it, it&#8217;s project dependent but there are signs when and when not to use them. First of<span class="ellipsis">&#8230;</span> <a href="http://www.tge-studio.com/2011/10/mvc-frameworks-yes-or-no/"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
			<content:encoded><![CDATA[<p>I get asked a lot if MVC Frameworks are useful or not and when they should be used. I think the answer to that questions can be answered generically. Let&#8217;s face it, it&#8217;s project dependent but there are signs when and when not to use them.</p>
<p>First of all if your going to need some of the basic web related stuff like session management, database connections, profiles, editors, etc then yes use a MVC Framework. They have built in systems to handle everything you will need to start so you can jump right into coding your custom system. Secondly most MVC Frameworks have built in profiler, helpers, OS and driver classes and functions. I can&#8217;t tell you how many times I am knee deep in coding and think &#8220;I need to benchmark this function, let me write a system to do that&#8221;. I end up spending some time playing around and creating a benchmarking class or function taking away time from what I was planning on coding. Using a MVC Framework let&#8217;s you leverage pre-made classes and functions for when you run into a situation where you need something quick and you don&#8217;t want to spend the time making it yourself.</p>
<p>Here is a quick list of things I find most useful from using CodeIgniter (my MVC of choice).</p>
<ul>
<li>Multiple Database Drivers</li>
<li>Session Management</li>
<li>Benchmarking</li>
<li>Code Profiling</li>
<li>Built in Security</li>
<li>Rapid Development</li>
</ul>
<p>Within an hour of starting a project from scratch you should be able to have all your basics done. That&#8217;s what a MVC Framework is for.</p>
<p>Now why would you not use a MVC Framework if they are so great? Simple, the learning curve is destroyed when you just start calling functions and creating objects. Even looking at the source of each function and class call your limiting your idea of how it should work based on what the developers of the MVC Framework do. I have been programming PHP for 14 years and I can tell you there are hundreds of ways to do the same thing. I am from the self-taught group and I hate to use code I did not write or modify and that led me to many years of re-creating the session handlers and the database drivers, the URI parsing and all the elements of a CMS. I have written 4 CMS systems from scratch over the years and it has taken a lot of time to learn each part of the system and secure it, make it fast and optimized, make it OS independent and extensible.</p>
<p>I think at that point your not just learning how to code PHP your learning how the internet works and how technology on the internet is used and exploited. It&#8217;s not just about learning how to make a login system, today coding and developing something is learning how people will use it and how they expect it to work. The bar has been set high and you can&#8217;t just create a website with a MVC Framework and it be great and innovative. It&#8217;s more about the idea now and not the system.</p>
<p>To sum it up you should use a MVC Framework when you are in need of a rapid deployment situation and you have a grasp on the systems you will be &#8220;auto-generating&#8221;. You should not use a MVC Framework just to use it or if your doing it just because you always have. Be adventurous and try and create one yourself or go old school and write your own system.</p>
<p>You want to be innovative right? Not just doing the same thing over and over, you know Insanity.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tge-studio.com/2011/10/mvc-frameworks-yes-or-no/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

