<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - chrisaiv</title>
<link>http://snipplr.com/users/chrisaiv</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 04 Jul 2008 16:42:48 GMT</pubDate>
<item>
<title>(ActionScript 3) AS3: Creating a Gradient Rectangle</title>
<link>http://snipplr.com/view/7050/as3-creating-a-gradient-rectangle/</link>
<description><![CDATA[ <p>So I've always found gradients to be confusing until I found this great tutorial online.</p> ]]></description>
<pubDate>Tue, 01 Jul 2008 12:17:08 GMT</pubDate>
<guid>http://snipplr.com/view/7050/as3-creating-a-gradient-rectangle/</guid>
</item>
<item>
<title>(Ruby) Mixing in a Module immediately after an objects Singleton class</title>
<link>http://snipplr.com/view/6821/mixing-in-a-module-immediately-after-an-objects-singleton-class/</link>
<description><![CDATA[ <p>There are two ways to insert a module above the objects singleton class but before the objects Class</p> ]]></description>
<pubDate>Fri, 20 Jun 2008 19:58:38 GMT</pubDate>
<guid>http://snipplr.com/view/6821/mixing-in-a-module-immediately-after-an-objects-singleton-class/</guid>
</item>
<item>
<title>(Bash) Show .hidden folders and files in Os X Leopard</title>
<link>http://snipplr.com/view/6657/show-hidden-folders-and-files-in-os-x-leopard/</link>
<description><![CDATA[ <p>Some applications such as Flex Builder or SVN dump itty bitty hidden files that will screw up your workflow if you don't manage them.  Here's how to quickly identify them.</p> ]]></description>
<pubDate>Wed, 11 Jun 2008 19:37:14 GMT</pubDate>
<guid>http://snipplr.com/view/6657/show-hidden-folders-and-files-in-os-x-leopard/</guid>
</item>
<item>
<title>(CSS) How to use EM's when you're already comfortable with pixels</title>
<link>http://snipplr.com/view/6654/how-to-use-ems-when-youre-already-comfortable-with-pixels/</link>
<description><![CDATA[ <p>Here's why I use em:
1. Pixels are precise but they're not very flexible.  If you increase your browser's font-size, things may grow in wacky ways.
2. Percentages solve the issue of flexibility but sometimes the math gets tricky and I don't feel very comfortable purely working in that mode.  I believe in Rapid Development which in this context means fewer calculators.

By translating 1em to equal 10px, I am able to think in terms of Photoshop pixels but also ensure that increasing the font-size will allow the site to grow proportionally.  If you know how to multiply and divide by 10, you'll rarely need a calculator.

Note: The only time I do use px is for 1px borders.  0.1em doesn't work very well.</p> ]]></description>
<pubDate>Wed, 11 Jun 2008 12:02:24 GMT</pubDate>
<guid>http://snipplr.com/view/6654/how-to-use-ems-when-youre-already-comfortable-with-pixels/</guid>
</item>
<item>
<title>(ActionScript 3) AS3: Save JPEG's from Flash</title>
<link>http://snipplr.com/view/6653/as3-save-jpegs-from-flash/</link>
<description><![CDATA[ <p>I found this excellent tutorial on how to save JPEG images from Flash.  You will need the Adobe JPEG Encoder class which can be found here: http://code.google.com/p/as3corelib/.  You will also need some server-side action which in this case was done in PHP</p> ]]></description>
<pubDate>Wed, 11 Jun 2008 11:05:41 GMT</pubDate>
<guid>http://snipplr.com/view/6653/as3-save-jpegs-from-flash/</guid>
</item>
<item>
<title>(Rails) Installing ReCaptcha</title>
<link>http://snipplr.com/view/6614/installing-recaptcha/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 06 Jun 2008 21:34:37 GMT</pubDate>
<guid>http://snipplr.com/view/6614/installing-recaptcha/</guid>
</item>
<item>
<title>(Rails) Installing Restful Authentication</title>
<link>http://snipplr.com/view/6613/installing-restful-authentication/</link>
<description><![CDATA[ <p>I always forget the command needed to install RESTful authentication.</p> ]]></description>
<pubDate>Fri, 06 Jun 2008 21:32:27 GMT</pubDate>
<guid>http://snipplr.com/view/6613/installing-restful-authentication/</guid>
</item>
<item>
<title>(ActionScript 3) AS3: Regular Expression Basics</title>
<link>http://snipplr.com/view/6608/as3-regular-expression-basics/</link>
<description><![CDATA[ <p>1. RegExp.text(string) returns a Boolean
2. RegExp.exec(string) returns an Object
3. String.search(pattern) returns an int
4. String.match(pattern) returns an Array
5. String.replace(pattern, replace) returns a String</p> ]]></description>
<pubDate>Fri, 06 Jun 2008 13:12:47 GMT</pubDate>
<guid>http://snipplr.com/view/6608/as3-regular-expression-basics/</guid>
</item>
<item>
<title>(Ruby) Open a text file and re-write its contents into a new text file</title>
<link>http://snipplr.com/view/6583/open-a-text-file-and-rewrite-its-contents-into-a-new-text-file/</link>
<description><![CDATA[ <p>Basic example of how to open a text file and print them (including line-numbers) into a new text file</p> ]]></description>
<pubDate>Wed, 04 Jun 2008 20:03:34 GMT</pubDate>
<guid>http://snipplr.com/view/6583/open-a-text-file-and-rewrite-its-contents-into-a-new-text-file/</guid>
</item>
<item>
<title>(Bash) Creating a Simple Alias in Terminal</title>
<link>http://snipplr.com/view/6210/creating-a-simple-alias-in-terminal/</link>
<description><![CDATA[ <p>I use terminal for SFTP because I'm cheap and I don't want to purchase Transmit. SFTP works just fine but the problem is that I get tired of having to type [bash]$ sftp chrisaiv@blah.com:/directory/subdirectory/ so instead I've made an alias.  First things first, in terminal using Textmate, type [bash]$ mate ~/.bash_alias.  Next paste the code below.  After you save the file, type [bash]$ ~/.bash_profile and past the second line of code.  After you restart your terminal, you should only have to type the alias nickname and whala!</p> ]]></description>
<pubDate>Tue, 13 May 2008 14:37:46 GMT</pubDate>
<guid>http://snipplr.com/view/6210/creating-a-simple-alias-in-terminal/</guid>
</item>
<item>
<title>(ActionScript) AS2: Simple Send and Load</title>
<link>http://snipplr.com/view/5910/as2-simple-send-and-load/</link>
<description><![CDATA[ <p>This is pretty handy if you need to make a request to a server and receive a response.  For example, you want to send an e-mail in Flash using some PHP script.  On the PHP side, request will be sent as</p> ]]></description>
<pubDate>Fri, 18 Apr 2008 11:51:51 GMT</pubDate>
<guid>http://snipplr.com/view/5910/as2-simple-send-and-load/</guid>
</item>
<item>
<title>(ActionScript 3) Basic Framework for writing JavaScript injections</title>
<link>http://snipplr.com/view/5729/basic-framework-for-writing-javascript-injections/</link>
<description><![CDATA[ <p>Some pretty cool stuff.  You can write JavaScript injections from ActionScript including local &amp; global variables and functions.</p> ]]></description>
<pubDate>Mon, 07 Apr 2008 01:27:45 GMT</pubDate>
<guid>http://snipplr.com/view/5729/basic-framework-for-writing-javascript-injections/</guid>
</item>
<item>
<title>(ActionScript 3) Compare Two Dates</title>
<link>http://snipplr.com/view/5728/compare-two-dates/</link>
<description><![CDATA[ <p>This should come in handy some day.</p> ]]></description>
<pubDate>Mon, 07 Apr 2008 01:20:29 GMT</pubDate>
<guid>http://snipplr.com/view/5728/compare-two-dates/</guid>
</item>
<item>
<title>(ActionScript 3) Opening a Thick Box iFrame from Flash</title>
<link>http://snipplr.com/view/5727/opening-a-thick-box-iframe-from-flash/</link>
<description><![CDATA[ <p>Found this script on DesignFission's website and found it to be pretty handy.</p> ]]></description>
<pubDate>Mon, 07 Apr 2008 01:17:50 GMT</pubDate>
<guid>http://snipplr.com/view/5727/opening-a-thick-box-iframe-from-flash/</guid>
</item>
<item>
<title>(Perl) Find and Replace a string in a textfile within multiple folders</title>
<link>http://snipplr.com/view/5615/find-and-replace-a-string-in-a-textfile-within-multiple-folders/</link>
<description><![CDATA[ <p>I had a string within multiple files which were also within multiple folders that I wanted to replace</p> ]]></description>
<pubDate>Sun, 30 Mar 2008 19:34:57 GMT</pubDate>
<guid>http://snipplr.com/view/5615/find-and-replace-a-string-in-a-textfile-within-multiple-folders/</guid>
</item>
<item>
<title>(JavaScript) Params to JSON</title>
<link>http://snipplr.com/view/5598/params-to-json/</link>
<description><![CDATA[ <p>I found this neat little utility that will convert an array into JSON</p> ]]></description>
<pubDate>Fri, 28 Mar 2008 13:57:15 GMT</pubDate>
<guid>http://snipplr.com/view/5598/params-to-json/</guid>
</item>
<item>
<title>(SQL) MySQL Commands I wish I could remember</title>
<link>http://snipplr.com/view/5537/mysql-commands-i-wish-i-could-remember/</link>
<description><![CDATA[ <p>1. Load Data from a csv file
2. Backing up a complete database
3. Backing up a specific table
4. Backing up multiple databases
5. Restoring a database
6. Setting up foreign keys between two databases</p> ]]></description>
<pubDate>Sun, 23 Mar 2008 09:45:27 GMT</pubDate>
<guid>http://snipplr.com/view/5537/mysql-commands-i-wish-i-could-remember/</guid>
</item>
<item>
<title>(PHP) PHP MP3 playlist</title>
<link>http://snipplr.com/view/5513/php-mp3-playlist/</link>
<description><![CDATA[ <p>I found this script out in space and think it's rad.  Click on the URL to see this authors profile. The easiest way to use this script is to place it in the same directory as your mp3's then make a request to the php.  The php will return an XML with the song Path, Title, and Author which is great for Flash.</p> ]]></description>
<pubDate>Thu, 20 Mar 2008 18:23:45 GMT</pubDate>
<guid>http://snipplr.com/view/5513/php-mp3-playlist/</guid>
</item>
<item>
<title>(ActionScript 3) Flash E-mail This Validator</title>
<link>http://snipplr.com/view/5377/flash-email-this-validator/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 12 Mar 2008 01:28:21 GMT</pubDate>
<guid>http://snipplr.com/view/5377/flash-email-this-validator/</guid>
</item>
<item>
<title>(Apache) OS X.5: Configure Apache 2 to point at my Sites Directory (ver 2)</title>
<link>http://snipplr.com/view/5358/os-x5-configure-apache-2-to-point-at-my-sites-directory-ver-2/</link>
<description><![CDATA[ <p>There is another way to point Apache 2 to my Sites directory after upgrading Tiger to Leopard
1. I used textmate to open this file
/etc/apache2/httpd.conf
2. I commented this line
#DocumentRoot "/Library/WebServer/Documents"
3. Replaced it with this line instead
DocumentRoot "/Users/mac_user_shortname/Sites"
4. Added a file titled mac_user_shortname.conf to :
/etc/apache2/users/
5. Include this snippet into mac_user_shortname.conf</p> ]]></description>
<pubDate>Mon, 10 Mar 2008 14:33:20 GMT</pubDate>
<guid>http://snipplr.com/view/5358/os-x5-configure-apache-2-to-point-at-my-sites-directory-ver-2/</guid>
</item>
</channel>
</rss>