Skip to content

Instantly share code, notes, and snippets.

View NickTomlin's full-sized avatar
📚
Reading a book

Nick Tomlin NickTomlin

📚
Reading a book
View GitHub Profile
@NickTomlin
NickTomlin / gist:2229934
Created March 28, 2012 19:50
Roots Google Analytics Asynch
<?php
// change this
echo "\n\t<script>\n";
echo "\t\tvar _gaq=[['_setAccount','$roots_google_analytics_id'],['_trackPageview'],['_trackPageLoadTime']];\n";
echo "\t\t(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\n";
echo "\t\tg.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';\n";
echo "\t\ts.parentNode.insertBefore(g,s)}(document,'script'));\n";
echo "\t</script>\n";
// to this (using this snippet from: http://googlecode.blogspot.com/2009/12/google-analytics-launches-asynchronous.html )
@NickTomlin
NickTomlin / objects.md
Created April 23, 2012 18:53
#Objectified: a very brief overview of Objects in Javascript

#Objectified: a very brief overview of Objects in Javascript written for myself, by myself.
much love,
Nick


An introduction to objects

So, here's an object:

@NickTomlin
NickTomlin / mqscaling.css
Created May 8, 2012 23:03
Scaling text-size with media queries
html {
font-size:@remSize; /* 16px/100% */
}
/* general proportional styles */
p {
font-size: 2em; // 32px @ max-width /* (text needs to *pop* ;) ) */
line-height: 1.5;
margin:0 0 3em 0;
@NickTomlin
NickTomlin / dabblet.css
Created May 11, 2012 20:16 — forked from anonymous/dabblet.css
Column Layout test
/**
* Column Layout test
*/
* {
}
html {
@NickTomlin
NickTomlin / dabblet.css
Created June 7, 2012 17:54 — forked from anonymous/dabblet.css
.netboxes
/**
* .netboxes
*/
/* universal */
body {
margin: 0;
background: url('http://subtlepatterns.com/patterns/lightpaperfibers.png') repeat;
}
img {
@NickTomlin
NickTomlin / dabblet.css
Created June 13, 2012 23:45
Skeleton playground
/**
* Skeleton playground
*/
/*
* Skeleton V1.1
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
@NickTomlin
NickTomlin / Recipes.md
Created October 4, 2012 17:02
Terminal Cheatsheet
@NickTomlin
NickTomlin / programatic.php
Created October 10, 2012 21:24
Programatic node creation in Drupal 7
<?php
/* ==========================================================================
Bootstrap Drupal
========================================================================== */
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@NickTomlin
NickTomlin / typekit_init.php
Created October 18, 2012 17:02
Including Typekit in WP Head
// include typekit
function typekit_init(){?>
<script type="text/javascript" src="//use.typekit.net/TYPEKITIDHERE.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<?}
add_action('wp_head', 'typekit_init');
@NickTomlin
NickTomlin / gist:3920091
Created October 19, 2012 19:12
Photoshop CheatSheet

Photoshop CheatSheet

Because I am too lazy to google for these things, and muscle memory is the first step to true knowledge


Misc.

alt + cmd : direct select a layer

alt + cmd + c : resize canvas