Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Script per copiar els fitxers canviats en una revisió git al servidor remot via sftp, using PHP Secure Communications Library (phpseclib): http://sourceforge.net/projects/phpseclib/.
Útil per usar amb 1and1.
0
976
posted 11 years ago by marcniko
The following codes populate the country list into dropdown box based on browser's languages. The country information is getting from geolocation.com
0
968
posted 11 years ago by Hexahow
Checks if two given arrays equal each other as php doesn't have a built in function for this.
0
831
posted 11 years ago by MaxHudson
This will reset the tabindex of all input fields on a form after page load
0
1294
posted 11 years ago by bitsculptor
This is the second and last part of the encryption algorithm that I uploaded last week. It's the other-way-round program: it decrypts a password typed by user.
0
1044
posted 11 years ago by eiger824
Try to run Codeigniter in a subfolder of a Wordpress installation and want to remove index.php for clean URLs?
Put this code in a .htaccess file in your codeigniter directory ("cidir" in this example).
0
2250
posted 11 years ago by telltec
The following code allows only numeric characters to be entered.
1
878
posted 11 years ago by jprochazka
It removes all standard C-style comments(/* 1-n */) and all single line comments("//"). Greedy matching.
0
1126
posted 11 years ago by XtreamIT
allows itmings to be set for colour transitions if this is put into mouseover/ hover block.
1
716
posted 11 years ago by Dugzor
This will remove the items in a select box/list box that have been selected.
0
843
posted 11 years ago by j100
If you are using the [TimThumb](http://code.google.com/p/timthumb/ "TimThumb on Google Code") script with a URL the contains tildes (~) and images are breaking, here is the fix...
I did not create this snippet but found it extremely useful so I th...
0
1008
posted 11 years ago by tacudtap
MySQL
La fonction COALESCE de MySQL permet de renvoyer une valeur par défaut si la valeur null est renvoyée initialement.
Le fonction COALESCE de MySQL permet de renvoyer une valeur par défaut si la valeur null est renvoyée initialement.
0
1195
posted 11 years ago by pruntrut
For some reason tidy inserts new lines before/after <![CDATA[ content in XML files. Since I like the benefits of a reformatted, readable XML...
... i run tidy first, then remove the spaces before/after the CDATA block:
0
1041
posted 11 years ago by iroybot
Handy code snippet for keeping track of the number of characters a user is entering into a textbox or textarea. It will dynamically update the count as the user is typing. This also works with copy & paste.
The top snippet will automatically calcu...
2
811
posted 11 years ago by mattvbiggs
A C++ algorithm which encrypts an alphanumeric password, asking the user to choose the encryption level.
0
5848
posted 11 years ago by eiger824
To keep up on important incidents on your site without having to dig through server logs the alternative can be custom logs.
0
861
posted 11 years ago by COBOLdinosaur
When box sizing is set, the padding, border and margin no longer add onto the total width or height of the element. Instead, they eat into the set width or height. So, if you have a box whose width is set to 300px, and padding set to 10px, then the t...
1
931
posted 11 years ago by bmayzure
Cross-browser roll link effect in CSS3. Works in IE 10+, Webkit (Chrome/Safari/etc), Opera, Gecko (Firefox/Seamonkey/etc). Degrades nicely for unsupported browsers.
0
930
posted 11 years ago by bmayzure
A simple CSS3 link-color transition effect. Fades from the base color to the active/focus color and back on rollover. A nice little added effect that's pretty well cross browser. Works with Webkit (Chrome/Safari/etc), Opera, Gecko (Firefox/Seamonkey/...
1
1008
posted 11 years ago by bmayzure
**Example of use:**
$bIsConnected = check_internet_connection();
$sText = ($bIsConnected) ? 'You are connected to the Internet.' : 'You are not connected to the Internet.';
echo $sText;
0
1889
posted 11 years ago by phpdev