Skip to content

Instantly share code, notes, and snippets.

View donovanh's full-sized avatar

Donovan Hutchinson donovanh

View GitHub Profile
@donovanh
donovanh / database.js
Created July 6, 2021 05:42
Example Movies and Actors Database
'use strict';
const actors = {
a01: {
id: 'a01',
name: 'Harvey Keitel'
},
a02: {
id: 'a02',
name: 'Tim Roth'
var randomColours = ['3c6dd1', 'd13c9e', '3cd19e'];
var currentColour = 0;
var currentDemoColour = 0;
$(function() {
$('.add-to-list button').click(function(e) {
addLI($(e.target).parent(), false);
});
$('.add-to-list li').each(function(index, item) {
bindNewLI($(item));
});
@donovanh
donovanh / test.js
Last active November 6, 2018 16:35
console.warn('Sending an error to browser')
BOOM
@donovanh
donovanh / app.js
Last active January 18, 2016 17:11
Cat -> Dog (Node.js)
/*
This is a Node application that generates paths between two words. Spec:
Write some code that will, given a word, e.g. dog, and another word, e.g. cat, will output a sequence of valid words (in a dictionary), where each pair of adjacent words are only different by 1 character. e.g. dog -> dot -> cot -> cat. If you can, also output the entire list of all such paths between two words.
Usage:
* Install Node
* Place "app.js" and "dictionary.js" files in a directory
* In terminal, navigate to the directory and run "node app"
The method (cat2DogAllPaths) accepts 3 arguments:
---
layout: post
bodyClass: shorter
title: Animating pseudo-elements
description: Pseudo-elements give you two extra HTML elements for free! Here's how to animate them on hover. Use them wisely.
categories: [animation, tips, animations, pseudo-elements]
customCSS: shiny_button.css
imageURL: /assets/images/posts/sheen/sheen.gif
home_image: /assets/images/posts/sheen/home.png
tweet_text: Shiny buttons with CSS
@donovanh
donovanh / index.md
Created April 1, 2015 20:08
Polish version of Principles article

layout: post title: Reguły animacji w sieci description: How Disney's 12 Principles of Animation can be applied to web designs categories: [animation, tips, animations, transitions, apple watch] customCSS: principles.css imageURL: /assets/images/posts/principles/principles.png home_image: /assets/images/posts/principles/principles.png tweet_text: Zastosowanie 12 Reguł Animacji Disney'a w animacji stron internetowych custom_header: posts/principles.html

alias hometime = git checkout -b hometime && git push origin hometime && git add --all & git commit --all -m "hometime push"
@donovanh
donovanh / bio and details
Created December 15, 2014 21:15
About Donovan
Donovan Hutchinson
@donovanh
Photo: http://i.imgur.com/tE22JCG.jpg
Bio: Donovan is a Dublin-based front-end developer with a passion for CSS, animation and making the web fun. He writes tutorials at Learnsome.co and blogs on other web topics at Hop.ie.
Websites: hop.ie / learnsome.co
@donovanh
donovanh / gulpfile.js
Created July 28, 2014 21:01
Gulp file for Jekyll, with Sass, Autoprefixer, and browsersync
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
@donovanh
donovanh / Jekyll Dev Mode
Created July 28, 2014 20:56
A handy way to start Jekyll so that it's quick and shows future posts
jekyll serve --watch --limit_posts 1 --future true