Welcome To Snipplr


Everyone's Recent Snippets Tagged c



A fairly DRY way to test for required attributes of a model. It's sort of an alternative to fixtures. It breaks the one-assertion-per-test rule that some people favor. Drop in your unit test and edit as necessary. A better (yet not quite perfect)...
3 2472 posted 19 years ago by tjstankus
2 1283 posted 19 years ago by tjstankus
Great little flash player for playing FLV files. Code below simply adds them to your web page. Remember to add 20 pixels to the height="" attribute to allow for the player controler. For the player goto: http://www.jeroenwijering.com/?item=Flash_Vid...
39 13557 posted 19 years ago by 1man
Simple styling for the links on a webpage using CSS. Sometimes hard to remember what order the have to be in for the :hover to work correctly. (Now fixed :)
2 1928 posted 19 years ago by 1man
Very simple XHTML 1.1 Doctype template.
2 1626 posted 19 years ago by 1man
Just a simple template for the XHTML 1.0 Strict doctype. Updated with slight fix involving the meta tags.
3 2048 posted 19 years ago by 1man
Very simple standard compliant way of opening a page in a new window. Since XHTML 1.0 Strict doesn't allow the target attribute in the tag. This method isn't recommended, use the DOM folks! See "Standard Compliant Way to Open a New Page Function" in...
46 11238 posted 19 years ago by 1man
Select all checkbox in the specific context. Need jQuery Framework : http://jquery.com/
12 1574 posted 19 years ago by walepinski
StripTables Script. Need jQuery Framework : http://jquery.com/
6 1223 posted 19 years ago by walepinski
Deals with the fact that mouse buttons are referenced in different ways by different browsers.
0 1924 posted 19 years ago by MyKey_
2 1125 posted 19 years ago by yaguta
Detects the browser and its version.
99 17207 posted 19 years ago by MyKey_
For the CSS to activate this see Big Curley Quotes.
10 2758 posted 19 years ago by 1man
1 1302 posted 19 years ago by ndegruchy
Greatly speeds up a slow Safari by purging any cached icons which have not been accessed in the past 30 days. Works well as a cron job. From http://www.macosxhints.com/article.php?story=20040323144305318
2 2223 posted 19 years ago by Roshambo
New and improved regexp
3 1650 posted 19 years ago by ndegruchy
warning: snipplr tends to escape the quotes and slashes, causing this snippet to fail when pasted verbatim.
2 1852 posted 19 years ago by ndegruchy
http://rossoft.wordpress.com
1 1519 posted 19 years ago by jonbaer
Just testing snipplr w/ this snippet.
5 1912 posted 19 years ago by jonbaer
5 1679 posted 19 years ago by kaminogoya
0 1636 posted 19 years ago by kaminogoya
Basic template for xhtml transitional
15 2897 posted 19 years ago by 1man
I have also posted the Javascript that makes this markup show and hide.
0 1486 posted 19 years ago by 1man
This script allows you to show and hide a at the click of a button. See Show / Hide HTML for Markup.
1 1820 posted 19 years ago by 1man
Markup example: See Big Curly Quotes Markup. Thx to difusion.org.uk. No need for images to make big quotes on a page, CSS does it for you. Tested in many browsers.
94 12128 posted 19 years ago by 1man
5 1322 posted 19 years ago by 1man
Taken from bluerobot. Create a content div, set the width and the margin set to auto will align the div to the centre horizontally.
5 1257 posted 19 years ago by 1man