Skip to content

Instantly share code, notes, and snippets.

View davetayls's full-sized avatar

Dave Taylor davetayls

View GitHub Profile
@davetayls
davetayls / IMStatus.scpt
Created August 12, 2011 12:44 — forked from lantrix/IMStatus.scpt
Applescript to tell Adium, Skype and iChat to change their status simultaneously
-- IMStatus
-- version 2.0, Lantrix (http://techdebug.com)
-- idea conceived from script by Jason Kenison "theWebGuy" Blog at:
-- http://www.jasonkenison.com/blog.html?id=22
(*
Copyright (c) 2008, TechDebug.com
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@davetayls
davetayls / preload.js
Created August 19, 2011 09:17
Simple image preloader
/**
Simple image preloading
Dave Taylor http://the-taylors.org
Usage:
var images = ['img.png', 'img2.png'];
window.imagePreload(images, function(errorUrls){
this == images;
});
<!-- VideoJS partial for AppiaSkeletona -->
<div class="video-js-box">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video id="@Model.id"
class="video-js"
width="@Model.width"
height="@Model.height"
controls="controls"
preload="auto"
poster="@Model.image">
@davetayls
davetayls / jquery.reverse.js
Created September 6, 2011 10:17
jQuery reverse plugin
jQuery.fn.reverse = [].reverse;
@davetayls
davetayls / twitterFromUrl.js
Created September 30, 2011 11:13
Twitter from url function
/*jslint browser: true, vars: true, white: true, forin: true, sloppy: true */
/*global console */
var twitterRegEx = /twitter\.com\/#?!?([A-Za-z0-9_]+)[\/]?([A-Za-z0-9_]*)/;
var getTwitterDetails = function(twitterUrl) {
var matches = twitterRegEx.exec(twitterUrl);
if (matches){
return {
url: twitterUrl,
user: matches[1],
list: matches[2]
@davetayls
davetayls / cookie.js
Created October 3, 2011 19:48
Cookie module for requirejs
@davetayls
davetayls / tracking.js
Created October 12, 2011 15:02
Google tracking for static files
/*
* Google tracking for static files
*/
/*jslint browser: true, vars: true, white: true, forin: true, nomen: true */
/*global window, jQuery, _gaq */
(function ($) {
"use strict";
var init_tracking = function () {
@davetayls
davetayls / debug.js
Created October 31, 2011 11:13
Basic debug module
/**
* Basic debug AMD module
* usage: debug.log('inside coolFunc',this,arguments);
*/
/*jslint browser: true, vars: true, white: true, forin: true */
/*global define, require */
(function(){
'use strict';
var debug = {
@davetayls
davetayls / jquery.serializeObject.js
Created November 17, 2011 11:40
jQuery.serializeObject
/**
jQuery.serializeObject
http://stackoverflow.com/questions/1184624/serialize-form-to-json-with-jquery/1186309#1186309
*/
/*jslint browser: true, vars: true, white: true, forin: true */
/*global define,require */
(function($){
'use strict';
$.fn.serializeObject = function()
@davetayls
davetayls / once.js
Created October 5, 2012 16:30
Once function
/**
* Once script to make sure a function is only run once!
*/
(function(global){
 
    function once(func) {
        var ran = false, memo;
        return function() {
            if (ran) return memo;
            ran = true;