<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - Keef</title>
<link>http://snipplr.com/users/Keef</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 19 May 2013 18:21:40 GMT</pubDate>
<item>
<title>(DOS Batch) Set default printer</title>
<link>http://snipplr.com/view/58704/set-default-printer/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 15 Sep 2011 18:51:09 GMT</pubDate>
<guid>http://snipplr.com/view/58704/set-default-printer/</guid>
</item>
<item>
<title>(DOS Batch) Convert video for Andriod phone</title>
<link>http://snipplr.com/view/53186/convert-video-for-andriod-phone/</link>
<description><![CDATA[ <p>Drag n' drop files on the batch file. Requires ffmpeg, mplayer and wavegain.</p> ]]></description>
<pubDate>Sat, 07 May 2011 14:28:12 GMT</pubDate>
<guid>http://snipplr.com/view/53186/convert-video-for-andriod-phone/</guid>
</item>
<item>
<title>(Python) Grab a random wallpaper from wallbase.net</title>
<link>http://snipplr.com/view/43708/grab-a-random-wallpaper-from-wallbasenet/</link>
<description><![CDATA[ <p>This has been made for Windows but shouldn't be hard to convert for other OS's.</p> ]]></description>
<pubDate>Sun, 07 Nov 2010 22:39:31 GMT</pubDate>
<guid>http://snipplr.com/view/43708/grab-a-random-wallpaper-from-wallbasenet/</guid>
</item>
<item>
<title>(DOS Batch) Server backup</title>
<link>http://snipplr.com/view/36691/server-backup/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 05 Jul 2010 14:03:52 GMT</pubDate>
<guid>http://snipplr.com/view/36691/server-backup/</guid>
</item>
<item>
<title>(Python) AV Updates script</title>
<link>http://snipplr.com/view/36320/av-updates-script/</link>
<description><![CDATA[ <p>This is a rather nasty first attempt, while it works under Windows XP there is no real error checking.</p> ]]></description>
<pubDate>Fri, 25 Jun 2010 13:20:43 GMT</pubDate>
<guid>http://snipplr.com/view/36320/av-updates-script/</guid>
</item>
<item>
<title>(DOS Batch) Handbrake - Anime</title>
<link>http://snipplr.com/view/35326/handbrake--anime/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 30 May 2010 05:09:15 GMT</pubDate>
<guid>http://snipplr.com/view/35326/handbrake--anime/</guid>
</item>
<item>
<title>(PHP) CodeIgniter Extended Encryption Class</title>
<link>http://snipplr.com/view/28267/codeigniter-extended-encryption-class/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 13 Feb 2010 04:55:45 GMT</pubDate>
<guid>http://snipplr.com/view/28267/codeigniter-extended-encryption-class/</guid>
</item>
<item>
<title>(Python) Omegle class</title>
<link>http://snipplr.com/view/27621/omegle-class/</link>
<description><![CDATA[ <p>This is one of my first python programs so it's probably written very poorly...

Example use:

	print 'Connecting to omegle...'
	om = omegle()
	
	if om.chatid:
		print 'Chatid: '+ om.chatid
	else:
		if om.error:
			print om.error
		else:
			print 'No chatid given, we\'re possibly blocked.'
	
	# Wait for our connection
	while (not om.connected):
		om.getevents()
		sleep(0.5)
		
	# Connected; Drop a message
	om.send('HAI, ASL!? LOLO')
	
	# Main loop, check for responses
	while (om.connected):
		om.getevents()
		
		if not om.error:
			if om.message:
				print 'Stranger: ' + om.message
		else:
			print om.error
		
		sleep(0.5)
	else:
		print 'Disconnecting...'
	del om</p> ]]></description>
<pubDate>Wed, 03 Feb 2010 09:36:15 GMT</pubDate>
<guid>http://snipplr.com/view/27621/omegle-class/</guid>
</item>
<item>
<title>(PHP) Screenscraper</title>
<link>http://snipplr.com/view/27459/screenscraper/</link>
<description><![CDATA[ <p>**NOTE: This is still very much work in progress and is rather "hackish".**

This class parses and extracts information from websites using xpaths and optionally also regular expressions.

Here's a quick example of it's usage...
	
	$ss = new ScreenScraper();
	
	$ss->getData('http://progressquest.com/pemptus.php?name=Etzem');

	$data = $ss->query(array(
			'Rank' => '//td[@class=\'sel\']/parent::*/td[1]',
			'Name' => '//td[@class=\'sel\']/parent::*/td[2]',
			'Race' => '//td[@class=\'sel\']/parent::*/td[3]',
			'Class' => '//td[@class=\'sel\']/parent::*/td[4]',
			'Level' => '//td[@class=\'sel\']/parent::*/td[5]',
			'Prime Stat' => '//td[@class=\'sel\']/parent::*/td[6]',
			'Plot Stage' => '//td[@class=\'sel\']/parent::*/td[7]',
			'Prized Item' => '//td[@class=\'sel\']/parent::*/td[8]',
			'Specialty' => '//td[@class=\'sel\']/parent::*/td[9]',
			'Motto' => '//td[@class=\'sel\']/parent::*/td[10]',
			'Guild_name' => '//td[@class=\'sel\']/parent::*/td[11]/a',
			'Guild_id' => array(
					'xpath' => '//td[@class=\'sel\']/parent::*/td[11]/a/@href',
					'match' => '/[^?]+\?id=(?P[0-9]+)/i',
				),
		));

	foreach($data as $key => $value) {
		echo $key. ': '. $value. "\n";
	}

Outputs something like...

	Rank: 42856
	Name: Etzem
	Race: Half Man
	Class: Shiv-Knight
	Level: 24
	Prime Stat: CHA 62
	Plot Stage: Act II
	Prized Item: -2 Diamond Mail Greaves
	Specialty: Good Move VI
	Motto: Blue monkeys; the only monkeys for me.
	Guild_name: pants
	Guild_id: 1203

There's also offset and limit parameters on the found items but they're fairly self-explanatory.</p> ]]></description>
<pubDate>Mon, 01 Feb 2010 03:17:40 GMT</pubDate>
<guid>http://snipplr.com/view/27459/screenscraper/</guid>
</item>
<item>
<title>(PHP) Simple download page with cache</title>
<link>http://snipplr.com/view/14542/simple-download-page-with-cache/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 28 Apr 2009 13:48:36 GMT</pubDate>
<guid>http://snipplr.com/view/14542/simple-download-page-with-cache/</guid>
</item>
<item>
<title>(DOS Batch) wget - download a complete webpage</title>
<link>http://snipplr.com/view/14117/wget--download-a-complete-webpage/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 17 Apr 2009 07:48:36 GMT</pubDate>
<guid>http://snipplr.com/view/14117/wget--download-a-complete-webpage/</guid>
</item>
<item>
<title>(PHP) SQLite lightweight wrapper</title>
<link>http://snipplr.com/view/13993/sqlite-lightweight-wrapper/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 13 Apr 2009 17:26:18 GMT</pubDate>
<guid>http://snipplr.com/view/13993/sqlite-lightweight-wrapper/</guid>
</item>
<item>
<title>(PHP) Form generator</title>
<link>http://snipplr.com/view/13820/form-generator/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 06 Apr 2009 08:49:54 GMT</pubDate>
<guid>http://snipplr.com/view/13820/form-generator/</guid>
</item>
</channel>
</rss>