DaveChild


Member since 09/11/2008

Location: UK

Website: http://www.addedbytes.com

19 snippets

7785 profile views

4 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

DaveChild's Recent Snippets



« Prev 1 Next »
Puts a red border around anything with an inline style. Prefix with "javascript:" and paste into the address bar to run on a page directly, or run with a load event.
1 1458 posted 16 years ago by DaveChild
This function will add soft hyphens after every 3rd character in words of over 10 characters. It will not leave fewer than three characters following a soft hyphen. Known bugs: Adds soft hyphens to URLs and within HTML tags.
0 1342 posted 16 years ago by DaveChild
This snippet returns a link to twitter for the user to tweet the current page. URL is TinyURLed automatically (and tinyurls are cached indefinitely in assets/cache/tweetthis.txt). Simply paste code into a new snippet called "TweetThis". Call it li...
3 1494 posted 16 years ago by DaveChild
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 1622 posted 17 years ago by DaveChild
Pass in text and the maximum allowable length and this snippet will return as many full sentences from the text as it can within that length. If no sentences, it will just trim to the maximum length allowed.
1 1906 posted 17 years ago by DaveChild
Function replaces all non-alpha-numeric chars and cleans up a text string. Should output a usable URL for almost all text.
1 1742 posted 17 years ago by DaveChild
0 1440 posted 17 years ago by DaveChild
This script should be run from the "master" database. It will destroy the dev copy of a database and restore from the live copy. Code slightly modified from original (linked).
0 1355 posted 17 years ago by DaveChild
Run from within SQL to get list of items in directory to a table.
1 1504 posted 17 years ago by DaveChild
Crops and resizes, maintaining perspective, with a white background.
1 1555 posted 17 years ago by DaveChild
1 1732 posted 17 years ago by DaveChild
Based on the ereg family of functions in PHP.
0 1590 posted 17 years ago by DaveChild
Format strings: * %A - AM or PM * %a - am or pm * %m - Month with leading zeroes (01 - 12) * %n - Month without leading zeroes (1 - 12) * %F - Month name (January - December) * %M - Three letter month name (Jan - Dec) * $d - Da...
0 3370 posted 17 years ago by DaveChild
Translated by David Hunter.
0 2143 posted 17 years ago by DaveChild
4 1865 posted 17 years ago by DaveChild
7 3252 posted 17 years ago by DaveChild
0 3716 posted 17 years ago by DaveChild
« Prev 1 Next »