Skip to content

Instantly share code, notes, and snippets.

/*
dependencies
isArray
defineProperties
TODO
defineProperties > defineProperty
http://stackoverflow.com/a/17935125/248058
isString
clear
typeof this.className === 'object' ? this.setAttribute('class', '') : this.className = '';
@Mouvedia
Mouvedia / trim
Last active September 13, 2015 22:40
//http://perfectionkills.com/whitespace-deviations/
//https://web.archive.org/web/20150905201345/http://www.merlyn.demon.co.uk/js-valid.htm#RsT
''.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '')})
/*
* Property prefix hacks
*/
/* IE6 only - any combination of these characters */
_ - £ ¬ ¦
/* IE6/7 only - any combination of these characters */
[
[:app :-lt.objs.intro/show-intro]
[:app :lt.objs.style/set-skin "dark"]
[:app :lt.objs.sidebar.workspace/workspace.open-on-start]
[:app :lt.objs.app/run-post-init [:window.maximize]]
[:app :lt.plugins.gitlight/config {:git-binary "git" :max-history 64}]
[:tabset.tab :lt.plugins.user/push-active-tab]
[:tabs-extended :lt.plugins.user/last-tab]
[
[:app "cmd-alt-right" :tabset.next]
[:app "cmd-alt-left" :tabset.prev]
[:app "ctrl-shift-right" :tabs.next]
[:app "ctrl-shift-left" :tabs.prev]
[:app "alt-w" :workspace.show]
[:app "alt-f" :searcher.show]
[:app "alt-space" :navigate-workspace-transient]
[:app "pmeta-b" :add-browser-tab]
@Mouvedia
Mouvedia / String.js
Last active January 30, 2016 21:06
String
//https://github.com/Mouvedia/isString
String.parseAsClass = function(className, HTML5) {
if (!String.isString(className))
throw new TypeError('The passed argument must be a string.');
if (className === '')
throw new SyntaxError('The string provided must not be empty.');
if (!HTML5) {
className = className.replace(/^[ \t\n\f\r\u200b]+|[ \t\n\f\r\u200b]+$/g, '');
https://github.com/Mouvedia/cb-fetch
// xhr.onabort
// xhr.onerror
// xhr.ontimeout
// XMLHttpRequest({mozAnon: true});
// if (typeof obj.then === "function")
mode
"cors"
@Mouvedia
Mouvedia / css
Last active August 3, 2022 17:31
// ZuZizqDF4q8
:root {
--ON: initial;
--OFF: ;
}
-khtml-border-radius: px;
-moz-border-radius: px;
-webkit-border-radius: px;
border-radius: px;
try {
angular.bootstrap(document.body, ['moduleName']);
} catch(e) {
angular.element(document.body).injector().invoke(function($compile) {
var scope = angular.element(element).scope();
$compile(element)(scope);
scope.$apply();
});
}
@Mouvedia
Mouvedia / rules
Last active June 29, 2019 11:53
karabiner
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 400,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{