Skip to content

Instantly share code, notes, and snippets.

View zachdunn's full-sized avatar

Zach Dunn zachdunn

View GitHub Profile
@zachdunn
zachdunn / drawing.js
Created May 24, 2013 03:11
Canvas mouse drawing for a canvas #sketch plus button #clear.
(function(window){
var Pen = function(context){
var drawing;
this.reset = function(){
context.beginPath();
context.lineCap = 'round';
context.lineWidth = 5;
context.strokeStyle = "#333333";
};
@zachdunn
zachdunn / connectivity.coffee
Created April 28, 2013 23:16
AngularJS Directive for easily attaching online & offline events
'use strict';
angular.module('angularApp')
.directive('connectivity', ($window, $parse) ->
return ($scope, element, $attrs) ->
# Parse attribute value into JSON
events = $scope.$eval($attrs.connectivity)
# Loop through events in JSON object
@zachdunn
zachdunn / jquery.verticalticker.js
Created February 12, 2011 03:28
jQuery plugin for an automated vertical ticker
/*
Vertical Ticker Plugin
Copyright (c) 2011 Zach Dunn / www.onemightyroar.com
Released under MIT License
--------------------------
Structure based on Doug Neiner's jQuery plugin blueprint: http://starter.pixelgraphics.us/
*/
(function( $ ){
if(!$.omr){
@zachdunn
zachdunn / Link_Builder.php
Created January 12, 2011 05:44
90% complete class to compile video site links based on ID's provided via text file.