Skip to content

Instantly share code, notes, and snippets.

View HerringtonDarkholme's full-sized avatar

Herrington Darkholme HerringtonDarkholme

View GitHub Profile
This file has been truncated, but you can view the full file.
2015-06-23 09:38:11,419 [DEBUG @ msgpack_stream.py:send:36] 5435 - sent [0, 1, b'vim_get_api_info', ()]
2015-06-23 09:38:11,420 [DEBUG @ base.py:send:113] 5435 - Sending 'b'\x94\x00\x01\xc4\x10vim_get_api_info\x90''
2015-06-23 09:38:11,420 [DEBUG @ base.py:run:138] 5435 - Entering event loop
2015-06-23 09:38:11,420 [DEBUG @ msgpack_stream.py:_on_data:57] 5435 - waiting for message...
2015-06-23 09:38:11,420 [DEBUG @ msgpack_stream.py:_on_data:59] 5435 - received message: [0, 1, b'poll', []]
2015-06-23 09:38:11,420 [DEBUG @ async_session.py:_on_request:77] 5435 - received request: b'poll', []
2015-06-23 09:38:11,420 [DEBUG @ msgpack_stream.py:_on_data:57] 5435 - waiting for message...
2015-06-23 09:38:11,420 [DEBUG @ msgpack_stream.py:_on_data:62] 5435 - unpacker needs more data...
2015-06-23 09:38:11,420 [DEBUG @ msgpack_stream.py:_on_data:57] 5435 - waiting for message...
2015-06-23 09:38:11,421 [DEBUG @ msgpack_stream.py:_on_data:59] 5435 - received message: [1, 1, None, [1, {b'types': {b'Window': {b'id': 1
" ==VimperatorColorSchema==
" name: Solarized Light
" ==/VimperatorColorSchema==
"
hi Bell border: none; background-color: #586E75;
hi Boolean color: #DC322F;
hi CmdLine background: #EEE8D5; color: #586E75; transition: all 0.25s;
hi CmdLine>* font-family: monospace;
hi CmdOutput white-space: pre;
// {{{ Information
let INFO = xml`
<plugin name="buftabs" version="1.0"
href=""
summary="Buftabs: show the tabbar in the statusline"
xmlns="http://vimperator.org/namespaces/liberator">
<author email="[email protected]">s2marine</author>
<license href="">GPLv3</license>
<p>
This is a fork from Lucas de Vries's buftabs (https://github.com/GGLucas/vimperator-buftabs).
/// <reference path='./es6-collections.d.ts' />
declare var require: any
require('es6-collections')
class Caller<T> {
private callers: T[] = []
constructor(init?: T) {
if (init !== undefined) this.callers.push(init)
}
withValue(t: T): Function {
@HerringtonDarkholme
HerringtonDarkholme / inject.ts
Last active September 20, 2015 16:42
TypeScript Decorator Collection
function inject(...injectionKeys : Array<string>) {
return function decoratorFactory(target : Object|Function, decoratedPropertyName? : string) : void {
let targetType : Function;
let injectionPoint : InjectionPoint;
// Decorator applied to Class (for Constructor injection).
if (typeof target === 'function' && decoratedPropertyName === undefined) {
targetType = target;
injectionPoint = new ConstructorInjectionPoint(injectionKeys);
}
@HerringtonDarkholme
HerringtonDarkholme / typescript.ctags
Created October 10, 2015 08:37
An updated ctags file for typescript
--langdef=typescript
--langmap=typescript:.ts
--regex-typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,classes/
--regex-typescript=/^[ \t]*(export)?[ \t]*abstract class[ \t]+([a-zA-Z0-9_]+)/\2/a,abstract classes/
--regex-typescript=/^[ \t]*(export)?[ \t]*module[ \t]+([a-zA-Z0-9_]+)/\2/n,modules/
--regex-typescript=/^[ \t]*(export)?[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\2/t,types/
--regex-typescript=/^[ \t]*(export)?[ \t]*namespace[ \t]+([a-zA-Z0-9_]+)/\2/n,modules/
--regex-typescript=/^[ \t]*(export)?[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\2/f,functions/
--regex-typescript=/^[ \t]*export[ \t]+var[ \t]+([a-zA-Z0-9_]+)/\1/v,variables/
--regex-typescript=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)[ \t]*=[ \t]*function[ \t]*\(\)/\1/l,varlambdas/
@HerringtonDarkholme
HerringtonDarkholme / typescript_neomake.vim
Last active February 3, 2016 09:57
Read tsconfig dynamically
let s:enabled_options = [
\ 'target', 'emitDecoratorMetadata', 'experimentalDecorators', 'module',
\ 'noImplicitAny', 'rootDir', 'noEmit', 'allowSyntheticDefaultImports',
\ 'noImplicitReturn', 'allowUnreachableCode', 'allowUnusedLabels'
]
function! neomake#makers#ft#typescript#tsc()
let l:tsconfig = findfile('tsconfig.json', '.;')
if len(l:tsconfig)
let true = 1
<!--
postMessage(navigator.appName);
/*
-->
<!doctype html>
<title>navigator.appName</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
@HerringtonDarkholme
HerringtonDarkholme / index.ts
Last active March 22, 2019 17:17
typesafe DI in TypeScript
/// <reference path='./typings/tsd.d.ts' />
import 'reflect-metadata'
type _ = {}
type ClassN<N, T> = { new (...a: N[]): T }
type FN8<A, B, C, D, E, F, G, H, R> = (a?: A, b?: B, c?: C, d?: D, e?: E, f?: F, g?: G, h?: H) => R
type CLS8<A, B, C, D, E, F, G, H, R> = { new (a?: A, b?: B, c?: C, d?: D, e?: E, f?: F, g?: G, h?: H): R}
@HerringtonDarkholme
HerringtonDarkholme / test.js
Created May 24, 2016 16:28
babel5 breaks when promise is included
// webpack.config.js
module.exports = {
entry: {
'test': './test',
},
output: {
filename: 'output.js',
},
module: {
loaders: [