<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Latest Snippets - Snipperize</title><link>http://snipperize.todayclose.com/feeds/latest/</link><description>The latest snippets on snipperize</description><language>zh-cn</language><lastBuildDate>Mon, 09 Jan 2012 08:45:22 +0000</lastBuildDate><item><title>[Javascript] Auto-Replace Broken Images</title><link>http://snipperize.todayclose.com/snippet/js/Auto-Replace-Broken-Images--5672035/</link><description>

&lt;p&gt;There are 2 jQuery snippets, both replace broken images with one of your choosing, the difference is that one is "safe" and the other is "persistent". The safe one will quick working, so if your doing something that dynamically changed images on a page it'll only work for the first broken image. The persistent one will keep working, but if your missing image image is missing it'll cause a overflow error.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Mon, 09 Jan 2012 08:45:22 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/js/Auto-Replace-Broken-Images--5672035/</guid><category>js</category></item><item><title>[Python] Use NLTK Toolkit to Classify Documents</title><link>http://snipperize.todayclose.com/snippet/py/Use-NLTK-Toolkit-to-Classify-Documents--5671027/</link><description>

&lt;p&gt;http://nltk.googlecode.com/svn/trunk/doc/book/ch06.html
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Mon, 09 Jan 2012 08:41:00 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Use-NLTK-Toolkit-to-Classify-Documents--5671027/</guid><category>py</category></item><item><title>[Bash/Shell] Number of Connections by IP</title><link>http://snipperize.todayclose.com/snippet/bash/Number-of-Connections-by-IP--3731577/</link><description>

&lt;p&gt;Returns a list of the number of connections by IP.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sun, 30 Jan 2011 14:17:17 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/bash/Number-of-Connections-by-IP--3731577/</guid><category>bash</category></item><item><title>[Javascript] Readability</title><link>http://snipperize.todayclose.com/snippet/js/Readability--3366212/</link><description>

&lt;p&gt;Reading anything on the Internet has become a full-on nightmare. As media outlets attempt to eke out as much advertising revenue as possible, we’re left trying to put blinders on to mask away all the insanity that surrounds the content we’re trying to read.
&lt;/p&gt;
&lt;p&gt;It’s almost like listening to talk radio, except the commercials play during the program in the background. It’s a pretty awful experience. Our friend to date has been the trusty “Print View” button. Click it and all the junk goes away. I click it all the time and rarely print. It’s really become the “Peace &amp;amp; Quiet” button for many.
&lt;/p&gt;
&lt;p&gt;Recently, Mandy Brown wrote a wonderful article for A List Apart called In Defense Of Readers. It’s an attempt to awaken designers responsibility to those who read on the Web:
&lt;/p&gt;
&lt;p&gt;Despite the ubiquity of reading on the web, readers remain a neglected audience. Much of our talk about web design revolves around a sense of movement: users are thought to be finding, searching, skimming, looking. We measure how frequently they click but not how long they stay on the page. We concern ourselves with their travel and participation–how they move from page to page, who they talk to when they get there–but forget the needs of those whose purpose is to be still. Readers flourish when they have space–some distance from the hubbub of the crowds–and as web designers, there is yet much we can do to help them carve out that space.
&lt;/p&gt;
&lt;p&gt;Mandy is spot on – and her concerns are even more salient in today’s cram-all-the-ads-on-one-page Web.
&lt;/p&gt;</description><author>prof.syd.xu@gmail.com (prof.syd.xu)</author><pubDate>Thu, 30 Dec 2010 17:40:17 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/js/Readability--3366212/</guid><category>js</category></item><item><title>[Python] Full RSS Feed Maker</title><link>http://snipperize.todayclose.com/snippet/py/Full-RSS-Feed-Maker--3450205/</link><description>

&lt;p&gt;full rss feed maker, readability to Python
&lt;/p&gt;</description><author>prof.syd.xu@gmail.com (prof.syd.xu)</author><pubDate>Thu, 30 Dec 2010 17:28:33 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Full-RSS-Feed-Maker--3450205/</guid><category>py</category></item><item><title>[Python] Extract the main content of a webpage</title><link>http://snipperize.todayclose.com/snippet/py/Extract-the-main-content-of-a-webpage--3344201/</link><description>

&lt;p&gt;Extract the main content of a webpage
&lt;/p&gt;</description><author>prof.syd.xu@gmail.com (prof.syd.xu)</author><pubDate>Thu, 30 Dec 2010 17:26:12 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Extract-the-main-content-of-a-webpage--3344201/</guid><category>py</category></item><item><title>[Python] Decision Maker</title><link>http://snipperize.todayclose.com/snippet/py/Decision-Maker--2464001/</link><description>

&lt;p&gt;This is a sample run:
&lt;/p&gt;
&lt;p&gt;Number of items: 2
&lt;/p&gt;
&lt;p&gt;Number of constraints for each item: 3
&lt;/p&gt;
&lt;p&gt;Constraint 1 name: price
&lt;/p&gt;
&lt;p&gt;Lower(0) or Higher(1) is better: 0
&lt;/p&gt;
&lt;p&gt;Constraint 2 name: speed
&lt;/p&gt;
&lt;p&gt;Lower(0) or Higher(1) is better: 1
&lt;/p&gt;
&lt;p&gt;Constraint 3 name: ram
&lt;/p&gt;
&lt;p&gt;Lower(0) or Higher(1) is better: 1
&lt;/p&gt;
&lt;p&gt;Item 1 name: laptop1
&lt;/p&gt;
&lt;p&gt;price: 500
&lt;/p&gt;
&lt;p&gt;speed: 1.5
&lt;/p&gt;
&lt;p&gt;ram: 4
&lt;/p&gt;
&lt;p&gt;Item 2 name: laptop2
&lt;/p&gt;
&lt;p&gt;price: 600
&lt;/p&gt;
&lt;p&gt;speed: 2
&lt;/p&gt;
&lt;p&gt;ram: 8
&lt;/p&gt;
&lt;p&gt;The best item decided: laptop2
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sun, 14 Nov 2010 15:52:41 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Decision-Maker--2464001/</guid><category>py</category></item><item><title>[C++] c++ singleton with std::auto_ptr</title><link>http://snipperize.todayclose.com/snippet/cpp/c++-singleton-with-std::auto_ptr--2425005/</link><description>

&lt;p&gt;The reason for auto_ptr is insurance that the destructor (of class Test in this instance) gets called when the program exits.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sun, 14 Nov 2010 15:26:03 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/cpp/c++-singleton-with-std::auto_ptr--2425005/</guid><category>cpp</category></item><item><title>[C++] creating binary tree with c++</title><link>http://snipperize.todayclose.com/snippet/cpp/creating-binary-tree-with-c++--2424002/</link><description>

&lt;p&gt;creating binary tree with c++
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sun, 14 Nov 2010 15:24:14 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/cpp/creating-binary-tree-with-c++--2424002/</guid><category>cpp</category></item><item><title>[Bash/Shell] A deployment script for a generic Cocoa Mac application</title><link>http://snipperize.todayclose.com/snippet/bash/A-deployment-script-for-a-generic-Cocoa-Mac-application--2058004/</link><description>

&lt;p&gt;Here then is a bash script to handle all of the above steps. It's an annoying diversion into another language for a C/Obj-C/C++ programmer but some things (especially setting folder view options) need to be done a specific way.
&lt;/p&gt;
&lt;p&gt;A script of this sort is the traditional way that this type of deployment is handled. However, it is actually not how I handle my deployments (but I'm a little weird in this respect). Next week, I'll show you the code I use for deployment.
&lt;/p&gt;
&lt;p&gt;Assumptions in this script
&lt;/p&gt;
&lt;p&gt;There's a few assumptions here. While they are normally valid assumptions if you create your project using default Cocoa Mac Application template, there are certainly cases where they won't apply and you'll need to tweak the script a little.
&lt;/p&gt;
&lt;p&gt;This script requires 1 parameter: the .xcodeproj file you want to build.
   The target you want to build must have the same name as the project (minus the .xcodeproj extension).
   The Info.plist for the application must have the same name as the project (minus the .xcodeproj extension) with the suffix "-Info.plist".
   The application build has the same name as the project (minus the .xcodeproj extension).
   The deployment build is the "Release" build and the build project directory is the build/Release directory.
   You use git for your repository (although this script will continue if git is not installed).
   The background image for your DMG folder is a 400x300px PNG named background.png in the same folder as the .xcodeproj file (although this script will skip background image steps if the background.png is missing).
   The deployment DMG file will be saved to the Desktop with the same name as the project (minus the .xcodeproj extension) with the suffix ".dmg" (build will fail if there's already something at this location).
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sun, 07 Nov 2010 16:05:28 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/bash/A-deployment-script-for-a-generic-Cocoa-Mac-application--2058004/</guid><category>bash</category></item><item><title>[Bash/Shell] Linux System Backup</title><link>http://snipperize.todayclose.com/snippet/bash/Linux-System-Backup--1685001/</link><description>

&lt;p&gt;backup linux system to tar ball.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 21 Oct 2010 13:33:50 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/bash/Linux-System-Backup--1685001/</guid><category>bash</category></item><item><title>[C#] Byte array to file</title><link>http://snipperize.todayclose.com/snippet/csharp/Byte-array-to-file--1579001/</link><description>

&lt;p&gt;None
&lt;/p&gt;</description><author>jeb746966@gmail.com (jeb746966)</author><pubDate>Fri, 15 Oct 2010 03:27:49 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/csharp/Byte-array-to-file--1579001/</guid><category>csharp</category></item><item><title>[Bash/Shell] USING WGET TO DOWNLOAD A SINGLE WEB PAGE AND ALL ITS REQUISITE FILES, DISPLAYING PROPERLY LOCALLY</title><link>http://snipperize.todayclose.com/snippet/bash/USING-WGET-TO-DOWNLOAD-A-SINGLE-WEB-PAGE-AND-ALL-ITS-REQUISITE-FILES,-DISPLAYING-PROPERLY-LOCALLY--1432006/</link><description>

&lt;p&gt;from the wget manual (1.12):rnrn"Actually, to download a single page and all its requisites (even if they exist on separate websites), and make sure the lot displays properly locally, this author likes to use a few options in addition to ‘-p’: "
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Fri, 08 Oct 2010 15:07:23 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/bash/USING-WGET-TO-DOWNLOAD-A-SINGLE-WEB-PAGE-AND-ALL-ITS-REQUISITE-FILES,-DISPLAYING-PROPERLY-LOCALLY--1432006/</guid><category>bash</category></item><item><title>[Python] Whois Client</title><link>http://snipperize.todayclose.com/snippet/py/Whois-Client--1193003/</link><description>

&lt;p&gt;Python whois utility which looks up records in the databases maintained by severa Network Information Centers (NICs). Functions exactly like the UNIX whois(1) utility.
&lt;/p&gt;
&lt;p&gt;Callable from the command-line, but also has an function entry point for calling from code.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sat, 11 Sep 2010 10:56:13 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Whois-Client--1193003/</guid><category>py</category></item><item><title>[Bash/Shell] Translate From Command Line Using Google Translate Ajax API</title><link>http://snipperize.todayclose.com/snippet/bash/Translate-From-Command-Line-Using-Google-Translate-Ajax-API--1199005/</link><description>

&lt;p&gt;Usage:   $progname lang1 lang2 'string of words to translate...'
   Example: $progname en es 'Hello World!'
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 08 Sep 2010 19:03:21 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/bash/Translate-From-Command-Line-Using-Google-Translate-Ajax-API--1199005/</guid><category>bash</category></item><item><title>[Bash/Shell] Get MAC Address Remote IP</title><link>http://snipperize.todayclose.com/snippet/bash/Get-MAC-Address-Remote-IP--1208004/</link><description>

&lt;blockquote&gt;&lt;p&gt;arp 192.168.1.12
&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Address                  HWtype  HWaddress           Flags Mask            Iface
   192.168.1.12             ether   00:0F:AE:34:D3:37   C                     eth0
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 08 Sep 2010 18:52:36 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/bash/Get-MAC-Address-Remote-IP--1208004/</guid><category>bash</category></item><item><title>[PHP] Close Open Tags</title><link>http://snipperize.todayclose.com/snippet/php/Close-Open-Tags--1245003/</link><description>

&lt;p&gt;Close opened HTML tags.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 08 Sep 2010 18:51:23 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/php/Close-Open-Tags--1245003/</guid><category>php</category></item><item><title>[Python] Log Setup</title><link>http://snipperize.todayclose.com/snippet/py/Log-Setup--1194006/</link><description>

&lt;p&gt;Python log setup script
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 08 Sep 2010 18:49:22 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Log-Setup--1194006/</guid><category>py</category></item><item><title>[Javascript] HTML5 placeholder support</title><link>http://snipperize.todayclose.com/snippet/js/HTML5-placeholder-support--1219001/</link><description>

&lt;p&gt;A simple jQuery snippet simulating HTML5 placeholder attribute behavior for input elements in browsers which don't support it.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Fri, 03 Sep 2010 07:21:00 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/js/HTML5-placeholder-support--1219001/</guid><category>js</category></item><item><title>[Javascript] Execute a Unix Command with Nodejs</title><link>http://snipperize.todayclose.com/snippet/js/Execute-a-Unix-Command-with-Nodejs--1096004/</link><description>

&lt;p&gt;http://nodejs.org/api.html#_child_processes
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 18 Aug 2010 07:50:02 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/js/Execute-a-Unix-Command-with-Nodejs--1096004/</guid><category>js</category></item><item><title>[Javascript] New Way to Detect IE with Javascript</title><link>http://snipperize.todayclose.com/snippet/js/New-Way-to-Detect-IE-with-Javascript--1061008/</link><description>

&lt;p&gt;If you're not in IE (or IE version is less than 5) then:
       ie === undefined
   If you're in IE (&amp;gt;5) then you can determine which version:
       ie === 7; // IE7
   Thus, to detect IE:
       if (ie) {}
   And to detect the version:
       ie === 6 // IE6
       ie &amp;gt; 7 // IE8, IE9 ...
       ie &amp;lt; 9 // Anything less than IE9
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 18 Aug 2010 07:47:44 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/js/New-Way-to-Detect-IE-with-Javascript--1061008/</guid><category>js</category></item><item><title>[XML/HTML] HTML5 Shiv from Google Code</title><link>http://snipperize.todayclose.com/snippet/xml/HTML5-Shiv-from-Google-Code--1044010/</link><description>

&lt;!--[if lt IE 9]&gt;&lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;&lt;![endif]--&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 18 Aug 2010 07:45:10 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/xml/HTML5-Shiv-from-Google-Code--1044010/</guid><category>xml</category></item><item><title>[Bash/Shell] Get IP</title><link>http://snipperize.todayclose.com/snippet/bash/Get-IP--837022/</link><description>

&lt;p&gt;copy to .bash_profile:
   alias getip='ifconfig | sed -n "/en0/,/netmask/ p" | grep "inet " | awk ''{print$2}'''
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sun, 25 Jul 2010 11:02:17 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/bash/Get-IP--837022/</guid><category>bash</category></item><item><title>[Objective-C] Drawing a Standard Focus Ring Inside of a Cell Bounds</title><link>http://snipperize.todayclose.com/snippet/objc/Drawing-a-Standard-Focus-Ring-Inside-of-a-Cell-Bounds--894003/</link><description>

&lt;p&gt;Drawing a Standard Focus Ring Inside of a Cell Bounds
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sun, 11 Jul 2010 14:01:05 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/objc/Drawing-a-Standard-Focus-Ring-Inside-of-a-Cell-Bounds--894003/</guid><category>objc</category></item><item><title>[Objective-C] Correct Way to Draw Background Using a Pattern Image</title><link>http://snipperize.todayclose.com/snippet/objc/Correct-Way-to-Draw-Background-Using-a-Pattern-Image--903001/</link><description>

&lt;p&gt;Correct Way to Draw Background Using a Pattern Image
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sun, 11 Jul 2010 13:57:27 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/objc/Correct-Way-to-Draw-Background-Using-a-Pattern-Image--903001/</guid><category>objc</category></item><item><title>[Objective-C] Get iPhone/iPad/iPod Touch Hardware Generation</title><link>http://snipperize.todayclose.com/snippet/objc/Get-iPhone/iPad/iPod-Touch-Hardware-Generation--892001/</link><description>

&lt;p&gt;How to get iPhone/iPad/iPod Touch hardware generation
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 08 Jul 2010 15:52:44 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/objc/Get-iPhone/iPad/iPod-Touch-Hardware-Generation--892001/</guid><category>objc</category></item><item><title>[Python] Hamming Distance</title><link>http://snipperize.todayclose.com/snippet/py/Hamming-Distance--858008/</link><description>

&lt;p&gt;在信息领域，两个长度相等的字符串的海明距离是在相同位置上不同的字符的个数，也就是将一个字符串替换成另一个字符串需要的替换的次数。
&lt;/p&gt;
&lt;p&gt;例如：
&lt;/p&gt;
&lt;p&gt;"toned" and "roses" is 3.
   1011101 and 1001001 is 2.
   2173896 and 2233796 is 3.
   对于二进制来说，海明距离的结果相当于 a XOR b 结果中1的个数。
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Tue, 06 Jul 2010 12:44:26 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Hamming-Distance--858008/</guid><category>py</category></item><item><title>[Python] 利用simhash来进行文本去重复</title><link>http://snipperize.todayclose.com/snippet/py/%E5%88%A9%E7%94%A8simhash%E6%9D%A5%E8%BF%9B%E8%A1%8C%E6%96%87%E6%9C%AC%E5%8E%BB%E9%87%8D%E5%A4%8D--812006/</link><description>

&lt;p&gt;传统的hash函数能够将一样的文本生成一样的hash函数，但是，通过simhash方法，能够差不多相同的文档得到的hash函数也比较相近。
&lt;/p&gt;
&lt;p&gt;Charikar's hash
   通过Charikar‘s hash，能够将比较相似度的文档得到比较相近的fingerprint。
&lt;/p&gt;
&lt;p&gt;该算法的流程如下：
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;*  Document is split into tokens (words for example)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;or super-tokens (word tuples)
       * Each token is represented by its hash value; a traditional 
   hash function is used
       * Weights are associated with tokens
       * A vector V of integers is initialized to 0, length of the vector 
   corresponds to the desired hash size in bits
       * In a cycle for all token's hash values (h), vector V is updated:
             o ith element is decreased by token's weight if the ith bit of 
   the hash h is 0, otherwise
             o ith element is increased by token's weight if the ith bit of 
   the hash h is 1
       * Finally, signs of elements of V corresponds to the bits of the
    final fingerprint
       该hash不是将文档总体计算hash值，而是将文档中的每个token计算哈希值，对文档中每个token的hash值，按照位 对hash值进行求和，如果当前token的hash值在该位上是0，则减去1，如果在该位上是1，则加上1.将所有的token按照这种方式累加，求的最终的值作为fingerprint。
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Tue, 06 Jul 2010 12:41:20 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/%E5%88%A9%E7%94%A8simhash%E6%9D%A5%E8%BF%9B%E8%A1%8C%E6%96%87%E6%9C%AC%E5%8E%BB%E9%87%8D%E5%A4%8D--812006/</guid><category>py</category></item><item><title>[Apache] Disallow Linking to the Images from Outside of your Site based on Htaccess</title><link>http://snipperize.todayclose.com/snippet/apache/Disallow-Linking-to-the-Images-from-Outside-of-your-Site-based-on-Htaccess--836013/</link><description>

&lt;p&gt;Replace "mysite" with your own and this will block access to sites attempting to link to your images. Note, it's not necessarily always a bad thing for people to link to your images. If you run a blog, portfolio, or sales gallery, etc, you may actually want your images to show up in google image search results and the like. Careful that you're not blocking your goals along with the images. Make sure this script is for you.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Tue, 06 Jul 2010 11:06:39 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/apache/Disallow-Linking-to-the-Images-from-Outside-of-your-Site-based-on-Htaccess--836013/</guid><category>apache</category></item><item><title>[PHP] Is Local Address</title><link>http://snipperize.todayclose.com/snippet/php/Is-Local-Address--824014/</link><description>

&lt;p&gt;Checks if a given address is local. Useful for setting up the dev environment automatically.
&lt;/p&gt;
&lt;p&gt;NOTE: It's not intended for validation!
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Tue, 06 Jul 2010 11:02:04 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/php/Is-Local-Address--824014/</guid><category>php</category></item><item><title>[Python] Rename Unicode filename to pretty ASCII</title><link>http://snipperize.todayclose.com/snippet/py/Rename-Unicode-filename-to-pretty-ASCII--804001/</link><description>

&lt;p&gt;This script converts accented characters in filenames to their ASCII equivalents. e.g.:
&lt;/p&gt;
&lt;p&gt;â &amp;gt; a
   ä &amp;gt; a
   à &amp;gt; a
   á &amp;gt; a
   é &amp;gt; e
   í &amp;gt; i
   ó &amp;gt; o
   ú &amp;gt; u
   ñ &amp;gt; n
   ü &amp;gt; u
   ...
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 09 Jun 2010 09:41:19 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Rename-Unicode-filename-to-pretty-ASCII--804001/</guid><category>py</category></item><item><title>[CSS] Pure CSS Speech Bubble</title><link>http://snipperize.todayclose.com/snippet/css/Pure-CSS-Speech-Bubble--796001/</link><description>

&lt;p&gt;Speech bubbles are a popular effect but many tutorials rely on presentational HTML or JavaScript. This tutorial contains various forms of speech bubble effect created with CSS2.1 and enhanced with CSS3. No images, no JavaScript and it can be applied to your existing semantic HTML.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Mon, 07 Jun 2010 14:31:11 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/css/Pure-CSS-Speech-Bubble--796001/</guid><category>css</category></item><item><title>[Bash/Shell] Google URL Shortener Script</title><link>http://snipperize.todayclose.com/snippet/bash/Google-URL-Shortener-Script--788001/</link><description>

&lt;p&gt;a bash script to use google url shortener.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Mon, 07 Jun 2010 14:27:41 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/bash/Google-URL-Shortener-Script--788001/</guid><category>bash</category></item><item><title>[PHP] Compressing Strings</title><link>http://snipperize.todayclose.com/snippet/php/Compressing-Strings--759001/</link><description>

&lt;p&gt;When talking about compression, we usually think about files, such as ZIP archives. It is possible to compress long strings in PHP, without involving any archive files.
   We were able to achive almost 50% size reduction. Also the functions gzencode() and gzdecode() achive similar results, by using a different compression algorithm.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 20 May 2010 14:04:20 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/php/Compressing-Strings--759001/</guid><category>php</category></item><item><title>[PHP] Functions with Arbitrary Number of Arguments</title><link>http://snipperize.todayclose.com/snippet/php/Functions-with-Arbitrary-Number-of-Arguments--750001/</link><description>

&lt;p&gt;You may already know that PHP allows you to define functions with optional arguments. But there is also a method for allowing completely arbitrary number of function arguments.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 20 May 2010 14:01:19 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/php/Functions-with-Arbitrary-Number-of-Arguments--750001/</guid><category>php</category></item><item><title>[SQL] List of Current Sessions Causing Blocking</title><link>http://snipperize.todayclose.com/snippet/sql/List-of-Current-Sessions-Causing-Blocking--740001/</link><description>

&lt;p&gt;list of current sessions causing blocking
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Tue, 18 May 2010 08:40:44 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/sql/List-of-Current-Sessions-Causing-Blocking--740001/</guid><category>sql</category></item><item><title>[SQL] List of Current Locks</title><link>http://snipperize.todayclose.com/snippet/sql/List-of-Current-Locks--737001/</link><description>

&lt;p&gt;list current database locks
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Tue, 18 May 2010 08:38:08 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/sql/List-of-Current-Locks--737001/</guid><category>sql</category></item><item><title>[CSS] Cross Browser font-face</title><link>http://snipperize.todayclose.com/snippet/css/Cross-Browser-font-face--733001/</link><description>

&lt;p&gt;cross browser @font-face.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Mon, 10 May 2010 11:39:41 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/css/Cross-Browser-font-face--733001/</guid><category>css</category></item><item><title>[PHP] PHP Excel Reader</title><link>http://snipperize.todayclose.com/snippet/php/PHP-Excel-Reader--722001/</link><description>

&lt;p&gt;PHP Excel Reader allows you to parse and retrieve information from XLS files. It reads the binary format of XLS files directly and can return values and formats from any cell.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 29 Apr 2010 12:42:53 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/php/PHP-Excel-Reader--722001/</guid><category>php</category></item><item><title>[CSS] Gradients</title><link>http://snipperize.todayclose.com/snippet/css/Gradients--667003/</link><description>

&lt;p&gt;Another practical and time-saving technique introduced in CSS3 is the ability to create custom gradients as backgrounds. Although Internet Explorer doesn’t support gradients of the CSS3 variety, it’s pretty easy to implement them for the IE family using proprietary syntax.
&lt;/p&gt;
&lt;p&gt;For the IE filters, the GradientType can be set to “1″ (horizontal) or “0″ (vertical).
&lt;/p&gt;
&lt;p&gt;The Drawbacks
&lt;/p&gt;
&lt;p&gt;Some of the usual drawbacks apply to gradients created with the IE-only filter, along with some other problems.
&lt;/p&gt;
&lt;p&gt;Your CSS won’t validate, although that’s also true for the WebKit and Mozilla values
   Different code is needed for IE8, adding to maintenance time
   The WebKit and Mozilla gradients allow for “stops” to be declared; this doesn’t seem to be possible with the IE gradient, limiting its flexibility
   IE’s filter doesn’t seem to have a way to declare “radial” gradients, which WebKit and Mozilla support
   For a gradient to be visible in IE, the element with the gradient must have layout
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 29 Apr 2010 12:38:07 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/css/Gradients--667003/</guid><category>css</category></item><item><title>[CSS] Box Shadow</title><link>http://snipperize.todayclose.com/snippet/css/Box-Shadow--714001/</link><description>

&lt;p&gt;The Drawbacks
&lt;/p&gt;
&lt;p&gt;The settings for the IE shadow filter do not match those of the other proprietary properties, so in order to make it look the same, you have to fiddle with the values until you get it right, which can cause maintenance headaches
   The filter property doesn’t validate, but neither do the WebKit and Mozilla properties, so this is a drawback in all browsers
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 29 Apr 2010 12:35:43 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/css/Box-Shadow--714001/</guid><category>css</category></item><item><title>[CSS] Rounded Corners (border-radius)</title><link>http://snipperize.todayclose.com/snippet/css/Rounded-Corners-(border-radius)--691002/</link><description>

&lt;p&gt;The border-radius property (more commonly referred to as CSS3 rounded corners) is another popular CSS3 enhancement. This property has allowed developers to avoid the headache of bloated JavaScript or extra positioned elements to achieve the same effect. But once again, Microsoft doesn’t want to cooperate, so IE doesn’t have any support for this property.
&lt;/p&gt;
&lt;p&gt;Fortunately, at least one person has come up with a very usable workaround that can be used in an IE-only stylesheet. Remiz Rahnas of HTML Remix has created an HTC file called CSS Curved Corner that can be downloaded off Google Code.
&lt;/p&gt;
&lt;p&gt;The great thing about this piece of code is that it doesn’t require any extra maintenance if you adjust the amount of radius on your rounded corners. You just link to the file in your CSS, and the script will automatically parse your CSS to find the correct radius value from the standard border-radius property.
&lt;/p&gt;
&lt;p&gt;The Drawbacks
&lt;/p&gt;
&lt;p&gt;The HTC file is 142 lines (minifying or GZipping would help, but it’s still extra bloat)
   The behavior property will make your CSS invalid
   Your server needs to be able to load HTC files for this technique to work
   IE8 seems to have some trouble in some circumstances when the HTC file forces the curved element to have a negative z-index value
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 29 Apr 2010 12:33:55 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/css/Rounded-Corners-(border-radius)--691002/</guid><category>css</category></item><item><title>[CSS] transparent layer in all ie versions</title><link>http://snipperize.todayclose.com/snippet/css/transparent-layer-in-all-ie-versions--708001/</link><description>

&lt;p&gt;You really only need the second line, which works in all three versions of Internet Explorer. But if for some reason you needed the opacity setting to apply only to IE8, and not to IE6/7, then you can use the third line, which the older versions don’t recognize.
&lt;/p&gt;
&lt;p&gt;The opacity value at the end of each IE line works basically the same way that the opacity property does, taking a number from 0 to 100 (the opacity property takes a two-digit number from 0 to 1, so “44″ for IE would be “0.44″ for the others). Also, as many have experienced when using opacity (even when using the standard method), the opacity settings will be inherited by all child elements, for which there is no easy workaround.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Thu, 29 Apr 2010 12:30:21 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/css/transparent-layer-in-all-ie-versions--708001/</guid><category>css</category></item><item><title>[Python] Make unique file name</title><link>http://snipperize.todayclose.com/snippet/py/Make-unique-file-name--676002/</link><description>

&lt;p&gt;Sometimes it is important to save data in the file but the file with the specified name already exists. This function creates a file name that is similar to the original by adding a unique numeric suffix. This avoids the renaming of existing files.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Fri, 23 Apr 2010 08:11:05 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Make-unique-file-name--676002/</guid><category>py</category></item><item><title>[Python] IP and MAC addresses</title><link>http://snipperize.todayclose.com/snippet/py/IP-and-MAC-addresses--686001/</link><description>

&lt;p&gt;This module collects all IP and MAC addresses from several available sources on the underlying system. See the module documentation for more details, supported Python releases and platforms.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Fri, 23 Apr 2010 08:07:59 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/IP-and-MAC-addresses--686001/</guid><category>py</category></item><item><title>[C++] Image to colortext(html) converter</title><link>http://snipperize.todayclose.com/snippet/cpp/Image-to-colortext(html)-converter--574010/</link><description>

&lt;p&gt;It converts any image to colored text (html).
   In order to compile textimg you will need to install magick++ dev libraries.
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Sat, 17 Apr 2010 17:31:49 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/cpp/Image-to-colortext(html)-converter--574010/</guid><category>cpp</category></item><item><title>[Objective-C] Correct Way to Draw Background Using an Image Pattern</title><link>http://snipperize.todayclose.com/snippet/objc/Correct-Way-to-Draw-Background-Using-an-Image-Pattern--568003/</link><description>

&lt;p&gt;Correct Way to Draw Background Using an Image Pattern
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 31 Mar 2010 16:10:16 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/objc/Correct-Way-to-Draw-Background-Using-an-Image-Pattern--568003/</guid><category>objc</category></item><item><title>[Python] Console Make Text Color and Bold</title><link>http://snipperize.todayclose.com/snippet/py/Console-Make-Text-Color-and-Bold--596002/</link><description>

&lt;p&gt;no comment
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 31 Mar 2010 16:07:20 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/py/Console-Make-Text-Color-and-Bold--596002/</guid><category>py</category></item><item><title>[C++] TimerObject</title><link>http://snipperize.todayclose.com/snippet/cpp/TimerObject--567002/</link><description>

&lt;p&gt;;======================
   /* Timers
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Usage
____________________________________

**Place the following line at the top of your .iss file
    #include "${LavishScript.CurrentDirectory}/Scripts/vg_objects/Obj_Timers.iss"

**In your script call the following object with these commands, or type this in the console

Timers Methods(Things you can do)
    obj_timer:Add["Name of Timer" "Time in 1/10 Seconds"]
    obj_timer:Remove[Name of Timer]
    obj_timer:ClearAllTimers
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;  Timers Members(Things you can question of Timers) 
           obj_timer.TimeRemaining["Name of Timer"]
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
Notes
____________________________________
**  You dont need to know how an object works to use it.  
**  Objects are bits of code that perform specific functions.
**  This function specifically Creates Timers for you
**  You should clear all timers at the beginning and end of your script


Credits
____________________________________
*  Created by mmoaddict
*  Special Thanks to Amadeus and Lax for all their work
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;*/
&lt;/p&gt;</description><author>ThePeppersStudio@gmail.com (ThePeppersStudio)</author><pubDate>Wed, 31 Mar 2010 16:05:02 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/cpp/TimerObject--567002/</guid><category>cpp</category></item><item><title>[Plain] AppPath</title><link>http://snipperize.todayclose.com/snippet/plain/AppPath--531003/</link><description>

&lt;p&gt;Here's my comment
&lt;/p&gt;</description><author>SonsOThunder@gmail.com (SonsOThunder)</author><pubDate>Sun, 28 Mar 2010 08:22:10 +0000</pubDate><guid>http://snipperize.todayclose.com/snippet/plain/AppPath--531003/</guid><category>plain</category></item></channel></rss>