Skip Navigation

Hi. I'm Dave, the internet addict behind FeedbackFair, Cheatography and Envoy.

Tagged with "reference"

You can subscribe to this tag by rss or view all tags.

Cheat Sheets

Regular Expressions (V2)

Regular Expressions Cheat Sheet (V2)

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.

mod_rewrite (V2)

mod_rewrite Cheat Sheet (V2)

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.

PHP (V2)

PHP Cheat Sheet (V2)

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.

CSS (V2)

CSS Cheat Sheet (V2)

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.

SQL Server

SQL Server Cheat Sheet

Microsoft's SQL Server is a powerful database server that integrates well with other Microsoft technologies like ASP and .NET, and includes some of the best database management tools available. This A4 reference lists the various functions available in SQL Server, and demonstrates the creation of stored procedures, triggers and functions.

HTML

HTML Cheat Sheet

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.

Regular Expressions (V1)

Regular Expressions Cheat Sheet (V1)

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.

Microformats

Microformats Cheat Sheet

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.

World of Warcraft

World of Warcraft Cheat Sheet

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.

Ruby on Rails

Ruby on Rails Cheat Sheet

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

ASP / VBScript

ASP / VBScript Cheat Sheet

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

HTML Character Entities

HTML Character Entities Cheat Sheet

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.

JavaScript

JavaScript Cheat Sheet

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

MySQL

MySQL Cheat Sheet

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

mod_rewrite (V1)

mod_rewrite Cheat Sheet (V1)

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

CSS (V1)

CSS Cheat Sheet (V1)

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

PHP (V1)

PHP Cheat Sheet (V1)

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.

RGB Hex Colour Chart

RGB Hex Colour Chart

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

Articles

Blog and Lab

Icon Reference Chart

Icon Reference Chart

An excellent piece of reference material - almost a cheat sheet, in fact. All the sizes, formats and related information you need to be able to create favicons, iphone icons, android icons and more.

Icon Reference Chart (posted from ZooTool).

13 July 2010   |   2 comments   |   icons, reference, cheat sheet

PHP Querystring Functions

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);
}

05 December 2006   |   49 comments   |   links, code, development, url, querystring, reference, php, functions, programming, tips, variable

Internet Country Codes

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

Click here to read this post »

07 October 2005   |   21 comments   |   cheatsheet, webdev, reference, domain, domains, tld, codes, dns, internet, resources, country

Block Prefetching

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.

20 April 2005   |   3 comments   |   webdev, block, mozilla, prefetching, google, reference, php

Text Readability Scores

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.

Click here to read this post »

07 July 2004   |   141 comments   |   design, language, literature, readability, reference, resources, tool, tools, usability, webdesign, writing

Flesch-Kincaid Reading Level

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

Click here to read this post »

07 July 2004   |   14 comments   |   reading, webdev, text, programming, reference, php, writing, readability, language, accessibility, algorithm

Faux Columns for Liquid Layouts

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.

Click here to read this post »

22 June 2004   |   30 comments   |   tutorial, html, fluid, layout, reference, liquid, design, web, faux, webdesign, css, hacks

VBScript Date Format Functions

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.

Click here to read this post »

15 March 2004   |   68 comments   |   scripts, development, reference, programming, vbscript, javascript, time, unix, date, asp, vb, webdesign

US States Select Box

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

Click here to read this post »

14 February 2004   |   26 comments   |   select, webdev, development, html, reference, resource, design, forms, webdesign, states, resources