Content Snippets


07 September, 2017   

CSS Code for Common Unicode Icons

Make a MySQL Database called "db" with a table named "variables" with three rows ("id", "title", and "content"). Insert your data. Then call the page by going variables.php?id=1 etc.

If a string is contained in another string and you need to search for it, this is a very clever way to do it:

11 April, 2013   

Pull external HTML code from a file right into your webpage

07 March, 2011   

Shows how to create a simple file download by using PHP. The content could also be dynamically generated)

09 March, 2011   

Default XHTML start code for designing a layout or template for your website. Great for working on several clients/projects and do not want to retype this code over and over again.

13 August, 2011   

Although there really isn't any foolproof way to protect your web page content, this JavaScript will discourage the more novice Internet users from copying your content. An alert box will appear displaying your copyright information when the right mouse button is clicked. However, this script will not completely protect your content from more...

Two simple functions to read an write tab seperated files (like CSV files, etc).

An example of Strict Textmate Template

30 April, 2011   

This allows you to redirect the page using meta tag. Setting content to 0 for immediate redirect.

30 August, 2011   

This snippet to show how to use the Last-Modified and the ETag header to optimize the caching of a website. If used correctly this will speed up your page loads.

10 April, 2012   

Protect your web page content with JavaScript code

JavaScript Code example to protect Your Web Page Content

The Gmail Bookmarklet will add a unique string to the email signature to prevent Gmail from trimming the content.

09 February, 2013   

There are websites that will watch a page for you and notify but I didn't really like the way they worked.

11 February, 2011   

Center DIV with Dynamic Height

18 October, 2012   

Meta tags allow you to provide metadata about your HTML pages. Meta tags can be very useful for search engines.

Basic XHTML 1.0 layout which includes basic layout structure and is prepared for jQuery. On load a 'js' class is added to the root element in order to nicely handle graceful degradation if JS is disabled and prevent flickering if JS is enabled.

01 July, 2015   

Loads and saves a compressed dump of an array

This is the kind of function every web developer should have in their toolbox for future use: give it a string, a start, and an end, and it will return the text contained with $start and $end.