Skip Navigation

Everything tagged with "reference"

The second version of the Regular Expressions Cheat Sheet, a quick reference guide for regular expressions, including symbols, ranges, grouping, assertions and some sample patterns to get you started.

Read the rest of this post »

The second version of the mod_rewrite Cheat Sheet, a quick reference guide for mod_rewrite, with rewrite flags, regular expression syntax and sample rules.

Read the rest of this post »

PHP Cheat Sheet (V2)


30 June 2008   |   Comments   |   php, reference, pdf, cheatsheet, download, css

The second version of the PHP Cheat Sheet, a quick reference guide for PHP, with functions references, a regular expression syntax guide and a reference for PHP's date formating functions.

Read the rest of this post »

The second version of the CSS Cheat Sheet, a quick reference guide for CSS, listing selector syntax, properties, units and other useful bits of information.

Read the rest of this post »

This A4 reference lists the various functions available in Microsoft SQL Server, and demonstrates the creation of stored procedures, triggers and functions.

Read the rest of this post »

HTML is the language of the web. It is the semantic support on which websites depend. This A4 reference lists the various tags available to the web designer, as well as a selection of useful character entities, attributes and events.

Read the rest of this post »

Adding and removing variables to and from URLs using PHP can be a relatively simple process admittedly, but I have a couple of functions I use often to make the process even less time-consuming.

Add Querystring Variable

A PHP function that will add the querystring variable $key with a value $value to $url. If $key is already specified within $url, it will replace it.

function add_querystring_var($url, $key, $value) {
    $url = preg_replace('/(.*)(?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&');
    $url = substr($url, 0, -1);
    if (strpos($url, '?') === false) {
        return ($url . '?' . $key . '=' . $value);
    } else {
        return ($url . '&' . $key . '=' . $value);
    }
}

Remove Querystring Variable

A PHP function that will remove the variable $key and its value from the given $url.

function remove_querystring_var($url, $key) {
    $url = preg_replace('/(.*)(?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&');
    $url = substr($url, 0, -1);
    return ($url);
}

Regular Expressions are very powerful, and many people find their unusual syntax hard to get to grips with. This A4 reference serves as a guide to regular expression patterns and options.

Read the rest of this post »

Microformats allow us to add more information to our documents on the web, embedding semantic data in web pages that can then be parsed and used in other applications. This reference sheet contains an overview of the most often used microformats.

Read the rest of this post »

Many of my clients have worked previously consultants and SEOs that inundated them with jargon, especially where proposals and sales calls are concerned. I find myself sometimes using too much jargon - easily done when you spend so much time working in any field. This jargon guide explains the industry terms in simple language.

Read the rest of this post »

World of Warcraft may not be a web design, development or marketing topic, but that doesn't mean I don't need a cheat sheet for it. I've just started playing and can't remember all the slash commands and shortcut keys, so this is a simple quick reference for just that.

Read the rest of this post »

A quick reference guide for Ruby on Rails, containing the default directory structure, predefined variables, methods, reserved words and regular expression syntax.

Read the rest of this post »

A quick reference guide for ASP / VBScript, containing functions, collections, regular expression syntax and other useful bits of information.

Read the rest of this post »

A list of country level domain names, ordered by country or domain name.

Read the rest of this post »

I'm forever looking up character codes, so this cheat sheet was a no-brainer. This contains a list of the assigned character codes in HTML, with an example of how they are displayed, and description.

Read the rest of this post »

A quick reference guide for JavaScript, listing methods and functions, and including a guide to regular expressions and the XMLHttpRequest object.

Read the rest of this post »

A quick reference guide for MySQL, including functions (both in MySQL and PHP), data types, and sample queries. Available in PDF and PNG formats.

Read the rest of this post »

A quick reference guide for mod_rewrite, including server variables, flags and regular expression syntax. Also includes examples of commonly-used rules.

Read the rest of this post »

A quick reference guide for CSS, listing selector syntax, properties, units and other useful bits of information.

Read the rest of this post »

I'm fed up with having to visit php.net to look things up. This A4 cheat sheet is designed to sit by your desk and make your life easier.

Read the rest of this post »

Mozilla and Google's prefetching functions are a nice addition to browser technology in many ways. Unsurprisingly, they are not very well thought through. The main two problems with the prefetching idea are that it messes with log files and it means every link on a page could potentially be followed despite the consequences (dangerous in a site administration context).

It appears from the FAQ that Google only intends their accelerator to prefetch specific pages, that have been specified with the <link> tag. However, many people are claiming that normal links have been prefetched.

To prevent prefetching of a page is simple: add the following PHP to the page you do not want prefetched:

if ((isset($_SERVER['HTTP_X_MOZ'])) && ($_SERVER['HTTP_X_MOZ'] == 'prefetch')) {
    // This is a prefetch request. Block it.
    header('HTTP/1.0 403 Forbidden');
    echo '403: Forbidden<br><br>Prefetching not allowed here.';
    die();
}

This will serve a "forbidden" header to the prefetcher. Normal browsing should be unaffected.

A tool to give an indication of how easy text is to read, using the Flesch-Kincaid, Gunning-Fog, Coleman-Liau, SMOG and Automated Readability scoring systems.

Read the rest of this post »

Functions to count the number of syllables in a word or sentence, and work out the readability of text.

Read the rest of this post »

Using CSS for layouts can be a problem when using backgrounds for two columns that are not of equal length. This article expands on the solution to this problem from AListApart.

Read the rest of this post »

All valid HTTP 1.1 Status Codes simply explained.

Read the rest of this post »

Date formatting in VBScript is not quite as powerful as PHP. This function gives you plenty more ways to format dates and times in VBScript with the minimum of effort.

Read the rest of this post »

A populated select list (input box) with the states of the USA as options.

Read the rest of this post »

Regular expression reference and examples for VBScript.

Read the rest of this post »

A free, printer-friendly RGB Hex colour chart for web designers.

Read the rest of this post »