Skip to content

Instantly share code, notes, and snippets.

@leylaso
leylaso / showCkutStream.js
Created May 12, 2011 13:06
Javascript function to show an element only during a specific time, depends on jQuery
// Initialize some variables - we will use GMT times
var checkDate = new Date();
var offTheHourStarts = 21;
var offTheHourEnds = 22;
// Adjust for Daylight savings
if ((checkDate.getMonth() < 2 && checkDate.getMonth() > 10) || (checkDate.getMonth() == 2 && checkDate.getDate()-checkDate.getDay() > 7 ) || (checkDate.getMonth() == 10 && checkDate.getDate()-checkDate.getDay() > 1)) {
offTheHourStarts--;
offTheHourEnds--;
}
@leylaso
leylaso / koumbit-ledger-smb.user.js
Created November 4, 2011 20:36
Billing workflow for LedgerSMB
// ==UserScript==
// @name Koumbit LedgerSMB billing workflow
// @match https://ledger.koumbit.net/*
// ==/UserScript==
/**
* @file
* Email templates and interface tweaks for ledger SMB emails
*
* Licensed under GPLv2.
@leylaso
leylaso / pad.js
Created March 28, 2012 04:18
custom pad.js file for etherpad-lite allows setting author names as line numbers
/**
* @file
* This file is an example of ways to modify etherpad-lite behaviour from the
* static/custom/pad.js file generated by etherpad-lite on first run.
*/
var edBod = [];
var lastLine = 0;
/**