Minimal time logs tracker. Runs on Node.js. Features:
-
Friction-free time logging. Just type
t shopping in the grocery
to start a task. -
Everything in the terminal. It's a Node.js command-line app that runs anywhere Node can. (even Windows!)
type Listener<T extends Array<unknown>> = (...args: T) => void; | |
export class EventEmitter< | |
E extends Record<string, Array<unknown>> = Record<never, []> | |
> { | |
private listenerMap: { [K in keyof E]?: Set<Listener<E[K]>> } = {}; | |
on<K extends keyof E>(key: K, listener: Listener<E[K]>) { | |
return this.addListener(key, listener); | |
} |
var ProportionalImage = React.createClass({ | |
getInitialState() { | |
return { | |
style: {} | |
}; | |
}, | |
propTypes: { | |
originalWidth: React.PropTypes.number.isRequired, |
Minimal time logs tracker. Runs on Node.js. Features:
Friction-free time logging. Just type t shopping in the grocery
to
start a task.
Everything in the terminal. It's a Node.js command-line app that runs anywhere Node can. (even Windows!)
// Simple JavaScript Templating | |
// John Resig - http://ejohn.org/ - MIT Licensed | |
(function(){ | |
var cache = {}; | |
this.tmpl = function tmpl(str, data){ | |
// Figure out if we're getting a template, or if we need to | |
// load the template - and be sure to cache the result. | |
var fn = !/\W/.test(str) ? | |
cache[str] = cache[str] || |
/** | |
* allows you to wrap or insert an html tag over a selection/range using rangy | |
* @param iframe the CKEditor iframe html element | |
* @param tagName string representation of the tag, such as 'a' for anchor | |
* @param withNodeFunc function to allow outside modification of the element before injecting/wrapping | |
*/ | |
function wrapOrInsert(iframe, tagName, withNodeFunc) { | |
var iframedoc = iframe.contentDocument || iframe.contentWindow.document, | |
tag = iframedoc.createElement(tagName), | |
selection = rangy.getIframeSelection(iframe), |