Skip to content

Instantly share code, notes, and snippets.

View zachdunn's full-sized avatar

Zach Dunn zachdunn

View GitHub Profile
@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.
@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 / 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 / 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 / arrow.svg
Last active December 18, 2015 03:29
Time series using range input and smart markers. Built off a AngularJS directive structure.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
(function () {
'use strict';
/**
* Broadcast changes to the page's visibility (via page visibility API)
* Source: https://gist.github.com/sym3tri/9357439
*/
function VisibilityService ($document, $rootScope, _) {
var document = $document[0],
features,
detectedFeature;
@zachdunn
zachdunn / handy-excel.vba
Created March 11, 2016 15:22
Handy Excel Formulas
// Convert ISO8601 timestamp to usable date by stripping timezone offset
=DATEVALUE(MID(A1, 1, 10)) + TIMEVALUE(MID(A1, 12, 8))
// Obscure email address
// Example: alice@robinpowered.com > al***@robinpowered.com
=SUBSTITUTE(A2, MID(A2, 3, FIND("@",A2) - 3), REPT("*", LEN(MID(A2, 3, FIND("@", A2) - 3 ))))
// Modified: https://github.com/EmilTholin/node-exchange-autodiscover/blob/master/lib/index.js
'use strict';
var Promise = require('bluebird');
var rp = require('request-promise');
var dnsResolve = Promise.promisify(require('dns').resolve);
var parseString = Promise.promisify(require('xml2js').parseString);
const EWS_URL_SETTING = 'ExternalEwsUrl';
/**

Keybase proof

I hereby claim:

  • I am zachdunn on github.
  • I am zachdunn (https://keybase.io/zachdunn) on keybase.
  • I have a public key whose fingerprint is 5EC4 20A3 79C7 8F96 6C71 519D AC0A D429 B93C FB72

To claim this, I am signing this object: