This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (globals, exports, $, doc) { | |
/* | |
** Takes one @options argument with properties: | |
** - 'list' -- a hashtable or array of possible suggestions, | |
** - 'propName' -- a property with suggestions in the hashtable, | |
** - 'input' -- an input element or input selector, | |
** - 'callback' -- what to do on option select, | |
** - 'focusFirst' -- whether to set focus on the first option, | |
** - 'meaningfulLength' -- how many characters can provide meaning. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set encoding=utf-8 fileencodings=utf-8 | |
syntax on | |
"syntax sync fromstart | |
let no_buffers_menu=1 | |
set backspace=indent,eol,start | |
set history=50 | |
set hlsearch | |
set incsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1='\t \w {\j}\n> ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (docInstance) { | |
var Monitor = function () { | |
return this.init.apply(this, arguments); | |
}; | |
Monitor.prototype = { | |
Resources: { | |
img: true, | |
script: true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.bsearch = function (x) { | |
var min = 0, max = this.length; | |
while (min <= max) { | |
var mid = Math.floor((min + max) / 2), | |
val = this[mid]; | |
if (val === x) { | |
return mid; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function exec (cmd, ...) | |
local argstr = (table.maxn(arg) == 0 and '') or | |
string.format(' %q', table.concat(arg)) | |
return os.execute(cmd .. argstr) | |
end | |
local function read (cmd) | |
local prog = io.popen(cmd) | |
local pout = prog:read('*a') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function until(cond, callback, delay) { | |
(function fn() { | |
cond() ? callback() : setTimeout(fn, delay) | |
})() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Observer = (function () { | |
'use strict'; | |
return { | |
on: function (event, fn) { | |
if (!this.handlers) { this.handlers = {}; } | |
var handlers = this.handlers[event]; | |
if (!handlers) { | |
handlers = this.handlers[event] = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getClassList = (function () { | |
'use strict'; | |
var ClassList = {}, s = ' '; | |
ClassList.add = function (cl) { | |
var className = this.element.className, | |
list = className.split(s); | |
list.push(cl); | |
this.element.className = list.join(s); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syn match javaScrParenError /,\(\_s*[\]})]\)\@=/ |
OlderNewer