Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
You can get hostname from script environment - getenv("HTTP_HOST")
(?!'.$host.') matches URLs always except local links
0
1386
posted 16 years ago by kossmoss
<table>
<tr>
<td>Head</td>
</tr>
<tr>
<td>Subhead</td>
</tr>
<tr>
<td>text</td>
</tr>
</table>
0
1245
posted 16 years ago by hotdiggity
Equalizing Two Column Layout with Full Width Header ~ Fixed Width Content
0
1217
posted 16 years ago by hotdiggity
This example is adding a feature box after the first post. You can apply it to any of the hooks inside the loop.
2
1326
posted 16 years ago by kristarella
changed to detect sring sheet first, then to try object extension.
2
1497
posted 16 years ago by pdswan
Learn how to create drop caps using CSS and no extra HTML markup in this short tutorial.
1
1669
posted 16 years ago by neal_grosskopf
Extracts a string paremeter from the url query string. Basic operation wont handle multiples such as radio buttons etc. Just gets the first instance of the name and returns it's value.
1
1291
posted 16 years ago by kouphax
In phpMyAdmin you can define strftime formats for your dumped database sql files. Here you are with two formats, one for sigle table export, one for multi-table export.
0
1444
posted 16 years ago by dawjdh
Use this to extract an HTML5 origin from a URI. $1 is the origin.
The square brackets are there to support IPv6 addresses.
Example:
var html5OriginRegex = /^([\w-]+:\/*\[?[\w\.:-]+\]?(?::\d+)?).*/;
"http://www.google.com:42/foo/bar/...
0
1074
posted 16 years ago by Sephr
Affects <A> tags for links starting with $link
Example: LinkReplacer ($text, 'http://www.snipplr.com') affects to
<a href="http://www.snipplr.com">Snipplr</a>
and <a href="http://www.snipplr.com/blog">Snipplr Blog</a>
0
1506
posted 16 years ago by kossmoss
JavaScritp Form Validation Framework to validate form fields on the fly, no programming knowledge required.
0
1357
posted 16 years ago by clickfind
ErrorConstructor produces error constructors that behave the same way as the seven native error constructors.
Usage: `ErrorConstructor([constructorName])`
*If no constructorName is specified, the default of `Error.prototype.name` is used*
Us...
1
1413
posted 16 years ago by Sephr
Search for applications by substring and display the results.
0
1486
posted 16 years ago by abwaters
Search for applications by developer name and display the results.
0
1528
posted 16 years ago by abwaters
Search for an application by its fully qualified Java package name and display the result.
0
1547
posted 16 years ago by abwaters
With android you can define intent-filters to indicate that your app wants to handle requests for specific urls.
1
1641
posted 16 years ago by abwaters