<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - noah</title>
<link>http://snipplr.com/users/noah/tags/beginner</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 15 Feb 2012 13:28:45 GMT</pubDate>
<item>
<title>(Other) Beginner's instructions for compiling from source on OS X</title>
<link>http://snipplr.com/view/8749/beginners-instructions-for-compiling-from-source-on-os-x/</link>
<description><![CDATA[ <p>These are general instructions for compiling applications from source on OS X, leveraging the configure script that is included with most source packages these days :)  Its dead simple.</p> ]]></description>
<pubDate>Wed, 01 Oct 2008 11:17:34 GMT</pubDate>
<guid>http://snipplr.com/view/8749/beginners-instructions-for-compiling-from-source-on-os-x/</guid>
</item>
<item>
<title>(Perl) Grab linked files from a list of web pages</title>
<link>http://snipplr.com/view/3126/grab-linked-files-from-a-list-of-web-pages/</link>
<description><![CDATA[ <p>## how to use

`perl grabit.pl urls_for_download.txt`

Expects as argument the name of a file containing a newline-delimited list of URLs:

    http://example.com/coolstuff
    http://example.com/coolstuff/fun
    http://example.com/videos/explosions

When invoked, launches an interactive shell that asks what type of file should be downloaded.  Then downloads all the files that are linked from each of the listed Web pages.

Note that the location of the download folder is hard-coded to `c:/windows/desktop/grabit/` so you may want to change that before trying.

This script is also [available on Github](http://github.com/textarcana/scrapers/blob/643e6e7cb349fa94cbc3fc88e1d55c7b6a262d11/grabit.pl)

## Wait! Do you know about WGet and Curl?

This script is legacy.  People seem to like it (hey, I still use it) but today I would probably not write my own tool to download multiple files off remote sites.

Instead I would likely just use a command-line Web browser like [WGet](http://lifehacker.com/software/top/geek-to-live--mastering-wget-161202.php 'Gina Trapani of Lifehacker, on the way of the WGet ninja') or Curl.  [LWP-Request would also do the trick](http://snipplr.com/view/4063/download-linked-jpegs-from-a-web-page-on-the-command-line/)

## do not comment your code like this!

For a great explanation of the rather baroque commenting style I was using circa 2001, see [Steve Yegge's excellent article on code style: *Portait of a n00b.*](http://steve-yegge.blogspot.com/2008/02/portrait-of-n00b.html)  

Of course, when I sit down to write a Perl script today, I [use POD](http://snipplr.com/view/18611/perl-pod-embedded-documentation-example/) to format and publish my comments.</p> ]]></description>
<pubDate>Tue, 03 Jul 2007 22:31:30 GMT</pubDate>
<guid>http://snipplr.com/view/3126/grab-linked-files-from-a-list-of-web-pages/</guid>
</item>
<item>
<title>(Lisp) load an external file</title>
<link>http://snipplr.com/view/2933/load-an-external-file/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 18 Jun 2007 20:48:42 GMT</pubDate>
<guid>http://snipplr.com/view/2933/load-an-external-file/</guid>
</item>
<item>
<title>(JavaScript) Toggle the className of a DOM element</title>
<link>http://snipplr.com/view/2600/toggle-the-classname-of-a-dom-element/</link>
<description><![CDATA[ <p>Imagine an element that has two states, represented by two CSS classes named 'expanded' and 'contracted.'  This code toggles between the two states in the simplest possible fashion.</p> ]]></description>
<pubDate>Fri, 04 May 2007 08:45:52 GMT</pubDate>
<guid>http://snipplr.com/view/2600/toggle-the-classname-of-a-dom-element/</guid>
</item>
</channel>
</rss>
