<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 03:33:24 +0000</lastBuildDate>
    <item>
      <title>(Python) chdir context manager - ches</title>
      <link>https://snipplr.com/view/56684/chdir-context-manager</link>
      <description>&lt;p&gt;This context manager restores the value of the current working directory (cwd) after the enclosed code block completes or raises an exception.  If a directory name is supplied to the context manager then the cwd is changed prior to running the code block.&lt;/p&gt;</description>
      <pubDate>Sat, 16 Jul 2011 18:28:17 UTC</pubDate>
      <guid>https://snipplr.com/view/56684/chdir-context-manager</guid>
    </item>
    <item>
      <title>(Bash) imapsync script to migrate Gmail to Google Apps - ches</title>
      <link>https://snipplr.com/view/17584/imapsync-script-to-migrate-gmail-to-google-apps</link>
      <description>&lt;p&gt;Based on the good initial coverage [over here](http://www.thamtech.com/blog/2008/03/29/gmail-to-google-apps-email-migration/).&lt;/p&gt;</description>
      <pubDate>Tue, 28 Jul 2009 14:24:34 UTC</pubDate>
      <guid>https://snipplr.com/view/17584/imapsync-script-to-migrate-gmail-to-google-apps</guid>
    </item>
    <item>
      <title>(Bash) Compute Directory Size Recursively with du - ches</title>
      <link>https://snipplr.com/view/7566/compute-directory-size-recursively-with-du</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 28 Jul 2008 18:04:06 UTC</pubDate>
      <guid>https://snipplr.com/view/7566/compute-directory-size-recursively-with-du</guid>
    </item>
    <item>
      <title>(Bash) Perl Search and Replace One-liner with xargs -0 - ches</title>
      <link>https://snipplr.com/view/5078/perl-search-and-replace-oneliner-with-xargs-0</link>
      <description>&lt;p&gt;\Q...\E perl quoting means no ugly escaping in the regex. find's -print0 with xargs -0 is the secret to handling files with spaces in their names.&lt;/p&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:02:45 UTC</pubDate>
      <guid>https://snipplr.com/view/5078/perl-search-and-replace-oneliner-with-xargs-0</guid>
    </item>
    <item>
      <title>(Bash) Deleting Blank Lines Using AWK - ches</title>
      <link>https://snipplr.com/view/4315/deleting-blank-lines-using-awk</link>
      <description>&lt;p&gt;Create a copy of a text file with blank lines removed.&lt;/p&gt;</description>
      <pubDate>Wed, 12 Dec 2007 12:38:18 UTC</pubDate>
      <guid>https://snipplr.com/view/4315/deleting-blank-lines-using-awk</guid>
    </item>
    <item>
      <title>(Ruby) Ruby One-liner for Restoring One Table from a Huge SQL Dump - ches</title>
      <link>https://snipplr.com/view/4198/ruby-oneliner-for-restoring-one-table-from-a-huge-sql-dump</link>
      <description>&lt;p&gt;Courtesy of Jesse.&lt;/p&gt;</description>
      <pubDate>Tue, 27 Nov 2007 10:55:45 UTC</pubDate>
      <guid>https://snipplr.com/view/4198/ruby-oneliner-for-restoring-one-table-from-a-huge-sql-dump</guid>
    </item>
    <item>
      <title>(Python) Alternate Table Row Classes in a Mako Template - ches</title>
      <link>https://snipplr.com/view/3764/alternate-table-row-classes-in-a-mako-template</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 22 Sep 2007 17:27:08 UTC</pubDate>
      <guid>https://snipplr.com/view/3764/alternate-table-row-classes-in-a-mako-template</guid>
    </item>
    <item>
      <title>(Python) Quick, Simple Password Generator - ches</title>
      <link>https://snipplr.com/view/3677/quick-simple-password-generator</link>
      <description>&lt;p&gt;Obviously there's no real crytpo here -- use this for cases like regenerating and emailing a user password.&lt;/p&gt;</description>
      <pubDate>Wed, 12 Sep 2007 10:30:59 UTC</pubDate>
      <guid>https://snipplr.com/view/3677/quick-simple-password-generator</guid>
    </item>
    <item>
      <title>(Bash) Batch File Rename with awk and sed - ches</title>
      <link>https://snipplr.com/view/3648/batch-file-rename-with-awk-and-sed</link>
      <description>&lt;p&gt;Leave off the final pipe to /bin/sh to do a 'dry run'&lt;/p&gt;</description>
      <pubDate>Fri, 07 Sep 2007 14:58:16 UTC</pubDate>
      <guid>https://snipplr.com/view/3648/batch-file-rename-with-awk-and-sed</guid>
    </item>
    <item>
      <title>(Python) FormEncode Email Address validation schema - ches</title>
      <link>https://snipplr.com/view/3479/formencode-email-address-validation-schema</link>
      <description>&lt;p&gt;model/form.py is a good place to put schemata in a pylons app: easy to build with inheritance and accessible to controllers via model.form.EmailForm, etc. See the link for further info on the _extra_fields options -- this one is intended for just two fields: a text field and submit button.&lt;/p&gt;</description>
      <pubDate>Mon, 06 Aug 2007 22:55:49 UTC</pubDate>
      <guid>https://snipplr.com/view/3479/formencode-email-address-validation-schema</guid>
    </item>
    <item>
      <title>(Python) python date suffixes for strftime - ches</title>
      <link>https://snipplr.com/view/3468/python-date-suffixes-for-strftime</link>
      <description>&lt;p&gt;like PHP's 'jS'&lt;/p&gt;</description>
      <pubDate>Sun, 05 Aug 2007 22:38:58 UTC</pubDate>
      <guid>https://snipplr.com/view/3468/python-date-suffixes-for-strftime</guid>
    </item>
    <item>
      <title>(XML) htaccess one-liner for MT URL restructuring - ches</title>
      <link>https://snipplr.com/view/3315/htaccess-oneliner-for-mt-url-restructuring</link>
      <description>&lt;p&gt;Build URLs for subcategories, e.g. 'cat-child-support.html' becomes '/family-law/child-support/'&lt;/p&gt;</description>
      <pubDate>Wed, 18 Jul 2007 13:45:46 UTC</pubDate>
      <guid>https://snipplr.com/view/3315/htaccess-oneliner-for-mt-url-restructuring</guid>
    </item>
  </channel>
</rss>
