Skip to content

Instantly share code, notes, and snippets.

View GarthDB's full-sized avatar
🕸️
never updating status

Garth Braithwaite GarthDB

🕸️
never updating status
View GitHub Profile
for (i=0; i < (totalDigits-n.length); i++)
{
pd += '0';
}
@GarthDB
GarthDB / clone.sh
Created February 21, 2012 04:27
Use latest stable version of NodeJS on Heroku
$ git clone https://github.com/[your github username]/heroku-buildpack-nodejs.git
@GarthDB
GarthDB / imgtypekit_colophon.svg
Created September 2, 2012 07:03
HiDPI Typekit Colophon
function onload () {
$('.typekit-badge').attr({src: '/img/typekit_colophon.svg'});
console.log($('.typekit-badge').attr('src'));
}
try{Typekit.load({active: onload});}catch(e){}
@GarthDB
GarthDB / animal.coffee
Created October 23, 2012 20:47
Coffee Test
class Animal
constructor: (@name) ->
move: (meters) ->
alert @name + " moved #{meters}m."
class Snake extends Animal
move: ->
alert "Slithering..."
super 5
@GarthDB
GarthDB / grunt.js
Created November 14, 2012 00:36
Fixme Grunt!
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
watch: {
scripts: {
files: '<config:coffee.compile.files>',
tasks: 'coffee'
}
},
@GarthDB
GarthDB / gist:6600779
Last active December 23, 2015 07:29
A work in progress - I want to make a rake task that will open a page in a new chrome window, then resize it to a specific size and take a screenshot. Should be awesome if it works.
tell application "/Applications/Google Chrome.app"
make new window
activate
end tell
/* topdoc
name: Button
description: A simple button
modifiers:
:active: Active state
:disabled: Disabled state
markup:
<a class="topcoat-button">Button</a>
<a class="topcoat-button is-active">Button</a>
<a class="topcoat-button is-disabled">Button</a>
@GarthDB
GarthDB / _config.yml
Last active December 23, 2015 09:19
Trying to get multiple author's output with my jekyll blog, but it doesn't seem to be working.
authors:
garthdb:
display_name: Garth Braithwaite
gravatar: b5cf6e112eeee572d722743dea924487
email: [email protected]
web: http://www.garthdb.com/
twitter: garthdb
github: garthdb
bio: 'Engineer at Adobe working on <a href="http://www.topcoat.io">Topcoat</a>.'
test:
body {
font 14px/1.5 Helvetica, arial, sans-serif;
#logo {
border-radius: 5px
}
}
#content
content 'colons are for newbs'
totes: true
@GarthDB
GarthDB / gist:6736564
Last active December 24, 2015 03:19 — forked from mayoff/gist:1138816
tell application "Google Chrome"
activate
set theUrl to "http://tycho.usno.navy.mil/cgi-bin/timer.pl"
if (count every window) = 0 then
make new window
end if
set found to false
set theTabIndex to -1