Welcome To Snipplr


Everyone's Recent Snippets



1 ... 440 441 442 443 444 ... 553
and DropShadow Filter :)
0 1643 posted 17 years ago by antpaw
0 1191 posted 17 years ago by gerhardsletten
0 1259 posted 17 years ago by m-pokrovskii
A PHP function that correctly validates all parts of a given email address, according to RFCs 5322, 5321, 1123, 2396, 3696, 4291, 4343, 2821 & 2822. I’ve released it under a license that allows you to use it royalty-free in commercial or non-commer...
4 2572 posted 17 years ago by dominicsayers
1 1533 posted 17 years ago by aadsm
6 1633 posted 17 years ago by kungpoo
Is.Gd is a URL-shortening service much like TinyURL. Using PHP’s cURL library, you can create shortened URLs on the fly with ease. “is.gd” is much shorter than “tinyurl.com” so if you need the URL to be as short as possible, use this method...
0 1660 posted 17 years ago by nerdsane
Uses JScript
0 1515 posted 17 years ago by deepdown
If reading email from a POP box with PHP, you can use this to strip out signatures (ones that are delimited with the proper '--' notation). It will only strip the last signature of an email, in case someone enters a '--' intentionally elsewhere.
0 1677 posted 17 years ago by DaveChild
1 1699 posted 17 years ago by gfazioli
21 6714 posted 17 years ago by garside
Use the colon : modifier to build an array. The colon is like a wildcard. In this case, anything that starts with ash. SAS Arrays hold variable names which can be used during tedious procedures such as conditional loops.
0 3802 posted 17 years ago by webonomic
I use this snippet to force a number to 2 decimal places. Eg, For prices, PHP rounds the number 22.20 to 22.2. This code forces a zero on the end if there isn't 2 decimal places already.
1 1706 posted 17 years ago by xtheonex
This little piece of code will convert to US phone format, as typed. Eg, As the number "0000000000" was typed, it would convert it to (000)-000-0000.
6 4939 posted 17 years ago by xtheonex
Function to return the current page name, without the location of it... Eg, for the URL http://localhost/www/someproject/index.php, this would return index.php
1 1364 posted 17 years ago by xtheonex
A quick, usefull function which i use to convert a date/time string pulled from MySQL, into a readable format.
1 1632 posted 17 years ago by xtheonex
This is by no means the most efficient way to do this, in terms of performance. It is however the easiest way.
1 1655 posted 17 years ago by xtheonex
Won't work with Google code pages: they are javascript powered.
0 1555 posted 17 years ago by iblis
How to run a KVM VM with no X (server environment, originally seen at http://blog.bodhizazen.net/?p=40).
0 1446 posted 17 years ago by narkisr
I just figured out that TextExpander can execute AppleScripts. This is an experiment.
1 1330 posted 17 years ago by ttscoff
simple way to join avi files on the command line (need to have mplayer installed)
0 1511 posted 17 years ago by inkdeep
Clear files in /tmp directory that are older than three days - terminal/cron this is a very simple example - could also remove by last access time, etc.
0 1496 posted 17 years ago by inkdeep
I had a directory tree with around 4000 pdf files and I needed a page count - so I semi-rolled this. I swiped the counter code from the gem README: http://github.com/yob/pdf-reader/tree/master It could be more contained - as is I run it from irb:...
1 2124 posted 17 years ago by inkdeep
0 1500 posted 17 years ago by vasilije
Use with (in custom.css) .sidebar_box {margin-bottom:2em; text-align:center;} You may have to adjust the width for your sidebars.
2 1923 posted 17 years ago by kristarella
This is the javascript code that enables you to create hover effects also in IE6. It's clean, it's light, it's super! :) Apply that code to your document (eg. in <head></head>) and in css add like this: ul li:hover, ul li.shover { your css st...
1 1910 posted 17 years ago by mihael
2 1816 posted 17 years ago by rwczippy
1 ... 440 441 442 443 444 ... 553