<?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>Cretaceous Labs &#187; Uncategorized</title>
	<atom:link href="http://cretaceouslabs.com/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://cretaceouslabs.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 10 Oct 2010 20:02:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rails 3 console and &#8220;no such file to load&#8221;</title>
		<link>http://cretaceouslabs.com/blog/2010/10/rails-3-console-file-load/</link>
		<comments>http://cretaceouslabs.com/blog/2010/10/rails-3-console-file-load/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 20:02:50 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=227</guid>
		<description><![CDATA[If you happen to load gems in your ~/.irbrc , make sure to add a gem dependency on them in your Rails apps&#8217; Gemfile.
For example, I just started using Awesome Print in IRB. However, when I ran rails console , this error occurred:
no such file to load -- ap
After searching Google, I learned that Awesome [...]]]></description>
			<content:encoded><![CDATA[<p>If you happen to load gems in your <em>~/.irbrc</em> , make sure to add a gem dependency on them in your Rails apps&#8217; <em>Gemfile</em>.</p>
<p>For example, I just started using <a title="Awesome Print Ruby Gem" href="https://rubygems.org/gems/awesome_print">Awesome Print</a> in IRB. However, when I ran <em>rails console</em> , this error occurred:</p>
<pre>no such file to load -- ap</pre>
<p>After searching Google, I learned that <a title="Awesome Print Ruby Gem" href="https://rubygems.org/gems/awesome_print">Awesome Print</a> needs to be listed in my <em>Gemfile</em> . Easy enough:</p>
<pre>## ~/.irbrc
require 'rubygems'
require 'ap'

## ~/src/rails_3_app/Gemfile
group :development do
  gem 'awesome_print'
end</pre>
]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/10/rails-3-console-file-load/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Matching Printable Characters</title>
		<link>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:10:17 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=138</guid>
		<description><![CDATA[Who doesn&#8217;t love regular expressions? They&#8217;re fucking awesome. I use&#8217;em at least 10 times per day.
Sometimes, there&#8217;re restrictions on what patterns you can use. I wanted to change a regex for validating passwords. Originally, it allowed letters, numbers, and a seemingly random collection of special characters. How lame is this?:
^[A-Za-z0-9]{1}[A-Za-z0-9_\\.\\!\@\#\-]{0,255}$
Not only are the allowed special [...]]]></description>
			<content:encoded><![CDATA[<p>Who doesn&#8217;t love regular expressions? <a href="/blog/wp-content/uploads/2009/11/dino-riders.jpg" alt="Dino-Riders: They're fucking awesome">They&#8217;re fucking awesome.</a> I use&#8217;em at least 10 times per day.</p>
<p>Sometimes, there&#8217;re restrictions on what patterns you can use. I wanted to change a regex for validating passwords. Originally, it allowed letters, numbers, and a seemingly random collection of special characters. How lame is this?:</p>
<pre>^[A-Za-z0-9]{1}[A-Za-z0-9_\\.\\!\@\#\-]{0,255}$</pre>
<p>Not only are the allowed special characters arbitrary, but they&#8217;re escaping characters in a character class, and using &#8220;{1}&#8221;.</p>
<p>I tried changing the regex to this:</p>
<pre>^[[:print:]]{0,255}$</pre>
<p>Unfortunately, that wasn&#8217;t considered &#8220;valid&#8221; by the system in question. Luckily, there&#8217;s a fairly concise alternative:</p>
<pre>^[\x20-\x7E]{0,255}$</pre>
<p>If you find a system that lacks support for POSIX character classes, check out <a href="http://en.wikipedia.org/wiki/Regular_expression#POSIX_character_classes" alt="POSIX character classes on Wikipedia">this Wikipedia article</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

