Skip to content

Instantly share code, notes, and snippets.

Sofian Benaissa sfyn

Block or report user

Report or block sfyn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sfyn
sfyn / pad.js
Created Mar 28, 2012
custom pad.js file for etherpad-lite allows setting author names as line numbers
View pad.js
/**
* @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;
/**
@sfyn
sfyn / koumbit-ledger-smb.user.js
Created Nov 4, 2011
Billing workflow for LedgerSMB
View koumbit-ledger-smb.user.js
// ==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.
@sfyn
sfyn / showCkutStream.js
Created May 12, 2011
Javascript function to show an element only during a specific time, depends on jQuery
View showCkutStream.js
// 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--;
}
You can’t perform that action at this time.