Welcome To Snipplr


Everyone's Recent Snippets



1 ... 386 387 388 389 390 ... 553
Great little bit of code for if you are rewriting URLs but then want the old GET URLs to rewrite to their rewritten URLs (phew). Good for telling Google where the new pages are with a 301 rather than getting both indexed. In this example, i had a...
0 1258 posted 16 years ago by roflman79
sku on magento frontend
0 1230 posted 16 years ago by nico65
This code will create a human readable string that will look more close to dictionary words, useful for captchas.
3 2571 posted 16 years ago by Mithun
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
2 1665 posted 16 years ago by Mithun
Sometimes you can't use an image button, you have to use a submit button, but you still want to hide the text and show an image instead. The width and height can be changed, of course. The point is that they are specified. Display:block is need...
1 2565 posted 16 years ago by jessibird
0 1522 posted 16 years ago by iTony
The tetex implementation of BibTeX, LaTeX's bibliography tool, forcibly breaks lines above a certain length (79 chars) by inserting % signs and line feeds, unless they can be broken between words. This is a problem when URLs are referenced, or if co...
0 1758 posted 16 years ago by deepsoul
/app/code/core/Mage/Newsletter/Model/Subscriber.php $this->sendConfirmationSuccessEmail();
0 1190 posted 16 years ago by nico65
0 1310 posted 16 years ago by dsntos
adapted from the fantastic „Learning jQuery 1.3“ book http://www.packtpub.com/learning-jquery-1.3/book
0 1490 posted 16 years ago by cfleschhut
0 1172 posted 16 years ago by kungfoo
Detects all external/outgoing links, adds class, & adds target = _blank. When using a strict doctype, this method is valid when using target manipulation.
1 1322 posted 16 years ago by dsntos
Name the source duplicate_remove.perl and open Terminal.app in the same directory, and write: perl duplicate_remove.perl <file-to-be-convertet>
0 1355 posted 16 years ago by gerhardsletten
0 3225 posted 16 years ago by traeregan
The canvas drawImage size default is 300 x 150, so it's using the CSS to resize the canvas. Example posted at http://pastebin.me/76aed7005b1b413ea3c479287f4dbd59
0 1962 posted 16 years ago by Motty
Get the ID of the root (oldest ancestor, parent without parents) page relative to the current page in a WordPress page template. Can be helpful for use with wp\_list\_pages() to create navigation markup.
1 1794 posted 16 years ago by cyberhobo
Select the first and last item in an unordered list. As an example, I add a CSS class to each. In WordPress, it's not so easy to get wp\_list\_pages() to generate these classes. jQuery provides an easy out for javascript-enabled clients.
0 1737 posted 16 years ago by cyberhobo
This line can be added to 'backend', 'frontend', 'listen' directives in the HAProxy config. It will redirect all requests for /books/mysql to /books.php?title=mysql
0 2232 posted 16 years ago by alexwilliams
Checks if value is an e-mail.
1 1296 posted 16 years ago by NyX
Outputs MySQL server stats : uptime, threads, questions, slow queries, opens, flush tables, open tables, queries per sec (avg).
2 1151 posted 16 years ago by NyX
Include this in any page you want to track for Google bot crawls. Adapt it to your needs (eg: MySQL log instead of e-mail announcement, etc).
9 2517 posted 16 years ago by NyX
There's no has\_children() function in WP 2.8.4, but get\_children() returns false if the post/page has no children, so it can serve the same purpose in a page template. Outside a page template you'd have to add a global declaration for the $post...
2 1721 posted 16 years ago by cyberhobo
How to fix MySQL Query Browser socket connection problem
0 1303 posted 16 years ago by armandoalves
Definitely falls into the category of "simple thing I shoulda memorized years ago", but whatever:
0 1432 posted 16 years ago by rengber
inspired by boagworld.com
1 1289 posted 16 years ago by cfleschhut
Save/Load or.. Write/Read or.. Store/Retrieve Private Key/Public Key to/from disk/file :D
0 12414 posted 16 years ago by geekiuscaesar
When using `ln` to create a link in a different directory, the semantics of creating hard and symbolic links differ. That is because a hard link contains a direct reference to its target's data, while a symbolic link is just a string containing a (p...
1 1774 posted 16 years ago by deepsoul
`\mathbf` does not put operators and greek characters in bold face. This macro does.
1 3568 posted 16 years ago by deepsoul
1 ... 386 387 388 389 390 ... 553