<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Jico Baligod</title>
 <link href="http://baligod.com/atom.xml" rel="self"/>
 <link href="http://baligod.com/"/>
 <updated>2012-12-02T16:08:54-05:00</updated>
 <id>http://baligod.com</id>
 <author>
   <name>Jico Baligod</name>
 </author>
 
 
 <entry>
   <title>LESS extends suck</title>
   <link href="http://baligod.com/posts/less-extends-suck"/>
   <updated>2012-12-02T00:00:00-05:00</updated>
   <id>http://baligod.com/posts/less-extends-suck</id>
   <content type="html">&lt;p&gt;CSS preprocessors such as &lt;a href=&quot;http://sass-lang.com/&quot;&gt;Sass&lt;/a&gt; and &lt;a href=&quot;http://lesscss.org/&quot;&gt;LESS&lt;/a&gt; provide a really great way to modularize and reuse our CSS properties with the &lt;code&gt;@extend&lt;/code&gt; concept. Extending essentially allows us to inherit properties from another existing selector. This is especially powerful in Sass, as it merely modifies the extended CSS declaration. So something like:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scss&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.bar&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;@extend&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.foo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Outputs the following:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scss&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.foo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.bar&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.bar&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Stupidly simple and highly efficient.&lt;/p&gt;

&lt;h2&gt;Where LESS does less&lt;/h2&gt;

&lt;p&gt;We can do the same thing in LESS:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scss&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.bar&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.foo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;But notice LESS doesn&amp;rsquo;t use an &lt;code&gt;@extend&lt;/code&gt; keyword, instead we just drop in the selector. The funny thing that&amp;rsquo;s not so funny is, we use periods to include LESS mixins as well, which can make our LESS code pretty convoluted. So what happens when we have a class &lt;em&gt;and&lt;/em&gt; a mixin called &lt;code&gt;foo&lt;/code&gt;? It turns out that both the &lt;code&gt;foo&lt;/code&gt; mixin is included and the &lt;code&gt;.foo&lt;/code&gt; class extended. Obviously this conflict will only occur when extending classes, but that&amp;rsquo;s likely 99% of the time. Granted we should probably avoid situations like this, but still, yikes.&lt;/p&gt;

&lt;p&gt;One other disadvantage of LESS extends is in the way it inherits the extended properties, which is by simply copying those properties into the extending block. The above LESS code will output the following:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scss&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.bar&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Still stupidly simple, yet not so efficient. For small projects with minimal CSS, the extra generated output is negligible. But imagine a large project where we want to modularize our CSS for easy maintainability and updates. Extending large classes would keep things very clean, but the output of these extends may add unnecessary weight to your CSS files.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>automata</title>
   <link href="http://baligod.com/posts/automata"/>
   <updated>2012-05-11T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/automata</id>
   <content type="html">&lt;h2&gt;The Gem&lt;/h2&gt;

&lt;p&gt;As a final project for my Theory of Computation class, I worked with &lt;a href=&quot;http://xannode.com/&quot;&gt;Lukas Sabota&lt;/a&gt; in writing this fine Gem for creating a number of types of &lt;a href=&quot;http://en.wikipedia.org/wiki/Automata_theory&quot;&gt;automata&lt;/a&gt;, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deterministic Finite Automata (DFA)&lt;/li&gt;
&lt;li&gt;Nondeterministic Finite Automata (NFA)&lt;/li&gt;
&lt;li&gt;Push-down Automata (PDA)&lt;/li&gt;
&lt;li&gt;Turing Machines&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;These automata are formally defined by &lt;em&gt;n&lt;/em&gt;-tuples, and as such we can build them by defining their corresponding instance fields in one of two ways: individually through setter methods, or through a structured YAML file. Once we&amp;rsquo;ve built our automaton, we&amp;rsquo;re then able to feed it input and evaluate the output.&lt;/p&gt;

&lt;p&gt;There&amp;rsquo;s a ton of documentation available at the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/jico/automata/wiki&quot;&gt;The GitHub Wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://rubydoc.info/gems/automata&quot;&gt;RubyDoc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;But wait! There&amp;rsquo;s more!&lt;/h2&gt;

&lt;p&gt;To make our Gem and its features more accessible to non-Rubyists, non-programmers, and other students, I spun up a little web interface for it at &lt;a href=&quot;http://automata.byji.co&quot;&gt;automata.byji.co&lt;/a&gt;. You&amp;rsquo;re able to build an automaton by defining its features via YAML structure. Once you&amp;rsquo;ve built your machine, you can then feed it input and evaluate its output.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>avcado.com</title>
   <link href="http://baligod.com/posts/avcado"/>
   <updated>2012-05-10T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/avcado</id>
   <content type="html">&lt;h2&gt;Overview&lt;/h2&gt;

&lt;p&gt;Shortly after getting into web development, I made a number of websites for some clients. Once their site was built, I would set up their domain under their own account at a registrar, and I&amp;rsquo;d push their site onto a cheap, shared host, also under their own account. I thought this was great! I could focus on other things without having to worry about managing their websites, and my clients weren&amp;rsquo;t paying much to keep their site up and running.&lt;/p&gt;

&lt;p&gt;It turns out this wasn&amp;rsquo;t the greatest set up after all. When I needed to make a change on one of their sites, it was a huge headache trying to push an update when the server constantly timed out, or better yet, threw me a 500 error while I couldn&amp;rsquo;t do anything about it. But I guess you get what you pay for.&lt;/p&gt;

&lt;p&gt;To make things easier for both myself and my clients, I decided to build &lt;a href=&quot;https://avcado.com&quot;&gt;avcado&lt;/a&gt;. The goal in building this is to abstract all of the technical details of running a website, from domain registration to hosting, for a minimal fee (just enough to cover my expenses). The benefit to me is that I have full control of my server, and hence the ability to make updates quickly and easily. &lt;em&gt;Avcado&lt;/em&gt; is the web portal for my clients to view their site&amp;rsquo;s analytics, as well as manage their billing information.&lt;/p&gt;

&lt;h2&gt;Metrics&lt;/h2&gt;

&lt;p&gt;Everyone loves graphs, it&amp;rsquo;s a fact. Clients want to see how their website&amp;rsquo;s performing, and they want to view this data easily. I recently discovered &lt;a href=&quot;http://gaug.es&quot;&gt;Gauges&lt;/a&gt; (now acquired by GitHub) and absolutely love their service, so I decided to plug into their API and bring their wonderful analytics data to my clients through &lt;em&gt;avcado&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I create a new Gauge and and add it to each website I make. A step-by-step process walks through creating a new client account on &lt;em&gt;avcado&lt;/em&gt;. During this process I can add a new domain or choose an existing one, automatically create a new Gauges API key, and then choose the corresponding Gauge to connect the website to. Just like that, my client has access to the following metrics from Gauges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traffic&lt;/li&gt;
&lt;li&gt;Content&lt;/li&gt;
&lt;li&gt;Referrers&lt;/li&gt;
&lt;li&gt;Search Terms&lt;/li&gt;
&lt;li&gt;Search Engines&lt;/li&gt;
&lt;li&gt;Locations&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Most of the data is read well enough in tabular or list form. But there are a couple metrics that can be enhanced with a chart or graph, such as the Traffic and the Search Engines metrics. Using &lt;a href=&quot;http://code.shutterstock.com/rickshaw/&quot;&gt;Rickshaw&lt;/a&gt;, a graphing toolkit by Shutterstock built on  &lt;a href=&quot;http://mbostock.github.com/d3/&quot;&gt;d3&lt;/a&gt;, I can create a nifty interactive chart for traffic analytics to show the number of people and views for each day in the current month. As for the Search Engines metric, I use &lt;a href=&quot;http://www.rgraph.net/&quot;&gt;RGraph&lt;/a&gt;, an HTML5 Canvas based graphing toolkit, to generate a little donut chart of the search engines split.&lt;/p&gt;

&lt;p&gt;A map for the Locations metric would be super useful. I&amp;rsquo;m working on that.&lt;/p&gt;

&lt;h2&gt;Billing&lt;/h2&gt;

&lt;p&gt;Payments, subscriptions, and invoicing has been made incredibly easy thanks to &lt;a href=&quot;https://stripe.com/&quot;&gt;Stripe&lt;/a&gt;. Using their awesome API, I can even create new subscriptions, coupons, and invoices right from the &lt;em&gt;avcado&lt;/em&gt; admin section. Aside from making payments simple, my clients' payment information is also secured, since I don&amp;rsquo;t need to worry about storing it on my own servers.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Katie Boyd Photography</title>
   <link href="http://baligod.com/posts/katie-boyd-photography"/>
   <updated>2012-04-15T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/katie-boyd-photography</id>
   <content type="html">&lt;h2&gt;About the artist&lt;/h2&gt;

&lt;p&gt;Katie Boyd is a photographer and Fine Arts student based in New Jersey. She&amp;rsquo;s keen on shooting surrealist, conceptual photography, but you can also find her snapping portraits, landscapes, and the like. Aside from working the camera, she also enjoys making paper sculptures from books and has recently taken up some graphic design projects on the side.&lt;/p&gt;

&lt;h2&gt;On the website&lt;/h2&gt;

&lt;p&gt;With her senior project finished and on display at The Richard Stockton College of New Jersey, we decided it was time for a major redesign of her website. We had an HTML5 canvas-based website in the works for some time, but we scratched it and started new. This website is the culmination of a couple long nights of hacking, just in time for her Senior Project Exhibition reception.&lt;/p&gt;

&lt;h2&gt;Notable features&lt;/h2&gt;

&lt;p&gt;Aside from serving as a portfolio, Katie&amp;rsquo;s website is also an experiment of some of the latest CSS features, with a little Javascript goodness baked in. Some of the neat things about this website:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The front book cover is built using CSS 3D transforms to construct the front, inner cover side, and edge.&lt;/li&gt;
&lt;li&gt;CSS transitions + CSS 3D transforms are used to achieve a 3D opening for the front cover. No 3D glasses required (unless you want to wear them, I won&amp;rsquo;t stop you).&lt;/li&gt;
&lt;li&gt;The postcard and polaroid tucked under the book are clickable. They use CSS animations to slide out and center. The top navigation bar also initiates the same animations respective to each element.&lt;/li&gt;
&lt;li&gt;Images and photosets are hosted on &lt;a href=&quot;http://www.flickr.com/photos/katelynboyd/&quot; title=&quot;Katie's Flickr page&quot;&gt;Flickr&lt;/a&gt;. They&amp;rsquo;re automatically pulled at start and arranged by photoset as a menu on the polaroid. We used &lt;a href=&quot;http://fancyapps.com/fancybox/&quot; title=&quot;Fancybox jQuery plugin&quot;&gt;Fancybox&lt;/a&gt; for a rockin' lightbox gallery.&lt;/li&gt;
&lt;li&gt;We integrate some sweet browser history features. Navigate through the site and try hitting your browser&amp;rsquo;s &lt;em&gt;Back&lt;/em&gt; button!&lt;/li&gt;
&lt;li&gt;The different page sections are bookmark-friendly. Hitting &lt;a href=&quot;http://katieboydphotography.com/#gallery&quot;&gt;http://katieboydphotography.com/#gallery&lt;/a&gt; will automagically pull up the Gallery section for you. Neato.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Browser support&lt;/h2&gt;

&lt;p&gt;The site uses some new CSS3 features to achieve a pretty sweet interactive experience. You&amp;rsquo;ll need to view the page in a modern web browser, such as the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Firefox 10.0+&lt;/li&gt;
&lt;li&gt;Safari 5.0+&lt;/li&gt;
&lt;li&gt;iOS Safari and Android browser 3.0+ (Supported, but not tested on touch devices yet)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Unsupported browsers get redirected to &lt;a href=&quot;/posts/katie-boyd-photography-v1&quot;&gt;the old version&lt;/a&gt; of the site, which you can still check out &lt;a href=&quot;http://katieboydphotography.com/v1&quot;&gt;here&lt;/a&gt;. A new fallback page is in development for better degradation with unsupported browsers.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Git Info in Rails</title>
   <link href="http://baligod.com/posts/git-info-in-rails"/>
   <updated>2012-03-27T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/git-info-in-rails</id>
   <content type="html">&lt;h2&gt;Initializer&lt;/h2&gt;

&lt;p&gt;When developing a Rails application (or any app) with Git, it&amp;rsquo;s sometimes useful to see which branch or commit you&amp;rsquo;re currently on. You can initialize some global constants pretty easily in Rails by creating a file under your &lt;code&gt;config/initializers/&lt;/code&gt; directory. I like to make a single file with all of my application-wide constants in &lt;code&gt;config/initializers/global_constants.rb&lt;/code&gt;, but you can also split it up into specific files like &lt;code&gt;config/intializers/git_info.rb&lt;/code&gt; for example.&lt;/p&gt;

&lt;h2&gt;Git information&lt;/h2&gt;

&lt;p&gt;To get your current branch and commit information, just stick this in your initializer file:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Get branch information&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;GIT_BRANCH&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`git branch`&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;last&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;GIT_COMMIT&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`git log | sed -n 1p`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;If you come across some color codes in the output, you can strip it out like so&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Strip out color codes&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;GIT_COMMIT&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`git log | sed -n 1p`&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gsub&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Tags and versions&lt;/h2&gt;

&lt;p&gt;A great feature of Git is &lt;a href=&quot;http://learn.github.com/p/tagging.html&quot; title=&quot;Git Tagging&quot;&gt;tagging&lt;/a&gt;, which is typically used to tag version numbers, feature releases, and patches. An annotated tag is probably the simplest way to tag the current or any specified commit. For example:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sh&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Simple annotated tagging&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git tag -a v1.0.0 454ef4d -m &lt;span class=&quot;s1&quot;&gt;&amp;#39;Initial public release!&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Note that you can drop the &lt;code&gt;454ef4d&lt;/code&gt; commit specification, which would then just tag the current commit. You can also sign your tags with &lt;a href=&quot;http://www.gnupg.org/&quot; title=&quot;GPG&quot;&gt;GPG&lt;/a&gt; using the &lt;code&gt;-s&lt;/code&gt; option instead of the &lt;code&gt;-a&lt;/code&gt; option. If you&amp;rsquo;re on GitHub, you can push your tags using &lt;code&gt;git push --tags&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you&amp;rsquo;ve been tagging along, a neat thing you can do is to display the latest version number or release in your application. Again, we can do this by creating a global constant&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Get latest tag information&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;APP_VERSION&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`git describe --tags`&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;which will output something similar to &lt;code&gt;v1.0.0-1-g6a9ee26&lt;/code&gt;. The format here is &lt;code&gt;[tag name]-[# commits ahead]-[current commit]&lt;/code&gt;. This might be useful in a development environment, but you might want to strip it down to just the version number or tag name in your production app:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Get only tag name&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;APP_VERSION&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`git describe --tags \`&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rev&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tags&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;
&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Now you can print the &lt;code&gt;APP_VERSION&lt;/code&gt; or any of the other constants out in one of your views, like your site&amp;rsquo;s footer, and make your app feel super official.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>yawn</title>
   <link href="http://baligod.com/posts/yawn"/>
   <updated>2012-02-22T00:00:00-05:00</updated>
   <id>http://baligod.com/posts/yawn</id>
   <content type="html">&lt;p&gt;I&amp;rsquo;m somewhat of a night owl. Lately I&amp;rsquo;ve found myself staying up later than usual, which I wouldn&amp;rsquo;t mind too much if I didn&amp;rsquo;t have morning classes &lt;em&gt;everyday&lt;/em&gt;. It&amp;rsquo;s a little difficult to try to increase my quantity of sleep every night, so I opted to try to improve my quality of sleep every night.&lt;/p&gt;

&lt;h2&gt;Enter, Sleepytime&lt;/h2&gt;

&lt;p&gt;A nifty site popped up a short while ago on &lt;a href=&quot;http://news.ycombinator.com/item?id=3596996&quot;&gt;Hacker News&lt;/a&gt; called &lt;a href=&quot;http://www.sleepyti.me&quot;&gt;Sleepyti.me&lt;/a&gt;, which helps you determine the optimal times to fall asleep or wake up, based on the notion of 90-minute sleep cycles. Essentially, we fluctuate in and out of different sleep phases categorized by levels/patterns of brain activity, from light REM sleep to shorter time periods of deep sleep. Waking up during this deep sleep phase is no bueno, and leaves you feeling tired and groggy. So the goal here is to wake up &lt;em&gt;between&lt;/em&gt; sleep cycles, at which you&amp;rsquo;ll feel more energized and replenished.&lt;/p&gt;

&lt;p&gt;I vaguely remember this discussion in my Intro to Psych class, and sounding convincing enough I thought I&amp;rsquo;d give it a whirl. I&amp;rsquo;ve been getting into the habit of hitting up Sleepyti.me when I&amp;rsquo;m ready to go to bed to find out when to sleep/wake up. So far it&amp;rsquo;s turned out to be great, as I feel pretty recharged even after those super late nights.&lt;/p&gt;

&lt;h2&gt;yawn&lt;/h2&gt;

&lt;p&gt;Am I boring you? Fine, I&amp;rsquo;ll get to the point! Check it. I&amp;rsquo;m usually always on the computer right before I hit the hay. Sleepyti.me has become pretty routine after the past couple weeks, so I thought, &amp;ldquo;Wouldn&amp;rsquo;t it be great if there was a Sleepyti.me shell script?&amp;rdquo;&lt;/p&gt;

&lt;p&gt;Yeah! Thus, &amp;ldquo;yawn&amp;rdquo; came to fruition in between classes. It&amp;rsquo;s a simple shell script with the same function of calculating optimal sleep/wake times on the basis of 90-minute sleep cycles. No mouse clicks, and you save like, 3 seconds.&lt;/p&gt;

&lt;h3&gt;When should I wake up?&lt;/h3&gt;

&lt;p&gt;Good question. Just &lt;code&gt;yawn&lt;/code&gt; and you&amp;rsquo;ll know right away!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/static/img/yawn-1.jpg&quot; alt=&quot;yawn&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Wait. What if I want to wake up around 7am? No probs, just yawn and it&amp;rsquo;s on! Erm&amp;hellip; I mean, you can find out the best times to go to bed.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/static/img/yawn-2.jpg&quot; alt=&quot;yawn wake&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Sweet! All the output times account for the average time to fall asleep (14 minutes). So if it says you should go to bed at 10:00pm, then it assumes you&amp;rsquo;ll be asleep in around 14 minutes. No need to make adjustments. If it takes you longer (or shorter) to fall asleep, you can adjust the time in the script!&lt;/p&gt;

&lt;p&gt;That&amp;rsquo;s all there is to it for now. Kudos to &lt;a href=&quot;http://sleepyti.me&quot;&gt;Sleepyti.me&lt;/a&gt; for the inspiration. Check out the source on &lt;a href=&quot;http://www.github.com/jico/yawn&quot;&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Brand spankin' new</title>
   <link href="http://baligod.com/posts/brand-spankin-new"/>
   <updated>2012-02-20T00:00:00-05:00</updated>
   <id>http://baligod.com/posts/brand-spankin-new</id>
   <content type="html">&lt;h2&gt;New year, new home&lt;/h2&gt;

&lt;p&gt;Page, that is. This must be the third redesign of my website in the past year. You heard right, THIRD. &amp;ldquo;But this is the one,&amp;rdquo; I always say. False. I keep scrapping and rebuilding this darn site. It&amp;rsquo;s not that I thought the old versions were bad, they just could be better. Hence, this latest redesign: stronger, better, faster.&lt;/p&gt;

&lt;h2&gt;Is that a blog I see?&lt;/h2&gt;

&lt;p&gt;Yes, it is, thanks for noticing!&lt;/p&gt;

&lt;p&gt;Aside from my insatiable appetite for changing my home page, the main purpose of this latest iteration was to launch not just a splash page but also a blog. I&amp;rsquo;ve been wanting to blog about more than memes and cat gifs (I less than three you, Tumblr), specifically about my latest findings, projects, hacks, and other snippets I feel like sharing. Not only do I push content out into the Web, I also benefit by gaining a better understanding of what I write about, more practice expressing ideas clearly and concisely, and a neat log of milestones in my development career.&lt;/p&gt;

&lt;h2&gt;Dr. Jekyll&lt;/h2&gt;

&lt;p&gt;I had a tough time choosing which blogging platform to host this site on. It eventually boiled down to Tumblr and Jekyll. The appeal of Tumblr came from the fact that I was already always on it, which I felt would have motivated me to blog more. It also has a pretty simple editing and publishing platform, not to mention easy theme rolling.&lt;/p&gt;

&lt;p&gt;I started developing the new site on Tumblr for some time, then stumbled across Jekyll. After some contemplating, Jekyll seemed to be the better solution for the following reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I get to own, manage, and completely customize my posts, data, etc.&lt;/li&gt;
&lt;li&gt;Jekyll builds static pages, which I can serve up really quickly.&lt;/li&gt;
&lt;li&gt;Markdown is awesomely simple!&lt;/li&gt;
&lt;li&gt;I can roll my own publishing and deployment methods.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The last point has turned out to be the coolest. Working at Linode for the past few months, I&amp;rsquo;ve grown to love the command line. A &lt;em&gt;lot&lt;/em&gt;. It&amp;rsquo;s oddly exhilarating to be able to draft a new page with a &lt;code&gt;rake new:post&lt;/code&gt; and publish it with a simple &lt;code&gt;rake publish &amp;amp;&amp;amp; rsync&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;m looking forward to writing more and building out this site&amp;rsquo;s content (as it&amp;rsquo;s pretty empty right now). As for the design, I think it&amp;rsquo;s here to stay, at least for a little while. I can&amp;rsquo;t promise I won&amp;rsquo;t be making a few tweaks here and there.&lt;/p&gt;

&lt;p&gt;P.S. You can view the source on &lt;a href=&quot;http://github.com/jico/baligod.com&quot;&gt;GitHub&lt;/a&gt;! Feel free to do what you want with it. I&amp;rsquo;d appreciate if you didn&amp;rsquo;t copy it &lt;em&gt;exactly&lt;/em&gt; though.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Marie Elaine Lanza</title>
   <link href="http://baligod.com/posts/marie-elaine-lanza"/>
   <updated>2011-09-26T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/marie-elaine-lanza</id>
   <content type="html">&lt;p&gt;Marie Elaine Lanza is a ceramics artist based in Cape May Courthouse. She designs and produces functional earthenware pottery out of her home studio and showroom. Her work is an exemplified display of brilliant colors, aquatic visuals, and calligrophic strokes of paint.&lt;/p&gt;

&lt;p&gt;Her website is an embodiment of her work, from the contemporary style to contrasting palette and typefaces. A touch of javascript adds some dynamic elements to the pages and a slight modern feel. The website also acts as her online storefront, offering the pieces featured for sale either through PayPal or a custom request form. A custom backend administrative system also gives her nearly complete access to modify and update copy, gallery items, and more.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Genie Salon</title>
   <link href="http://baligod.com/posts/genie-salon"/>
   <updated>2011-08-24T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/genie-salon</id>
   <content type="html">&lt;p&gt;The Genie Salon and Spa is a full service salon located in Brigantine, NJ. Their website provides business details in a contemporary setting, while maintaining some modern features. The single page site relies on Javascript/jQuery and a touch of CSS3 to create smooth background and section transitions. Their Services and Team sections feature tiered-column layouts for easy navigation.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Jacqueline Boyd Fine Art</title>
   <link href="http://baligod.com/posts/jacqueline-boyd-fine-art"/>
   <updated>2011-05-12T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/jacqueline-boyd-fine-art</id>
   <content type="html">&lt;p&gt;Jacqueline Boyd is a fine artist based in Brigantine, NJ, who works prominently with oil and acrylic to create pieces of painterly realism to abstraction. She recently opened her own studio in Brigantine, which is one of a kind in South Jersey. The Jacqueline Boyd Fine Art Studio functions as her working studio, as well as a venue for art shows, classes, and other events.&lt;/p&gt;

&lt;p&gt;The website serves as both a gallery for her work and her studio page. It features a full back-end administration system that allows her to add/update classes, events, and exhibitions, as well as modify pieces of text including studio info, her biography, and others.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>ATCLP</title>
   <link href="http://baligod.com/posts/ATCLP"/>
   <updated>2011-05-04T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/ATCLP</id>
   <content type="html">&lt;p&gt;The ATCLP was a semester-long, group project for Stockton&amp;rsquo;s Software and Security Engineering I course, in collaboration with the Federal Aviation Administration. The FAA&amp;rsquo;s Human Factors Team &amp;ndash; Atlantic City, conducts research to ensure that systems that include human operators and maintainers perform as effectively and safely as possible. They employ advanced virtual reality simulations for air traffic controllers to interact with, however, the commands are interpreted by behind-the-scenes human controllers, who take the ATC commands and manually enter them into the VR system.&lt;/p&gt;

&lt;p&gt;The goal of this project was to develop a system able to take a transcripted ATC command and interpret it to return the recipient, instruction type, and parameter. Our team successfully developed the system over a span of three months. At the end of the semester, our ATCLP was implemented with CMU&amp;rsquo;s open-source Sphinx voice recognition software, along with the FAA&amp;rsquo;s air traffic simulation system. The resulting system took Voice to Text to a valid ATC command that could be understood by the FAA&amp;rsquo;s software.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>fflocks</title>
   <link href="http://baligod.com/posts/fflocks"/>
   <updated>2010-10-27T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/fflocks</id>
   <content type="html">&lt;p&gt;fflocks is a web service that pulls the latest images from the public Twitter timeline into a photostream. It queries Twitter&amp;rsquo;s Search API for tweets containing links to Twitpic, yFrog, Plixi/Lockerz or Twitgoo, then uses the appropriate service&amp;rsquo;s photo API to deliver the source image. Tweets on fflocks only go as far back as 48 hours.&lt;/p&gt;

&lt;p&gt;Aside from the photostream users can search through recent images, and view the album of any public profile. To view someone&amp;rsquo;s fflocks album, simply go to fflocks.com/username. Photo albums sift through the user&amp;rsquo;s tweets for any supported image links, and loads each photo and tweet into their album.&lt;/p&gt;

&lt;p&gt;fflocks spawned from a 4-hour hack and was built with PHP, jQuery, and of course, the Twitter API!&lt;/p&gt;

&lt;h2&gt;Oh no!&lt;/h2&gt;

&lt;p&gt;The site&amp;rsquo;s not in service at the moment (how sad..). I might be sticking it in a project archives page sometime soon.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Katie Boyd Photography (v1)</title>
   <link href="http://baligod.com/posts/katie-boyd-photography-v1"/>
   <updated>2010-09-08T00:00:00-04:00</updated>
   <id>http://baligod.com/posts/katie-boyd-photography</id>
   <content type="html">&lt;p&gt;Katie Boyd is a Fine Arts student and photographer based in South Jersey. She primarily shoots conceptual images, but is keen on snapping portraits and even her self-made paper sculptures from time to time.&lt;/p&gt;

&lt;h2&gt;First!&lt;/h2&gt;

&lt;p&gt;After taking my first programming class and being exposed to the &lt;em&gt;wonders&lt;/em&gt; of code at the start of 2010, I decided to dive head first into web design and web development over the summer. I needed a project to work on to better understand things. Luckily, my girlfriend wanted a web portfolio and was kind enough to let me develop one for her absolutely free of charge!&lt;/p&gt;

&lt;p&gt;After pouring over Internet references, tutorials, and a couple books, I cooked up my first ever website and launched it on a super-cheap, shared web host. The site was crafted using &lt;a href=&quot;http://validator.w3.org/check?uri=http%3A%2F%2Fkatieboydphotography.com%2F&quot;&gt;valid&lt;/a&gt; XHTML 1.0 Strict, a little CSS3, and jQuery for some subtle cloud-moving action, as well as the gallery (using the awesome &lt;a href=&quot;http://galleria.io/&quot;&gt;Galleria&lt;/a&gt; plugin).&lt;/p&gt;

&lt;p&gt;The site-wide graphics were done by the artist herself. Check out Katie&amp;rsquo;s work by visiting her &lt;a href=&quot;http://katieboydphotography.com/conceptual.html&quot;&gt;gallery&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>