<?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 18:47:13 +0000</lastBuildDate>
    <item>
      <title>(jQuery) jQuery - Clickable everything script - LuckyShot</title>
      <link>https://snipplr.com/view/37104/jquery--clickable-everything-script</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 11 Jul 2010 12:08:28 UTC</pubDate>
      <guid>https://snipplr.com/view/37104/jquery--clickable-everything-script</guid>
    </item>
    <item>
      <title>(PHP) PHP - Relative date function (2 minutes ago, 3 days ago...) - LuckyShot</title>
      <link>https://snipplr.com/view/35635/php--relative-date-function-2-minutes-ago-3-days-ago</link>
      <description>&lt;p&gt;Gets seconds and returns it like Facebook/Twitter style: "2 minutes ago", "9 hours ago", etc...&#13;
The script actually returns "1 minute", "17 days"... so that you can customize it: "3 seconds ago", "in 1 minute", "will take 4 days", etc.&lt;/p&gt;</description>
      <pubDate>Wed, 09 Jun 2010 18:07:41 UTC</pubDate>
      <guid>https://snipplr.com/view/35635/php--relative-date-function-2-minutes-ago-3-days-ago</guid>
    </item>
    <item>
      <title>(PHP) PHP simple benchmarking - LuckyShot</title>
      <link>https://snipplr.com/view/35295/php-simple-benchmarking</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 28 May 2010 08:14:22 UTC</pubDate>
      <guid>https://snipplr.com/view/35295/php-simple-benchmarking</guid>
    </item>
    <item>
      <title>(jQuery) jQuery Plugin Code Template - LuckyShot</title>
      <link>https://snipplr.com/view/34922/jquery-plugin-code-template</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 20 May 2010 11:02:53 UTC</pubDate>
      <guid>https://snipplr.com/view/34922/jquery-plugin-code-template</guid>
    </item>
    <item>
      <title>(HTML) iPhone - Autozoom website - LuckyShot</title>
      <link>https://snipplr.com/view/34699/iphone--autozoom-website</link>
      <description>&lt;p&gt;iPhone code snippets for websites&lt;/p&gt;</description>
      <pubDate>Tue, 18 May 2010 11:39:48 UTC</pubDate>
      <guid>https://snipplr.com/view/34699/iphone--autozoom-website</guid>
    </item>
    <item>
      <title>(PHP) PHP/MySQL - Database Class - LuckyShot</title>
      <link>https://snipplr.com/view/34289/phpmysql--database-class</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 12 May 2010 11:50:46 UTC</pubDate>
      <guid>https://snipplr.com/view/34289/phpmysql--database-class</guid>
    </item>
    <item>
      <title>(Apache) Wordpress much more efficient HTACCESS/mod_rewrite - LuckyShot</title>
      <link>https://snipplr.com/view/33656/wordpress-much-more-efficient-htaccessmodrewrite</link>
      <description>&lt;p&gt;A member of Wordpress community says: I placed this code on my site and it instantly cut my page load times from 4-8 seconds per page (and typically on the high end of that) down to 1-3 seconds per page and EVERYTHING on my site works as it did before. I have yet to find a problem with anything related to the change. It was a HUGE WordPress Performance improvement... and it didn't require me adding yet another plugin like WP Cache or WP Super Cache and inheriting the various problems that using those entail.&lt;/p&gt;</description>
      <pubDate>Fri, 30 Apr 2010 09:06:46 UTC</pubDate>
      <guid>https://snipplr.com/view/33656/wordpress-much-more-efficient-htaccessmodrewrite</guid>
    </item>
    <item>
      <title>(MySQL) MySQL - Most relevant weighted results based (MATCH AGAINST) - LuckyShot</title>
      <link>https://snipplr.com/view/33364/mysql--most-relevant-weighted-results-based-match-against</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 27 Apr 2010 10:42:40 UTC</pubDate>
      <guid>https://snipplr.com/view/33364/mysql--most-relevant-weighted-results-based-match-against</guid>
    </item>
    <item>
      <title>(HTML) Web Template - HTML, CSS and JS ready to start coding (1KB 960px mod, Yahoo Reset, jQuery, XHTML strict) - LuckyShot</title>
      <link>https://snipplr.com/view/32191/web-template--html-css-and-js-ready-to-start-coding-1kb-960px-mod-yahoo-reset-jquery-xhtml-strict</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 17 Apr 2010 16:52:21 UTC</pubDate>
      <guid>https://snipplr.com/view/32191/web-template--html-css-and-js-ready-to-start-coding-1kb-960px-mod-yahoo-reset-jquery-xhtml-strict</guid>
    </item>
    <item>
      <title>(PHP) JavaScript/jQuery simple benchmarking - LuckyShot</title>
      <link>https://snipplr.com/view/32069/javascriptjquery-simple-benchmarking</link>
      <description>&lt;p&gt;Disable Firebug and plugins, close other tabs and close other programs for more accurate results!&lt;/p&gt;</description>
      <pubDate>Thu, 15 Apr 2010 11:36:55 UTC</pubDate>
      <guid>https://snipplr.com/view/32069/javascriptjquery-simple-benchmarking</guid>
    </item>
    <item>
      <title>(PHP) Twitter - Print latest tweet from user (extracts from RSS feed in PHP and linkifies links) - LuckyShot</title>
      <link>https://snipplr.com/view/31106/twitter--print-latest-tweet-from-user-extracts-from-rss-feed-in-php-and-linkifies-links</link>
      <description>&lt;p&gt;Extracts the most recent tweet from the users RSS feed and auto-detects links.&lt;/p&gt;</description>
      <pubDate>Thu, 08 Apr 2010 09:07:09 UTC</pubDate>
      <guid>https://snipplr.com/view/31106/twitter--print-latest-tweet-from-user-extracts-from-rss-feed-in-php-and-linkifies-links</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Get current page ID (and other default variables) - LuckyShot</title>
      <link>https://snipplr.com/view/30512/wordpress--get-current-page-id-and-other-default-variables</link>
      <description>&lt;p&gt;Variables not dependant on the loop, can be used as GET params&lt;/p&gt;</description>
      <pubDate>Tue, 30 Mar 2010 06:15:28 UTC</pubDate>
      <guid>https://snipplr.com/view/30512/wordpress--get-current-page-id-and-other-default-variables</guid>
    </item>
    <item>
      <title>(PHP) Bayesian Rating - Weighted voted rating system - LuckyShot</title>
      <link>https://snipplr.com/view/29775/bayesian-rating--weighted-voted-rating-system</link>
      <description>&lt;p&gt;Bayesian Rating is using the Bayesian Average. This is a mathematical term that calculates a rating of an item based on the â€œbelievabilityâ€ of the votes. The greater the certainty based on the number of votes, the more the Bayesian rating approximates the plain, unweighted rating. When there are very few votes, the bayesian rating of an item will be closer to the average rating of all items.&lt;/p&gt;</description>
      <pubDate>Mon, 15 Mar 2010 08:06:17 UTC</pubDate>
      <guid>https://snipplr.com/view/29775/bayesian-rating--weighted-voted-rating-system</guid>
    </item>
    <item>
      <title>(CSS) 1KB Grid - 12 cols, 960px - LuckyShot</title>
      <link>https://snipplr.com/view/29762/1kb-grid--12-cols-960px</link>
      <description>&lt;p&gt;12 columns, 60 pixels each, with 20 pixel gutter&lt;/p&gt;</description>
      <pubDate>Mon, 15 Mar 2010 04:50:30 UTC</pubDate>
      <guid>https://snipplr.com/view/29762/1kb-grid--12-cols-960px</guid>
    </item>
    <item>
      <title>(PHP) Print the permanent URL of a post based on the ID - LuckyShot</title>
      <link>https://snipplr.com/view/28912/print-the-permanent-url-of-a-post-based-on-the-id</link>
      <description>&lt;p&gt;Where 123 is the post/page ID.&lt;/p&gt;</description>
      <pubDate>Thu, 25 Feb 2010 10:35:54 UTC</pubDate>
      <guid>https://snipplr.com/view/28912/print-the-permanent-url-of-a-post-based-on-the-id</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Check if child page belongs to parent page - LuckyShot</title>
      <link>https://snipplr.com/view/26505/wordpress--check-if-child-page-belongs-to-parent-page</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 08:05:42 UTC</pubDate>
      <guid>https://snipplr.com/view/26505/wordpress--check-if-child-page-belongs-to-parent-page</guid>
    </item>
    <item>
      <title>(PHP) PHP - Nice Multidimensional Array - LuckyShot</title>
      <link>https://snipplr.com/view/24861/php--nice-multidimensional-array</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 15 Dec 2009 19:54:31 UTC</pubDate>
      <guid>https://snipplr.com/view/24861/php--nice-multidimensional-array</guid>
    </item>
    <item>
      <title>(JavaScript) JavaScript - Cookies functions - LuckyShot</title>
      <link>https://snipplr.com/view/24860/javascript--cookies-functions</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 15 Dec 2009 18:35:33 UTC</pubDate>
      <guid>https://snipplr.com/view/24860/javascript--cookies-functions</guid>
    </item>
    <item>
      <title>(CSS) CSS Reset (by Meyer, final version) - LuckyShot</title>
      <link>https://snipplr.com/view/24435/css-reset-by-meyer-final-version</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 07 Dec 2009 18:40:33 UTC</pubDate>
      <guid>https://snipplr.com/view/24435/css-reset-by-meyer-final-version</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Get template file used - LuckyShot</title>
      <link>https://snipplr.com/view/24406/wordpress--get-template-file-used</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 07 Dec 2009 04:54:14 UTC</pubDate>
      <guid>https://snipplr.com/view/24406/wordpress--get-template-file-used</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Check if posts belongs to a category - LuckyShot</title>
      <link>https://snipplr.com/view/24403/wordpress--check-if-posts-belongs-to-a-category</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 07 Dec 2009 04:50:18 UTC</pubDate>
      <guid>https://snipplr.com/view/24403/wordpress--check-if-posts-belongs-to-a-category</guid>
    </item>
    <item>
      <title>(JavaScript) jQuery - Smooth anchor scrolling - LuckyShot</title>
      <link>https://snipplr.com/view/24267/jquery--smooth-anchor-scrolling</link>
      <description>&lt;p&gt;Detects all anchor links in a page and makes them go to the place smoothly.&lt;/p&gt;</description>
      <pubDate>Fri, 04 Dec 2009 09:22:51 UTC</pubDate>
      <guid>https://snipplr.com/view/24267/jquery--smooth-anchor-scrolling</guid>
    </item>
    <item>
      <title>(PHP) PHP Error reporting - LuckyShot</title>
      <link>https://snipplr.com/view/24135/php-error-reporting</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 02 Dec 2009 06:00:50 UTC</pubDate>
      <guid>https://snipplr.com/view/24135/php-error-reporting</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Get first image of post (without Custom Fields) - LuckyShot</title>
      <link>https://snipplr.com/view/23968/wordpress--get-first-image-of-post-without-custom-fields</link>
      <description>&lt;p&gt;To call it just put &lt;?php&gt; in your template file within the loop.&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:35:20 UTC</pubDate>
      <guid>https://snipplr.com/view/23968/wordpress--get-first-image-of-post-without-custom-fields</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Accurate Trim text function - LuckyShot</title>
      <link>https://snipplr.com/view/23967/wordpress--accurate-trim-text-function</link>
      <description>&lt;p&gt;Add to your functions.php in the active template. &#13;
&#13;
Remove commented text. Fat/Thin char detection still not implemented. I'll update it as soon as I get some time. If you come with it please let me know :)&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:30:58 UTC</pubDate>
      <guid>https://snipplr.com/view/23967/wordpress--accurate-trim-text-function</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Include PHP file from template folder - LuckyShot</title>
      <link>https://snipplr.com/view/23966/wordpress--include-php-file-from-template-folder</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:28:04 UTC</pubDate>
      <guid>https://snipplr.com/view/23966/wordpress--include-php-file-from-template-folder</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Image resized with TimThumb - LuckyShot</title>
      <link>https://snipplr.com/view/23963/wordpress--image-resized-with-timthumb</link>
      <description>&lt;p&gt;TimThumb should be in the template folder named as "thumb.php".&#13;
Change H (height in px), W (width in px), Q (quality 0-100), ZC (zoom cropping 0-1) values. &#13;
You can provide only one of the dimensions of the picture to get a proportional scale.&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:19:49 UTC</pubDate>
      <guid>https://snipplr.com/view/23963/wordpress--image-resized-with-timthumb</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Custom loop SQL query (and Popular Posts example) - LuckyShot</title>
      <link>https://snipplr.com/view/23959/wordpress--custom-loop-sql-query-and-popular-posts-example</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 01 Dec 2009 04:22:50 UTC</pubDate>
      <guid>https://snipplr.com/view/23959/wordpress--custom-loop-sql-query-and-popular-posts-example</guid>
    </item>
    <item>
      <title>(CSS) 1KB Grid - Flexible and minimized - LuckyShot</title>
      <link>https://snipplr.com/view/23565/1kb-grid--flexible-and-minimized</link>
      <description>&lt;p&gt;&lt;div&gt;&#13;
	&lt;div&gt;&lt;/div&gt;&#13;
	&lt;div&gt;&lt;/div&gt;&#13;
	&lt;div&gt;&lt;/div&gt;&#13;
&lt;/div&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 22 Nov 2009 18:50:16 UTC</pubDate>
      <guid>https://snipplr.com/view/23565/1kb-grid--flexible-and-minimized</guid>
    </item>
    <item>
      <title>(JavaScript) JavaScript codes pack - LuckyShot</title>
      <link>https://snipplr.com/view/23461/javascript-codes-pack</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 20 Nov 2009 05:58:10 UTC</pubDate>
      <guid>https://snipplr.com/view/23461/javascript-codes-pack</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Total number of posts in a category - LuckyShot</title>
      <link>https://snipplr.com/view/23262/wordpress--total-number-of-posts-in-a-category</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 17 Nov 2009 05:39:41 UTC</pubDate>
      <guid>https://snipplr.com/view/23262/wordpress--total-number-of-posts-in-a-category</guid>
    </item>
    <item>
      <title>(JavaScript) jFlow AutoTimer (and example on Timers in JavaScript and jQuery events) - LuckyShot</title>
      <link>https://snipplr.com/view/21945/jflow-autotimer-and-example-on-timers-in-javascript-and-jquery-events</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 27 Oct 2009 05:04:40 UTC</pubDate>
      <guid>https://snipplr.com/view/21945/jflow-autotimer-and-example-on-timers-in-javascript-and-jquery-events</guid>
    </item>
    <item>
      <title>(XHTML) RPC Ping Servers - LuckyShot</title>
      <link>https://snipplr.com/view/21763/rpc-ping-servers</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 24 Oct 2009 18:50:07 UTC</pubDate>
      <guid>https://snipplr.com/view/21763/rpc-ping-servers</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Custom loop - LuckyShot</title>
      <link>https://snipplr.com/view/21489/wordpress--custom-loop</link>
      <description>&lt;p&gt;Creates custom loop to avoid interfeering with the loop of the page&lt;/p&gt;</description>
      <pubDate>Tue, 20 Oct 2009 05:28:13 UTC</pubDate>
      <guid>https://snipplr.com/view/21489/wordpress--custom-loop</guid>
    </item>
    <item>
      <title>(PHP) Wordpress - Custom Field - LuckyShot</title>
      <link>https://snipplr.com/view/21483/wordpress--custom-field</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 20 Oct 2009 04:06:46 UTC</pubDate>
      <guid>https://snipplr.com/view/21483/wordpress--custom-field</guid>
    </item>
    <item>
      <title>(XHTML) Library linking (Yahoo CSS and jQuery JS) - LuckyShot</title>
      <link>https://snipplr.com/view/21294/library-linking-yahoo-css-and-jquery-js</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 16 Oct 2009 04:40:24 UTC</pubDate>
      <guid>https://snipplr.com/view/21294/library-linking-yahoo-css-and-jquery-js</guid>
    </item>
    <item>
      <title>(PHP) Default TimeZone - LuckyShot</title>
      <link>https://snipplr.com/view/21227/default-timezone</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 15 Oct 2009 13:56:21 UTC</pubDate>
      <guid>https://snipplr.com/view/21227/default-timezone</guid>
    </item>
    <item>
      <title>(CSS) Yahoo CSS Reset - LuckyShot</title>
      <link>https://snipplr.com/view/21006/yahoo-css-reset</link>
      <description>&lt;p&gt;The HTML code:&#13;
&lt;link&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 11 Oct 2009 17:27:43 UTC</pubDate>
      <guid>https://snipplr.com/view/21006/yahoo-css-reset</guid>
    </item>
    <item>
      <title>(PHP) Customize a file download (songs, PDFs, etc.) - LuckyShot</title>
      <link>https://snipplr.com/view/21005/customize-a-file-download-songs-pdfs-etc</link>
      <description>&lt;p&gt;This code is really useful to download files (i.e. an mp3 file). It will tell the browser about the file type youâ€™re about to download while also customizing the file name of it.&lt;/p&gt;</description>
      <pubDate>Sun, 11 Oct 2009 17:14:42 UTC</pubDate>
      <guid>https://snipplr.com/view/21005/customize-a-file-download-songs-pdfs-etc</guid>
    </item>
    <item>
      <title>(Apache) Apache .htaccess example - LuckyShot</title>
      <link>https://snipplr.com/view/21003/apache-htaccess-example</link>
      <description>&lt;p&gt;Disable directory indexing, custom error messages, PHP processing in other files, mod_rewrite, file GZIP and cache expiration times.&lt;/p&gt;</description>
      <pubDate>Sun, 11 Oct 2009 17:06:08 UTC</pubDate>
      <guid>https://snipplr.com/view/21003/apache-htaccess-example</guid>
    </item>
    <item>
      <title>(JavaScript) Embed image as code (for UserScripts) - LuckyShot</title>
      <link>https://snipplr.com/view/21001/embed-image-as-code-for-userscripts</link>
      <description>&lt;p&gt;Saves an image as code. Useful for small images.&lt;/p&gt;</description>
      <pubDate>Sun, 11 Oct 2009 16:51:36 UTC</pubDate>
      <guid>https://snipplr.com/view/21001/embed-image-as-code-for-userscripts</guid>
    </item>
  </channel>
</rss>
