Skip to content

Instantly share code, notes, and snippets.

View christianhanvey's full-sized avatar

Christian Hanvey christianhanvey

View GitHub Profile

Website Contract

Revised date: 13/03/2013

Between us: Crunch Design

and you: [customer name]

Summary:

@christianhanvey
christianhanvey / snippet.md
Created July 2, 2012 02:02 — forked from harthur/snippet.md
console.log() key binding for Sublime Text

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

[
    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
      }, "context":
 [
@christianhanvey
christianhanvey / snippet.php
Created June 4, 2012 00:08 — forked from Mark-H/snippet.php
MODX Snippet to take a database backup and to email that.
<?php
$mailto = (isset($mailto)) ? $mailto : '@@ DEFAULT EMAIL HERE @@';
$warningMail = '@@ EMAIL TO SEND WARNING TO IN CASE OF A SMALL BACKUP FILE @@';
include MODX_CORE_PATH.'/config/'.MODX_CONFIG_KEY.'.inc.php';
$host = $database_server; // database host
$dbuser = $database_user; // database user name
$dbpswd = $database_password; // database password
$mysqldb = $dbase; // name of database
@christianhanvey
christianhanvey / imgtag.html
Created January 24, 2012 09:48 — forked from anselmh/imgtag.html
The New Img Tag (evolved)
<img src="large-default-file.jpg" alt="default alt text describing image" title="default title text">
<source src="smaller.jpg" media="screen and (max-device-width:600px)" alt="this is alternative text for smaller file" title="this is title for smaller file">
<source src="tiny.jpg" media="screen and (max-device-width:320px)" alt="this is alternative text for tiny file" title="this is title for tiny file">
<source src="monochrome.jpg" media="monochrome" alt="this is alternative text for monochrome file" title="this is title for monochrome file">
</img>