Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
A little function to add custom styles to the tinymce editor in wordpress.
1
1051
posted 13 years ago by bitsculptor
Just a small function to sanitize the user's input of any xss and sqli. I saw a lot of ones that didn't include htmlentities or htmlspecialchars, and were still vulnerable to persistent/reflected xss.
1
1019
posted 13 years ago by TheNullByte
This Perl snippet shows how to separate quoted parts from a text in order to process quoted and unquoted parts separately. For example, you could expand variables or wildcards only in the unquoted part. Then the different processed parts are put to...
0
1126
posted 13 years ago by deepsoul
Extracts the video title & download URL from a youtube page and starts a download.
3
1666
posted 13 years ago by codespartan
Formats a 10-digit phone number into a good format (123) 555-1234
0
1690
posted 13 years ago by cpres
The closest to a generic List in javascript.
When calling constructor - new List(Module) - add model in constructor parameter
0
1056
posted 13 years ago by mikkeldamm
For a project I needed to generate a unique code for each user the client would input manually. Each user would have four fields (first name, last name, email, zipcode). Omitting the email addresses ensures unique output because we reduce the chances...
0
800
posted 13 years ago by fmdfrank
JavaScript
get hover effect of global nav parent link to roll off at same time dropdown goes away in out of the box sharepoint global nav
The class, "activeDDParent", needs css that will cause the parent to have the same hover effect it has when the mouse hovers over it. This class allows for the out-of-the-box sharepoint rollof delay. "portalnavwrapper" is just the class of a div I ha...
0
1327
posted 13 years ago by rumremix
Adding HTML into custom blocks rather than hard coding makes it so people don't bother us devs to change sheite!
1
1149
posted 13 years ago by cpres
when someone trying to or two conditions using active record database library in codeigniter
0
1070
posted 13 years ago by pruntrut
1. Download the zip file and unzip it
2. All the CSS and HTML code with explanation is included so all you
have to do is COPY and PASTE only.
0
886
posted 13 years ago by flanker
Look if the given input could be a legal VAT-number.
Accepts input with or without '.' between the numbers and must contain a County-code
0
1188
posted 13 years ago by MGHollander
Straatnamen en huisnummer splitsen, hieronder diverse types straatnamen
Bron: http://www.pfz.nl/archief/965267-adres-splitsen-in-straatnaam-en-huisnr/
0
1358
posted 13 years ago by MGHollander
Instead of the standard return of duplicates, this will actually show the rows that are duplicated, making it easier to see the data
0
939
posted 13 years ago by TheNullByte
Use this no-conflict wrapper instead of the default ready function in JQuery to initialize scripts in your Drupal 7 theme
0
1024
posted 13 years ago by chasecrawford
Fetches resources from a remote host with specified crawl depth.
0
750
posted 13 years ago by paullombard
Example calculate yesterday, but if you multiply by some number you can get in an easy way, weeks, months or years
0
1407
posted 13 years ago by satie83
A quick note added in February 2011. Google has now removed the iwloc part of the url in most cases. To remove the pin, you can now add &iwloc=near to the end of the iframe src attribute. So….
<iframe></iframe>
…would become…
<ifra...
0
979
posted 13 years ago by thesmu
Use this snippet to check if user supplied URL is a valid Youtube URL. Has support for youtu.be shortened URL's too.
1
1471
posted 13 years ago by Morg
How to dynamically generate combo box contents depending on the selection made by a user on earlier combo box.
0
961
posted 13 years ago by BlackSheep