Skip to content

Instantly share code, notes, and snippets.

View HerringtonDarkholme's full-sized avatar

Herrington Darkholme HerringtonDarkholme

View GitHub Profile
// {{{ 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).
" ==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;
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
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [03/Apr/2015 17:57:31] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [03/Apr/2015 17:57:32] "GET /style.css HTTP/1.1" 200 -
127.0.0.1 - - [03/Apr/2015 17:57:32] "GET /multiply.js HTTP/1.1" 200 -
127.0.0.1 - - [03/Apr/2015 17:57:32] "GET /worker.js HTTP/1.1" 200 -
127.0.0.1 - - [03/Apr/2015 17:57:38] "GET /index2.html HTTP/1.1" 200 -
127.0.0.1 - - [03/Apr/2015 17:57:38] "GET /square.js HTTP/1.1" 200 -
127.0.0.1 - - [03/Apr/2015 17:58:01] "GET /style.css HTTP/1.1" 200 -
127.0.0.1 - - [03/Apr/2015 18:00:23] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [03/Apr/2015 18:00:23] "GET /style.css HTTP/1.1" 200 -
@HerringtonDarkholme
HerringtonDarkholme / dependency.sbt
Created February 18, 2015 16:26
creating a task which depends on another task
barTask := { println("tests ran!") }
barTask <<= barTask.dependsOn(test in Test)
lazy val project = Project(id = "Foo", base = file("."),
settings = Seq(afterTestTask1, afterTestTask2))
val afterTestTask1 = barTask := { println("tests ran!") }
val afterTestTask2 = barTask <<= barTask.dependsOn(test in Test)
@HerringtonDarkholme
HerringtonDarkholme / comp1.jade
Created January 21, 2015 04:46
Jade: block statement in included components
block append test
h1 from comp1
@HerringtonDarkholme
HerringtonDarkholme / left.scala
Created December 10, 2014 15:03
foldLeft and foldRight
def retry(noTimes: Int)(block: ⇒Future[T]): Future[T] = {
val ns: Iterator[Int] = (1 to noTimes).iterator
val attempts: Iterator[Future[T]] = ns.map(_⇒ ()⇒block)
val failed = Future.failed(new Exception)
attempts.foldLeft(failed)
((a,block) ⇒ a recoverWith { block() })
}
retry(3) { block }
= unfolds to
@HerringtonDarkholme
HerringtonDarkholme / html.scala
Created November 18, 2014 00:07
Type Level Template
trait Tag
class Concat[A <: Tag, B <: Tag](a: A, b: B) extends Tag
trait NestTag[A <: Tag] extends Tag {
val child: A
}
trait Inline extends Tag
trait Block extends Tag
case class div[T <: Tag](t :T = null) extends NestTag[T] with Block {
val child = t
}
@HerringtonDarkholme
HerringtonDarkholme / typescript.vim
Created November 17, 2014 17:16
typescript.vim
if exists("g:TSSloaded")
finish
endif
if !has("python")
echoerr "typescript_tss.vim needs python interface"
finish
else
python <<EOF
import vim
set noautofocus
let hintcharacters = "asdfghjkl;"