Skip to content

Instantly share code, notes, and snippets.

View Ultrabenosaurus's full-sized avatar

Ultrabenosaurus

  • UK
  • 10:10 (UTC +01:00)
View GitHub Profile
@ronnyhaase
ronnyhaase / formatTime.js
Last active October 10, 2015 15:47
Format time by hour of the day and minute of the hour
/**
* Returns formatted time depending on the clock (e.g. 00:00 / 12:00am)
* @param {number} hour - The hour of the day (0-24)
* @param {number} minute - The minute of the the hour (0-59)
* @param {string} clock - Either "12h" or "24h"
* @returns The time as a well formated string or false in case of an error
*/
function formatTime(hour, minute, clock) {
( minute < 10 )
? minute = '0' + minute
@xeoncross
xeoncross / aloha-config.js
Created September 12, 2012 15:24 — forked from evo42/aloha-config.js
Aloha Editor -- send content via ajax to a backend php script to save the data edited with Aloha Editor
( function ( window, undefined ) {
var Aloha = window.Aloha || ( window.Aloha = {} );
Aloha.settings = {
logLevels: { 'error': true, 'warn': true, 'info': true, 'debug': false, 'deprecated': true },
errorhandling: false,
ribbon: false,
locale: 'en',
floatingmenu: {
width: 630,
@mgronhol
mgronhol / notebook.py
Created September 10, 2012 11:25
Simple notebook with REST api using Flask
#!/usr/bin/env pytohn
from flask import Flask, request, jsonify, abort
import time
app = Flask( __name__ )
notes = {}
next_note_id = 0
@24flash
24flash / index.html
Created September 10, 2012 11:19
Text masked particles which spring up on mouse proximity.
<canvas id=c></canvas>
<span>Try disturbing the particles with mouse</span>