<?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 17:59:57 +0000</lastBuildDate>
    <item>
      <title>(Ruby) Pager for lots o' data - Agent</title>
      <link>https://snipplr.com/view/3409/pager-for-lots-o-data</link>
      <description>&lt;p&gt;This function (intended to be an application or view helper) creates a pager bar useful for navigating many pages. It shows the first, last, current, nearby, and halfway-to-end pages. It looks like this (where the current page is 11):&#13;
&#13;
&lt; 1 ... 5 ... 10 11 12 ... 14 15 &gt;&#13;
&#13;
The pagerBar function takes two parameters: a RoR paginator, and an anchor that will be attached to all the links.&lt;/p&gt;</description>
      <pubDate>Sat, 28 Jul 2007 12:04:47 UTC</pubDate>
      <guid>https://snipplr.com/view/3409/pager-for-lots-o-data</guid>
    </item>
    <item>
      <title>(Ruby) Format strings like PRINT USING - Agent</title>
      <link>https://snipplr.com/view/3408/format-strings-like-print-using</link>
      <description>&lt;p&gt;This is an extension to Ruby's String class. Just put this code in a file and include it. This basically takes a string and adds literals and padding to it. For example, you can format a phone number with optional area code like this:&#13;
&#13;
    "5445556747".using('(###) ###-####', '', true)&#13;
       =&gt; (544) 555-6747&lt;/p&gt;</description>
      <pubDate>Sat, 28 Jul 2007 11:38:54 UTC</pubDate>
      <guid>https://snipplr.com/view/3408/format-strings-like-print-using</guid>
    </item>
  </channel>
</rss>
