<?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 22:01:32 +0000</lastBuildDate>
    <item>
      <title>(Bash) Bash Script to Fix Android Pictures and Videos Timestamp - mabafu</title>
      <link>https://snipplr.com/view/90387/bash-script-to-fix-android-pictures-and-videos-timestamp</link>
      <description>&lt;p&gt;After copying pictures and videos from my tablet to my PC I noticed that the original timestamp was overriden by the current date.&#13;
&#13;
Fortunatelly the timestamp was still preserved in the files name.&#13;
&#13;
Ex: IMG\_20150214\_202445.jpg or VID\_20140116\_091015.3gp&#13;
&#13;
The script must be executed in the image's folder and voilÃ¡ the original timestamp will be restored.&#13;
&#13;
Please make a backup before executing it! &#13;
&#13;
I'll not bother myself with licensing. This piece of... software... may be used as you wish, and also at your own peril! I don't claim credit neither responsability over it.&lt;/p&gt;</description>
      <pubDate>Sun, 15 Feb 2015 09:34:46 UTC</pubDate>
      <guid>https://snipplr.com/view/90387/bash-script-to-fix-android-pictures-and-videos-timestamp</guid>
    </item>
    <item>
      <title>(Ruby) CPF and CNPJ validation classes using the Brazilian Government official algorithms - mabafu</title>
      <link>https://snipplr.com/view/60227/cpf-and-cnpj-validation-classes-using-the-brazilian-government-official-algorithms</link>
      <description>&lt;p&gt;#About#&#13;
CPF and CNPJ are self-validated codes generated by Brazilian government. Being the CPF used to identify persons and CNJP to enterprises, organizations and so on.&#13;
&#13;
That said, I use to code the CPF/CNPJ algorithm when learning new programming languages. With Ruby, it got very clean and powerful because it's particular way to deal with "closures" (i.e. the ruby blocks, Procs and lambdas).&#13;
&#13;
&#13;
To use Cpf or Cnpj classes, just instantite the respective classes passing the numbers to be validated. CPF has 11 digits and CNPJ has 14. In both cases the last two digits are calculated based on the previous ones.&#13;
&#13;
Module11 is the parent class of Cpf and Cnpj. You can use this class if you want to implement your own Module 11 validation algorithm. In this case, inherit from Module11  and initialize the new class with the proper parameters (i.e. input, formula, size, number_of_digits)&lt;/p&gt;</description>
      <pubDate>Thu, 27 Oct 2011 03:06:50 UTC</pubDate>
      <guid>https://snipplr.com/view/60227/cpf-and-cnpj-validation-classes-using-the-brazilian-government-official-algorithms</guid>
    </item>
  </channel>
</rss>
