<?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>Arlo Carreon</title>
	<atom:link href="http://www.arlocarreon.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arlocarreon.com</link>
	<description>Web Developer by day, hacker by night</description>
	<lastBuildDate>Sun, 29 Jan 2012 01:08:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Push Git Repo Into Shared Hosting Account Like Hostgator</title>
		<link>http://www.arlocarreon.com/blog/git/push-git-repo-into-shared-hosting-account-like-hostgator/</link>
		<comments>http://www.arlocarreon.com/blog/git/push-git-repo-into-shared-hosting-account-like-hostgator/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 03:56:57 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=402</guid>
		<description><![CDATA[Many use 3rd party git hosting (Github.com) to host their git repos, but sometimes you&#8217;re not wanting to take your project to a social network. Sometimes your repo is for yourself, for your website and no one else. I want to run you through how to setup your Hostgator account with the configuration needed to [...]]]></description>
			<content:encoded><![CDATA[<p>Many use 3rd party git hosting (Github.com) to host their git repos, but sometimes you&#8217;re not wanting to take your project to a social network. Sometimes your repo is for yourself, for your website and no one else. I want to run you through how to setup your Hostgator account with the configuration needed to push directly into Hostgator in 3 steps. Theoretically you can do this with any shared hosting that gives you <strong>SSH access</strong> and has<strong> Git Client</strong> installed.</p>
<h2>1.) Setup Hostgator</h2>
<p><strong>Make sure you have SSH access. </strong>Shared hosting accounts with Hostgator <strong>do not </strong>come with SSH access by default. You will to go to the support chat and ask for SSH access, this will only take minutes and is effective immediately.  Once they give you access, make sure you can login. SSH port for hostgator is 2222. Here is how you would SSH into your account with your Hostgator username and password.</p>
<pre class="brush: bash; title: ; notranslate">
ssh USER_NAME@your-domain.com -p 2222
...
Enter your password: *********
</pre>
<p><strong>Get your public key into Hostgator.</strong>Your public key is located at <code>~/.ssh/id_rsa.pub</code>, copy the contents and paste it in a file on Hostgator: <code>~/.ssh/authorized_keys</code>. If <code>~/.ssh/authorized_keys</code> does not exist on Hostgator, then create it with <code>touch ~/.ssh/authorized_keys</code>. Incase you don&#8217;t have <code>~/.ssh/id_rsa.pub</code>, run <code>ssh-keygen</code> in your console and hit <code>enter</code> all the way through. At the end of that, you will have the <code>~/.ssh/id_rsa.pub</code> file on your computer.</p>
<p><strong>Configure your repo on hostgator.</strong>  First, you need to set a config option in your hostgator repo to accept pushes into this working directory. SSH into hostgator, navigate to your repo directory and run this command:</p>
<pre class="brush: bash; title: ; notranslate">
git config receive.denyCurrentBranch ignore
</pre>
<p>Finally, you need to set a git hook that will refresh your working directory after the push has been accepted. Save the following content in: <code>PATH_TO_REPO/.git/hooks/post-receive</code>.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
# Save this in: PATH_TO_REPO/.git/hooks/post-receive
GIT_WORK_TREE=../ git checkout -f
</pre>
<p>Then, make it executable with <code>chmod +x PATH_TO_REPO/.git/hooks/post-receive</code></p>
<h2>2.) Setup Your SSH Config Locally</h2>
<p><strong>Automate SSH connection for Hostgator.</strong>  In order to add hostgator as a git remote, you need to automate the fact that you will be connecting to hostgator via port 2222 and you will not be using your password for authentication. Your need to edit/create the file <code>~/.ssh/config</code> on your computer. Then add this content.</p>
<pre class="brush: plain; title: ; notranslate">
Host your-domain.com
  Port 2222
  PreferredAuthentications publickey
</pre>
<p>Now, you should be able to login with <code>ssh user_name@your-domain.com</code> without needing to type your password. If this is not the case, start over at step 1.</p>
<h2>3.) Setup Hostgator as a Remote</h2>
<p><strong>Add your domain as a remote.</strong>  On your computer, navigate to your git repo and run this command:</p>
<pre class="brush: plain; title: ; notranslate">
git remote add hostgator-live user_name@your-domain.com:www/site-directory
</pre>
<p>Now, you can make you changes to your repo and when you are ready to push your changes:</p>
<pre class="brush: plain; title: ; notranslate">
git push hostgator-live
</pre>
<h2>Something to think about</h2>
<p>With this setup it is now easy to have a &#8220;dev&#8221; site on your hostgator account too. SSH into hostgator and replicate your repo into a different folder (<code>~/www/dev</code>). Locally, setup a new remote:</p>
<pre class="brush: plain; title: ; notranslate">
git remote add hostgator-dev user_name@your-domain.com:www/dev
</pre>
<p>So, from now on you can <code>git push hostgator-dev</code> to test out your new changes.  When you are ready to make your changes live: <code>git push hostgator-live</code></p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fgit%2Fpush-git-repo-into-shared-hosting-account-like-hostgator%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/git/push-git-repo-into-shared-hosting-account-like-hostgator/" data-count="horizontal" data-via="mexitek" data-text="Push Git Repo Into Shared Hosting Account Like Hostgator">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/git/push-git-repo-into-shared-hosting-account-like-hostgator/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/git/push-git-repo-into-shared-hosting-account-like-hostgator/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/git/push-git-repo-into-shared-hosting-account-like-hostgator/";
							  reddit_title = "Push Git Repo Into Shared Hosting Account Like Hostgator";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/git/push-git-repo-into-shared-hosting-account-like-hostgator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pre And Code Tags In Github Markdown</title>
		<link>http://www.arlocarreon.com/blog/github/pre-and-code-tags-in-github-markdown/</link>
		<comments>http://www.arlocarreon.com/blog/github/pre-and-code-tags-in-github-markdown/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 17:53:17 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=381</guid>
		<description><![CDATA[Not sure if there is some hidden resource somewhere on their site or blog, but I couldn&#8217;t find how to get syntax highlighting with &#60;pre&#62; and &#60;code&#62; tags. Here is what I found out. Pre and Code Tags In Github Not sure when/where I found that you could use &#60;pre&#62; and &#60;code&#62; tags, but I [...]]]></description>
			<content:encoded><![CDATA[<p>Not sure if there is some hidden resource somewhere on their site or blog, but I couldn&#8217;t find how to get syntax highlighting with <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags.  Here is what I found out.</p>
<h2>Pre and Code Tags In Github</h2>
<p>Not sure when/where I found that you could use <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags, but I liked the idea. The only problem was syntax highlighting, but recently I decided to inspect their markup to see how they convert they fenced option into HTML. In doing so, I found out what attributes you need.</p>
<pre class="brush: xml; highlight: [1]; title: ; notranslate">
&lt;pre lang=&quot;javascript&quot;&gt;&lt;code&gt;
if(foo==true)
  alert('yes sir');
else
  alert('boo scenario');
&lt;/code&gt;&lt;/pre&gt;
</pre>
<p>This method is my favored one thus far. Not buggy and you know what to expect. <a href="https://github.com/FHCHS/ldap-magic/pull/1#issuecomment-2656010" title="c-sharp markdown example" target="_blank">Here is an example</a> of a huge block of C# code that <code>ONLY</code> worked with these <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags, all documented methods bugged out.</p>
<h2>Documented Markdown For Code</h2>
<p>There are 2 documented ways to do code blocks in Github&#8217;s markdown.</p>
<h3>1.) 4 Space Indent</h3>
<p>In my case, this is awkward. Especially when pasting in a block of code.</p>
<pre class="brush: jscript; title: ; notranslate">
    if(foo==true)
      alert('yes sir');
    else
      alert('boo scenario');
</pre>
<h3>2.) Fenced code block with `</h3>
<p>This is the format I&#8217;ve used the most, seems easier than the 4 space indent. You need to start with 3 <code>```language</code> and end the fence with another 3 <code>```</code>. This method has proven to be buggy.</p>
<pre class="brush: jscript; title: ; notranslate">
```javascript
if(foo==true)
  alert('yes sir');
else
  alert('boo scenario');
```
</pre>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fgithub%2Fpre-and-code-tags-in-github-markdown%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/github/pre-and-code-tags-in-github-markdown/" data-count="horizontal" data-via="mexitek" data-text="Pre And Code Tags In Github Markdown">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/github/pre-and-code-tags-in-github-markdown/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/github/pre-and-code-tags-in-github-markdown/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/github/pre-and-code-tags-in-github-markdown/";
							  reddit_title = "Pre And Code Tags In Github Markdown";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/github/pre-and-code-tags-in-github-markdown/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hubot&#8217;s Gtalk Adapter</title>
		<link>http://www.arlocarreon.com/blog/hubot/hubots-gtalk-adapter/</link>
		<comments>http://www.arlocarreon.com/blog/hubot/hubots-gtalk-adapter/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 06:22:17 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[Hubot]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=379</guid>
		<description><![CDATA[Hubot is an awesome chatbot written by the Github Team and opensources recently. At work we don&#8217;t use chatroom environments, instead we use Gtalk. Our campus has staff located in several building and we all communicate via our enterprise Gtalk. IT and non tech savvy people have taking a liking to communication via the messenger. [...]]]></description>
			<content:encoded><![CDATA[<p>Hubot is an awesome chatbot written by the Github Team and opensources recently.  At work we don&#8217;t use chatroom environments, instead we use Gtalk.  Our campus has staff located in several building and we all communicate via our enterprise Gtalk. IT and non tech savvy people have taking a liking to communication via the messenger.  Naturally upon seeing hubot in all his glory, I knew that he MUST be part of my workplace&#8217;s culture.</p>
<h2>Gtalk Adapter</h2>
<p>If you are interested in using this adapter in your private Hubot and do not want to upgrade Hubot to v1.1.9, you can download the adapter <a href="https://github.com/mexitek/hubot/blob/gtalk/src/hubot/gtalk.coffee" title="gtalk adapter script" target="_blank">at my repo</a>. </p>
<p>The beauty of the Gtalk adapter is that is only depends the <code>node-xmpp</code> node package, which is already part of hubot.  You can literally drop in that adapter and you are good to go.</p>
<h2>Environment Variables</h2>
<p>Even though the official Hubot wiki has a <a href="https://github.com/github/hubot/wiki/Adapter:-Gtalk" title="gtalk wiki page" target="_blank">page about this adapter</a>, here are the two environment variables you need: </p>
<pre class="brush: bash; title: ; notranslate">
export HUBOT_GTALK_USERNAME=&quot;example@domain.com&quot;
export HUBOT_GTALK_PASSWORD=&quot;account password&quot;
</pre>
<h2>Enjoy</h2>
<p>If you have any issues with the Gtalk adapter or wish to submit a feature request, feel free to create an issue on <a href="https://github.com/github/hubot/issues?sort=created&#038;direction=desc&#038;state=open" title="hubot issues" target="_blank">Hubot&#8217;s main repo</a> and mention <code>@mexitek</code> in the description or the comments. In mentioning my name I will be notified and Github staff will bug me to support the adapter.</p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fhubot%2Fhubots-gtalk-adapter%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/hubot/hubots-gtalk-adapter/" data-count="horizontal" data-via="mexitek" data-text="Hubot’s Gtalk Adapter">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/hubot/hubots-gtalk-adapter/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/hubot/hubots-gtalk-adapter/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/hubot/hubots-gtalk-adapter/";
							  reddit_title = "Hubot’s Gtalk Adapter";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/hubot/hubots-gtalk-adapter/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Github&#8217;s Hubot on Joyent&#8217;s no.de Smart Machines</title>
		<link>http://www.arlocarreon.com/blog/git/githubs-hubot-on-joyents-no-de-smart-machines/</link>
		<comments>http://www.arlocarreon.com/blog/git/githubs-hubot-on-joyents-no-de-smart-machines/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 03:30:29 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Hubot]]></category>
		<category><![CDATA[node.js]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=363</guid>
		<description><![CDATA[I had an exciting adventure hacking away at Github&#8217;s chat bot, Hubot. Hubot uses node.js as the webserver, redis for database and coffeescript for programming language. In this tutorial we will hook Hubot into a Campfire chatroom running on a free node.js server from http://No.de. Incase you have no idea what Hubot is, and you [...]]]></description>
			<content:encoded><![CDATA[<p>I had an exciting adventure hacking away at Github&#8217;s chat bot, Hubot. Hubot uses <strong>node.js</strong> as the webserver, <strong>redis </strong>for database and <strong>coffeescript</strong> for programming language. In this tutorial we will hook Hubot into a Campfire chatroom running on a free node.js server from http://No.de.</p>
<blockquote><p>Incase you have no idea what Hubot is, and you are genuinely interested, you can read Github developers talk about him <a title="zack on hubot" href="http://zachholman.com/posts/why-github-hacks-on-side-projects/" target="_blank">here</a> and <a title="github releases hubot" href="https://github.com/blog/968-say-hello-to-hubot" target="_blank">here</a>.</p></blockquote>
<blockquote><p>Have you deployed to no.de before? Familiar enough with Hubot? Skip this tutorial and see exactly what you need <a title="Hubot on no.de gist" href="https://gist.github.com/1326106" target="_blank">from my gist</a>.</p></blockquote>
<h2>1.) Before we start</h2>
<ul>
<li>Create an account on <a title="no.de" href="https://no.de/" target="_blank">no.de</a></li>
<li>Fire up a node.js smartmachine.</li>
<li>Add ssh config options to your ~/.ssh/config file. Instructions on your machine&#8217;s dashboard.</li>
<li>Add you public ssh key to your account. <a title="no.de ssh" href="http://wiki.joyent.com/display/node/Getting+Started+with+a+Node.js+SmartMachine" target="_blank">Instructions here</a>.</li>
</ul>
<p>Make sure you can ssh into your node machine.</p>
<pre class="brush: bash; title: ; notranslate">
ssh useraccount.no.de
</pre>
<h2>2.) Adding environment variables</h2>
<p>A hubot adapter is basically the type of chat environment you want Hubot to connect to: Campfire, IRC, Gtalk, Email, XMPP, hipchat, etc. Every adapter has it&#8217;s own environment variables that need to be added to your server.</p>
<blockquote><p>You can see some examples on Hubot&#8217;s Wiki on adapters. Here is the page for <a title="campfire adapter" href="https://github.com/github/hubot/wiki/Adapter:-Campfire" target="_blank">Campfire&#8217;s Adapter</a>.</p></blockquote>
<p>The user that will be running node.js applications on your no.de server is &#8220;node-service&#8221;.  In order to add environment variables for this user we must ssh into your machine with the admin account.</p>
<pre class="brush: bash; title: ; notranslate">ssh admin@username.no.de</pre>
<p>Once you have logged in, you need to edit the following file: <code>/home/node/node-service/profile</code> and paste in your environment variables.</p>
<pre class="brush: bash; title: ; notranslate">
sudo vim /home/node/node-service/profile
</pre>
<p>In the vim editor, press &#8220;i&#8221; to insert. Type in (or paste on Mac) your environment variables. When finished press &#8220;esc&#8221;, &#8220;:w!&#8221;+enter to save and finally &#8220;:q&#8221;.</p>
<pre class="brush: bash; title: ; notranslate">
# Hubot stuff
export HUBOT_CAMPFIRE_TOKEN=&quot;token here&quot;
export HUBOT_CAMPFIRE_ROOMS=&quot;roomID,roomID,roomID&quot;
export HUBOT_CAMPFIRE_ACCOUNT=&quot;campfire subdomain&quot;
</pre>
<h2>3.) Download Hubot</h2>
<p>You can get the latest version of Hubot from the repo&#8217;s <a href="https://github.com/github/hubot/downloads" title="hubot download" target="_blank">download page</a>. Unzip the package.</p>
<h2>4.) Prepare Hubot for No.de</h2>
<p>No.de looks for a file named <code>server.js</code> that will kick start your app upon a git push.  Hubot has no such file and is written in coffeescript rather than plain Javascript. We must add a line to <code>package.json</code> that will tell No.de how to launch our application. Also, we need to add a file called <code>config.json</code> that will tell No.de which nodejs version to use.</p>
<h3>Create config.json</h3>
<p>It only need to contain the following.</p>
<pre class="brush: jscript; title: ; notranslate">{&quot;version&quot;: &quot;v0.4.11&quot;}</pre>
<h3>Edit package.json</h3>
<p>Add the following line to the bottom of the file.  This will launch Hubot&#8217;s Campfire adapter.</p>
<pre class="brush: jscript; title: ; notranslate">
,&quot;scripts&quot;: { &quot;start&quot;: &quot;./bin/hubot --adapter campfire&quot; }
</pre>
<h2>5.) Push Hubot to No.de</h2>
<p>You need to step into that folder to create a new git repo, create a git remote for no.de and finally push your repo to No.de.</p>
<pre class="brush: bash; title: ; notranslate">
git init
git remote add no.de username.no.de:repo
git push no.de master
... lots of output should end with:
win!
</pre>
<h2>That&#8217;s it.</h2>
<p>Now go to your Campfire chatroom and mess with Hubot.</p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fgit%2Fgithubs-hubot-on-joyents-no-de-smart-machines%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/git/githubs-hubot-on-joyents-no-de-smart-machines/" data-count="horizontal" data-via="mexitek" data-text="Github’s Hubot on Joyent’s no.de Smart Machines">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/git/githubs-hubot-on-joyents-no-de-smart-machines/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/git/githubs-hubot-on-joyents-no-de-smart-machines/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/git/githubs-hubot-on-joyents-no-de-smart-machines/";
							  reddit_title = "Github’s Hubot on Joyent’s no.de Smart Machines";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/git/githubs-hubot-on-joyents-no-de-smart-machines/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Postgre SQL/PL Function For Generating PostGIS Spatial Data</title>
		<link>http://www.arlocarreon.com/blog/postgis/postgre-function-for-generating-postgis-spatial-data/</link>
		<comments>http://www.arlocarreon.com/blog/postgis/postgre-function-for-generating-postgis-spatial-data/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 00:46:50 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[postgis]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=349</guid>
		<description><![CDATA[Recently I wanted to benchmark PostGIS spacial engine with massive amounts of data. If I were to be a GIS professional I would probably have a &#8220;go-to&#8221; place for huge datasets, but I am not so I couldn&#8217;t. I wanted to benchmark spatial queries against 1 million records, just to get a good idea of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I wanted to benchmark PostGIS spacial engine with massive amounts of data. If I were to be a GIS professional I would probably have a &#8220;go-to&#8221; place for huge datasets, but I am not so I couldn&#8217;t.  I wanted to benchmark spatial queries against 1 million records, just to get a good idea of where PostGIS stands.</p>
<h2>Postgre Function</h2>
<p>After abandoning the quest for a huge dataset, I figured I would create my own Postgre function. Half an hour of troubleshooting/trial and error resulted in the following.<br />
<script src="https://gist.github.com/1172401.js"> </script></p>
<h2>How To Use It</h2>
<h3>1.) Your Table</h3>
<p>The function looks to insert records into a table called <code>points</code> with 2 column <code>location and name_of_place</code>, the name of the place being a string and the location a geo_point.</p>
<h3>2.) Create a Function</h3>
<p>I created a function in my postgre database and named it <code>fillPoints</code>. Copy and paste the above code as your function&#8217;s structure and save.</p>
<blockquote><p>If you would like to use this function to fill your own data table with predefined columns.  Simply edit the INSERT statement to match your structure.</p></blockquote>
<h3>3.) Use The Function</h3>
<p>Now that everything is in place, lets fill that table. All you need to do is execute a select statement that call the function and pass the number of records you want to create as a parameter. I used an <a href="http://aws.amazon.com/ec2/#instance" target="_blank">Amazon EC2 micro instance</a> for this test so filling my table with 1 million records took about 9 minutes.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT fillPoints(1000000);
</pre>
<h2>Benchmark: 1 Million Records</h2>
<pre class="brush: sql; title: ; notranslate">
-- This will search 1/4 of the overall region.
-- My Result: 249,881 points found in ~800ms
SELECT count(*)
FROM points
WHERE ST_Within( location, 'POLYGON((0 0, 0 180, 180 180, 180 0, 0 0))' );

-- This will search 1/8 of the overall region.
-- My Result: 62,420 points found in ~200ms
SELECT count(*)
FROM points
WHERE ST_Within( location, 'POLYGON((0 0, 0 90, 90 90, 90 0, 0 0))' );
</pre>
<h2>Conclusion</h2>
<p>To say the least I was totally surprised by the benchmark. The latter is so amazing! 64,000 records in 200ms is an incredible speed for a spatial querying app/api.  This experiment with PostGIS was sparked by the idea of a mobile listings application.  I will need a speedy spatial database engine behind my application.  I am happy with the performance I&#8217;ve seen thus far in PostGIS. Perfect opensource solution for a small one-man project like mine.</p>
<p>This would also be a great alternative for REALTOR websites.  Where an MLS can have 60,000 listings at any one time. Searching 60,000 records using spatial data (search homes inside polygon) would be a simple task that could be done in much less than 100ms.</p>
<p><iframe src="http://www.screenr.com/embed/325" width="650" height="396" frameborder="0"></iframe></p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fpostgis%2Fpostgre-function-for-generating-postgis-spatial-data%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/postgis/postgre-function-for-generating-postgis-spatial-data/" data-count="horizontal" data-via="mexitek" data-text="Postgre SQL/PL Function For Generating PostGIS Spatial Data">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/postgis/postgre-function-for-generating-postgis-spatial-data/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/postgis/postgre-function-for-generating-postgis-spatial-data/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/postgis/postgre-function-for-generating-postgis-spatial-data/";
							  reddit_title = "Postgre SQL/PL Function For Generating PostGIS Spatial Data";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/postgis/postgre-function-for-generating-postgis-spatial-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git repo inside a Git repo</title>
		<link>http://www.arlocarreon.com/blog/git/git-repo-inside-a-git-repo/</link>
		<comments>http://www.arlocarreon.com/blog/git/git-repo-inside-a-git-repo/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 04:17:45 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=327</guid>
		<description><![CDATA[To a lot us of picking up git for the first time, sometimes we wonder what if I had a git repo inside another git repo. Alternatively, you may need to include an existing repo into a new project. None the less, I will try to explain how to use git repos inside other git [...]]]></description>
			<content:encoded><![CDATA[<p>To a lot us of picking up git for the first time, sometimes we wonder what if I had a git repo inside another git repo.  Alternatively, you may need to include an existing repo into a new project. None the less, I will <strong>try</strong> to explain how to use git repos inside other git repos.</p>
<h2>Scenario</h2>
<p>We&#8217;ll be working with the following scenario. You have a php website that has 2 external repos in the root; <a href="https://github.com/jquery/jquery" target="_blank">jQuery</a> and an <a href="https://github.com/tpyo/amazon-s3-php-class" target="_blank">S3 PHP class</a>.<br />
<img src="http://dl.dropbox.com/u/5156502/GitSubmoduleScenario.png" width="100%"/></p>
<h2>Git Submodules</h2>
<p>First off, a git repo inside another is called a submodule. Essentially, submodules are links to the external repos. Also, submodules&#8217; content are ignored when creating a SHA1 out of the working directory&#8217;s content. That&#8217;s why submodule folders are empty when you first clone a repo with a submodule.  </p>
<h3>Adding a submodule</h3>
<p>To add a submodule all you have to do is use the submodule command: <code>git submodule add</code>.  Let&#8217;s play pretend with our examples.</p>
<pre class="brush: plain; highlight: [1,2]; title: ; notranslate">
git submodule add git://github.com/jquery/jquery.git
git submodule add git://github.com/tpyo/amazon-s3-php-class.git s3-class
git add .
git commit -m &quot;Added two new submodules.&quot;
</pre>
<blockquote><p>Adding submodules into your existing repo will create a new file <code>.gitmodules</code> which contains the directories and URLs to these external repos.</p></blockquote>
<h3>Cloning a Repo with Submodules</h3>
<p>Like I mentioned earlier the content inside a submodule is not calculated in your commit&#8217;s SHA1s. With this said keep in mind that after cloning a project with submodule, those submodule directories are completely empty. In order to copy down the content of your submodules you need to do a <code>git submodule init</code>.</p>
<pre class="brush: plain; highlight: [4,6]; title: ; notranslate">
git clone git@github.com:mexitek/fake-repo-whatevs.git
...some output about the cloning ...
cd fake-repo-whatevs/
git submodule init
... some output on initializing ALL the submodules ...
git submodule update
... some output on downloading submodule contents ...
</pre>
<h2>Updating Submodules For Your Parent Repo</h2>
<p>Updating submodules is not exactly that straight forward and is more involved. We actually have to tell our parent repo we want to use a new version of a submodule, so a commit is required to acknowledge this change.</p>
<pre class="brush: plain; title: ; notranslate">
cd PATH_TO_SUBMODULE/
git pull origin master # &lt;-- don't forget master!!
cd PATH_TO_PARENT_REPO/
git commit -am &quot;Upgrading our Submodules&quot;
git push origin
</pre>
<p>It is important to remember to go to the submodule directory to pull updates for your submodule. Then also to navigate back to the parent repo directory and make your commit.  This will tell all other clones of your parent repo that we have upgraded our submodule.</p>
<h2>Pulling Submodule Updates From Parent Repo</h2>
<p>All other clones of your parent repo will have to execute the following.</p>
<pre class="brush: plain; title: ; notranslate">
git pull origin
git submodule update
</pre>
<p>The initial pull detects a change and pulls a reference down to the latest state of the submodule, then the <code>git submodule update</code> actually pulls down the new content for the submodule.</p>
<h2>Github is your friend</h2>
<p>I like how this information is represented in Github.com&#8217;s UI. They give you a different icon to represent a submodule, link the name to the original submodule profile and they provide the last commit you have in your repo.<br />
<img width="100%" src="http://dl.dropbox.com/u/5156502/github-submodule-link.png"/></p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fgit%2Fgit-repo-inside-a-git-repo%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/git/git-repo-inside-a-git-repo/" data-count="horizontal" data-via="mexitek" data-text="Git repo inside a Git repo">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/git/git-repo-inside-a-git-repo/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/git/git-repo-inside-a-git-repo/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/git/git-repo-inside-a-git-repo/";
							  reddit_title = "Git repo inside a Git repo";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/git/git-repo-inside-a-git-repo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Git Tags To Your Commit History</title>
		<link>http://www.arlocarreon.com/blog/git/adding-git-tags-to-your-commit-history/</link>
		<comments>http://www.arlocarreon.com/blog/git/adding-git-tags-to-your-commit-history/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 21:51:47 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=310</guid>
		<description><![CDATA[If your workflow does not have a dedicated &#8220;production&#8221; and &#8220;development&#8221; branch. You might find yourself with a master branch that has 50+ commits and a handful of those are &#8220;stable&#8221; and rollback worthy. Here is a quick little reference on how to get tags in place so you can rollback to a stable commit [...]]]></description>
			<content:encoded><![CDATA[<p>If your workflow does not have a dedicated &#8220;production&#8221; and &#8220;development&#8221; branch. You might find yourself with a master branch that has 50+ commits and a handful of those are &#8220;stable&#8221; and rollback worthy.  Here is a quick little reference on how to get tags in place so you can rollback to a stable commit at a moments notice.</p>
<blockquote><p>If you don&#8217;t know how to tag in git you can read this <a href="http://progit.org/book/ch2-6.html" target="_blank">brief description on git tags</a>. This post is about going back to your commit history and accurately placing your tags for future rollbacks.</p></blockquote>
<h2>Finding where to place your tags</h2>
<p>All you need for a git tag is the SHA1 of the commit for which you wish to tag. The trick is: How do I get a list of my commits and how tedious is it to copy the SHA1 for every tag? I know of two ways to get a list of your commits and their SHA1s.</p>
<h2>A.) Use the log command to show a list of all commits</h2>
<p>This command will render a side by side of SHA1 and commit message. Note that for git tags you ONLY need the first 7 characters of the SHA1. No need to copy more than that manually.</p>
<pre class="brush: plain; title: ; notranslate">
git log --pretty=oneline
</pre>
<p><img width="100%" src="http://dl.dropbox.com/u/5156502/git-pretty-log.PNG" /></p>
<h2>B.) Github is your friend</h2>
<p>My method of choice is to use <a href="http://github.com">Github.com</a>&#8216;s interface to copy the SHA1s I need. Not only can I copy the SHA1 to my clipboard but I can easy see exactly where in my commit history I want to place my tag. <a href="http://github.com">Github.com</a>&#8216;s UI is slick and easy to use.<br />
<img width="100%" src="http://dl.dropbox.com/u/5156502/github-copy-sha.png" /></p>
<h2>Placing your tags</h2>
<p>The hard part is done. Whether you are using Github.com to copy your SHA1s to your clipboard or using the log command to write down the first 7 characters of the SHA1 you are good to go. Let&#8217;s suppose you want to create a tag named <strong>&#8220;v1.0&#8243;</strong> at <strong>commit ec32d32</strong>.</p>
<pre class="brush: plain; title: ; notranslate">
git tag v1.0 ec32d32
</pre>
<h2>Deleting tags</h2>
<p>Sometimes you make a mistake or you prematurely release a &#8220;stable&#8221; tag then realize it is far from stable. Let&#8217;s delete tag &#8220;v1.0&#8243;.</p>
<pre class="brush: plain; title: ; notranslate">git tag -d v1.0</pre>
<h2>Pushing tags to a remote server</h2>
<p>Tags do not get pushed by default to a remote. Also, if you created a lot of tags for your commit history you can easily push them all to a remote server.</p>
<pre class="brush: plain; title: ; notranslate">git push origin --tags</pre>
<p>You can easily place a handful of tags into the proper place in your commit history. If you have a nice method you use please share in the comments below.</p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fgit%2Fadding-git-tags-to-your-commit-history%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/git/adding-git-tags-to-your-commit-history/" data-count="horizontal" data-via="mexitek" data-text="Adding Git Tags To Your Commit History">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/git/adding-git-tags-to-your-commit-history/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/git/adding-git-tags-to-your-commit-history/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/git/adding-git-tags-to-your-commit-history/";
							  reddit_title = "Adding Git Tags To Your Commit History";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/git/adding-git-tags-to-your-commit-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Untrack Files In Git Repos Without Deleting Them</title>
		<link>http://www.arlocarreon.com/blog/git/untrack-files-in-git-repos-without-deleting-them/</link>
		<comments>http://www.arlocarreon.com/blog/git/untrack-files-in-git-repos-without-deleting-them/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 19:45:47 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=296</guid>
		<description><![CDATA[For whatever reason, sometimes we find ourselves in these &#8220;pickles&#8221; where we need to delete a file in our Git repo but we don&#8217;t want the file to be deleted when others pull from the server. Better said, we want to untrack files from our Git Repo. The answer to your problems is: Scenario Your [...]]]></description>
			<content:encoded><![CDATA[<p>For whatever reason, sometimes we find ourselves in these &#8220;pickles&#8221; where we need to delete a file in our Git repo but we don&#8217;t want the file to be deleted when others pull from the server. Better said, we want to untrack files from our Git Repo.</p>
<p>The answer to your problems is:</p>
<pre class="brush: plain; title: ; notranslate">
echo &quot;FILE_NAME&quot; &gt;&gt; .gitignore
git rm --cached FILE_NAME
</pre>
<h2>Scenario</h2>
<p><img src="http://dl.dropbox.com/u/5156502/git-repo-current-state.png" width="100%"/><br />
Your Git repo is in full play. Developers have it in their workstations and the initial pull is now on production and development servers.  Everyone has changed setting in their config file to match their local machine, same on production and development, but no one wants to push those changes. AHH! We need to untrack this file(s).</p>
<h2>Don&#8217;t Delete</h2>
<p>What you DON&#8217;T want to do is delete the file <code>git rm FILE_NAME</code>. Doing so will have a ripple affect on everyone&#8217;s next pull from the git server.<br />
<img width="100%" src="http://dl.dropbox.com/u/5156502/git-repo-delete-file.png" /></p>
<h2>Solution</h2>
<ol>
<li> Add the filename to your .gitignore file (if you don&#8217;t have one, create it). This will make sure git ignores changes to this file(s) for all future commits. </li>
<li> Remove the HISTORY of the config file(s) not the file itself. This causes git to have amnesia about the existence of your config file(s)</li>
</ol>
<pre class="brush: plain; title: ; notranslate">
echo &quot;FILE_NAME&quot; &gt;&gt; .gitignore
git rm --cached FILE_NAME
</pre>
<p><img width="100%" src="http://dl.dropbox.com/u/5156502/git-repo-desired.png" /></p>
<h2>Resources</h2>
<p>Feel free to download the diagrams: <a href="https://docs.google.com/drawings/d/1GVPKp0YiPksLQVZOOZyzuH6E30fSN9pgCEqCR9Njqzs/edit?hl=en_US" title="Google Docs Drawing" target="_blank">Google Docs Drawing</a><br />
Below is a code snippet I used. Given that all your config files end in &#8220;.config&#8221;, this could work for you too.  You can also use this technique to untrack unit tests, SQL or other files.<br />
<script src="https://gist.github.com/1227224.js?file=ignoreConfigs.sh"></script></p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fgit%2Funtrack-files-in-git-repos-without-deleting-them%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/git/untrack-files-in-git-repos-without-deleting-them/" data-count="horizontal" data-via="mexitek" data-text="Untrack Files In Git Repos Without Deleting Them">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/git/untrack-files-in-git-repos-without-deleting-them/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/git/untrack-files-in-git-repos-without-deleting-them/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/git/untrack-files-in-git-repos-without-deleting-them/";
							  reddit_title = "Untrack Files In Git Repos Without Deleting Them";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/git/untrack-files-in-git-repos-without-deleting-them/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Symbolic Links In Workflow</title>
		<link>http://www.arlocarreon.com/blog/git/symbolic-links-in-workflow/</link>
		<comments>http://www.arlocarreon.com/blog/git/symbolic-links-in-workflow/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 04:21:48 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=270</guid>
		<description><![CDATA[Recently, I have been using and abusing symbolic links at the work place. So i figured, hey why not share my workflow? Using symbolic links as a local source control system can save lots of time and head aches. Shortcuts Don&#8217;t Cut It Shortcuts are actual files (.lnk on windows) that perform the task of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I have been using and abusing symbolic links at the work place. So i figured, hey why not share my workflow?  Using symbolic links as a local source control system can save lots of time and head aches.</p>
<h2>Shortcuts Don&#8217;t Cut It</h2>
<p>Shortcuts are actual files (.lnk on windows) that perform the task of opening the original file or folder, via a mouse click.  The problem with shortcuts is that you cannot use a shortcut like you would the original file [or folder].  For example, if you place a shortcut of a picture into your dropbox folder the actual shortcut (.lnk) file would be uploaded to dropbox instead of the original picture. Duh!</p>
<h2>Symbolic Links</h2>
<p>Unlike shortcuts, symbolic links are actual representations of the file or folder being linked to.  The greatest part of symbolic links is that the link is not a duplicate copy of it&#8217;s linked source.  For example, if you create a symbolic link of your pictures directory (30GB) onto your Desktop the link will NOT take up another 30GB.  To learn more about symbolic links try out the <a href="http://en.wikipedia.org/wiki/Symbolic_link" target="_blank">wiki page</a>.</p>
<h3>Unix, Linux and Mac OSX</h3>
<pre class="brush: plain; title: ; notranslate">ln -s source_file link_name</pre>
<h3>Windows 7</h3>
<p>For files.</p>
<pre class="brush: bash; title: ; notranslate">mklink link_name path_to_source</pre>
<p>For folders/directories.</p>
<pre class="brush: bash; title: ; notranslate">mklink /D link_name path_to_source</pre>
<h2>Programming Workflow</h2>
<p>Recently I have been working on drupal modules and various drupal installs on my local machine.  In one instance I have a custom module installed on more than one drupal site (localhost).  At first I would copy paste the files into each drupal site after each module update, HELLOW! </p>
<p>I then decided to keep all 3rd party modules, themes or plugins in one directory called &#8220;repos&#8221; on my C:\ drive, C:\repos\.  By creating symbolic links from the &#8220;repos&#8221; directory to each drupal site I now had ONE original code source.  With one command <code class="bash">git pull origin</code> I update any module for ALL it&#8217;s occurrences in my local sites.<br />
<img src="/wp-content/uploads/SymbolicLinkDrawings.png" width="100%"/></p>
<h2>Other Uses</h2>
<p>I also use symbolic links at home with dropbox.  I create a link inside my dropbox folder for my pictures from iPhoto and Photo Booth.  This allows my wife to mindlessly transfer pictures from her SD card to our laptop and capture moments of our kids with photo booth. All the while, dropbox noticing the changes in the original folders and backing-up the pictures into our dropbox account immediately.</p>
<blockquote><p>I do not use iTunes, but in theory you could also keep a backup of your music.</p></blockquote>
<p><img src="/wp-content/uploads/SymbolicLinkDropbox.png" width="100%"/></p>
<h2>Conclusion</h2>
<p>Use symbolic links to save time and centralize your source code or other replicated data.  If you know of other cool ways to use symbolic links let me know in the comments!</p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fgit%2Fsymbolic-links-in-workflow%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/git/symbolic-links-in-workflow/" data-count="horizontal" data-via="mexitek" data-text="Symbolic Links In Workflow">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/git/symbolic-links-in-workflow/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/git/symbolic-links-in-workflow/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/git/symbolic-links-in-workflow/";
							  reddit_title = "Symbolic Links In Workflow";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/git/symbolic-links-in-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redmine Wiki HTML Utility</title>
		<link>http://www.arlocarreon.com/blog/redmine/redmine-wiki-html-utility/</link>
		<comments>http://www.arlocarreon.com/blog/redmine/redmine-wiki-html-utility/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 00:48:43 +0000</pubDate>
		<dc:creator>arlo</dc:creator>
				<category><![CDATA[Redmine]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.arlocarreon.com/?p=221</guid>
		<description><![CDATA[At work we use a project management system called Redmine. So far I have been very pleased with the ease of use, Git repository integration, issue tracking and wikis for all your projects. Redmine offers a lot more than just Git integration, issue tracking and wikis. It is also open source! Visit the website for [...]]]></description>
			<content:encoded><![CDATA[<p>At work we use a project management system called Redmine.  So far I have been very pleased with the ease of use, Git repository integration, issue tracking and wikis for all your projects. </p>
<blockquote><p><a href="http://www.redmine.org/" target="_blank">Redmine</a> offers a lot more than just Git integration, issue tracking and wikis.  It is also open source! Visit the <a href="http://www.redmine.org/" target="_blank">website</a> for more information.</p></blockquote>
<h2>In Action</h2>
<p><iframe src="http://www.screenr.com/embed/x4ds" width="450" height="274" frameborder="0"></iframe></p>
<h2>The Conflict</h2>
<p>I had just finished adding some new styles to our company style.ui.css file.  These new classes are to be used to create certain Web UI Components with ease. I started to document the use of these new UI components for my coworkers and took advantage of the <a href="http://www.redmine.org/projects/redmine/wiki/RedmineTextFormatting" target="_blank">textile formatting</a> available in Redmine wikis, especially the <a href="http://www.redmine.org/projects/redmine/wiki/RedmineTextFormatting#Code-highlighting" target="_blank">syntax highlighting</a>.</p>
<p>At the end, there was only one thing I REALLY wanted for this documentation, a demo (HTML/CSS).  Now, I know I could have made a separate HTML file, host it on our server and then link to it from the wiki. That approach just seemed to lame and I really wanted this &#8220;demo&#8221; habit to stick with my fellow coworkers, so I needed something easy to use.  Not being to familiar with wiki textiles I quickly abandoned my googling and started to create my own wiki macros.  Here is what I came up with</p>
<h2>The Plugin</h2>
<p>The plugin can be found or cloned from my <a href="https://github.com/mexitek/redmine_wiki_html_util" target="_blank">Github Repo</a>.  Let&#8217;s continue with how you would use the plugin.</p>
<h3>Plugin Installation</h3>
<p>Go to your Redmine plugin directory, for the bitnami Redmine VM it would be: </p>
<pre class="brush: bash; title: ; notranslate">~$ cd /opt/bitnami/apps/redmine/vendors/plugins/</pre>
<p>Then use git to down load the plugin into a folder. </p>
<pre class="brush: bash; title: ; notranslate">~$ sudo git clone git://github.com/mexitek/redmine_wiki_html_util.git</pre>
<p>Now, simply reset Redmine and you are done!</p>
<pre class="brush: bash; title: ; notranslate">~$ sudo /etc/init.d/bitnami restart</pre>
<h3>Exposed Macros</h3>
<p>Wiki HTML Utility exposes several macros to your Redmine Wikis:</p>
<ul>
<li>css_url() : allows you to &#8220;inject&#8221; an external stylesheet into the current wiki page</li>
<li>js_url() : allows you to &#8220;inject&#8221; an external javascript file into the current wiki page</li>
<li>html() : allows you to &#8220;inject&#8221; RAW HTML into the Wiki page</li>
</ul>
<h3>HTML()</h3>
<p>Embeds RAW HTML.   </p>
<pre class="brush: xml; title: ; notranslate">
{{html(
&lt;ul&gt;
   &lt;li&gt;option 1&lt;/li&gt;
   &lt;li&gt;option 2&lt;/li&gt;
   &lt;li&gt;option 3&lt;/li&gt;
&lt;/ul&gt;
)}}
</pre>
<blockquote><p>If you use HTML like the example above, the wiki will convert all newlines with &lt;br&gt;.  If you know of a way to access the unfiltered text let me know.</p></blockquote>
<h3>CSS_URL()</h3>
<p>This injects an external CSS file into the DOM (current wiki page). Notice the single quotes around the URL, this is very important.</p>
<pre class="brush: jscript; title: ; notranslate">
{{css_url('http://www.domain.com/css/styles.ui.css')}}
</pre>
<h3>JS_URL()</h3>
<p>This injects an external JS file into the DOM (current wiki page). Notice the single quotes around the URL, this is very important.</p>
<pre class="brush: jscript; title: ; notranslate">
{{js_url('http://www.domain.com/js/widget.js')}}
</pre>
<h2>Conclusion</h2>
<p>At the end of the day, you can inject JQuery and your CSS file into a wiki page and show off your awesome widgets! Live demos on a freaking wiki page! The possibilities are endless, kinda.</p>
<h2>See the code on Github.com</h2>
<p><a target="_blank" href="https://github.com/mexitek/redmine_wiki_html_util"><img width="300px" src="http://assets.warpspire.com/images/github/octocat.png" /></a></p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fwww.arlocarreon.com%2Fblog%2Fredmine%2Fredmine-wiki-html-utility%2F&amp;layout=button_count&amp;show_faces=false&amp;width=90px&amp;height=21px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.arlocarreon.com/blog/redmine/redmine-wiki-html-utility/" data-count="horizontal" data-via="mexitek" data-text="Redmine Wiki HTML Utility">Tweet</a></span><span class="mr_social_sharing"><g:plusone size="medium" href="http://www.arlocarreon.com/blog/redmine/redmine-wiki-html-utility/"></g:plusone></span><span class="mr_social_sharing"><script type="IN/Share" data-url="http://www.arlocarreon.com/blog/redmine/redmine-wiki-html-utility/" data-counter="right"></script></span><span class="mr_social_sharing"><script type="text/javascript">
							  reddit_url = "http://www.arlocarreon.com/blog/redmine/redmine-wiki-html-utility/";
							  reddit_title = "Redmine Wiki HTML Utility";
							</script>
							<script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://www.arlocarreon.com/blog/redmine/redmine-wiki-html-utility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

