Skip to content

Instantly share code, notes, and snippets.

View darren-rose's full-sized avatar

Darren Rose darren-rose

View GitHub Profile

Keybase proof

I hereby claim:

  • I am darren-rose on github.
  • I am darrenrose (https://keybase.io/darrenrose) on keybase.
  • I have a public key ASB2boJvrANRz1JkqzHcjgHmiFJHSRljpJSqKP3NgwI-ugo

To claim this, I am signing this object:

@darren-rose
darren-rose / gist:7466240ffa6e2912e616
Created October 16, 2014 08:06
javascript function creating an array of times every N minute intervals
var everyNminutes = function (n){
var result = [];
for(var hours = 0; hours < 24; hours++){
for(var minutes = 0; minutes < 60; minutes = minutes+n){
var h = '';
var m = '';
if(hours<10){
h = '0' + hours;
}else{
h = hours;
@darren-rose
darren-rose / gist:b150a17879adba89993c
Created July 31, 2014 21:04
jQuery plugin to add an click event listener that adds a class and removes the class from all other elements
<script>
(function ( $ ) {
$.onClickAddClassMutuallyExclusive = function( options ) {
var settings = $.extend({
selector : "a",
excludeSelector: ".excluded",
theClass : "spinner"
}, options );
$(settings.selector).not(settings.excludeSelector).click(function(){
$(settings.selector).removeClass(settings.theClass);
@darren-rose
darren-rose / gist:a3efa4d7df93f190c6b2
Created June 5, 2014 10:45
Bookmarklet to show/hide timestamp in error section
javascript:(function()%7B%24('%23debug_timestamp').toggleClass('hidden')%7D)()