Skip to content

Instantly share code, notes, and snippets.

{
"name": "irc",
"active": true,
"events": [
"issues",
"push",
"pull_request"
],
"config": {
"server": "irc.mozilla.org",
@tav
tav / rust.lang
Created October 6, 2012 22:32
Rust syntax highlighter for less via source-highlight
preproc = "import","package"
include "c_comment.lang"
include "number.lang"
string delim "\"" "\"" escape "\\"
string delim "'" "'" escape "\\"
string delim "`" "`" escape "\\" multiline
impl to_str<T> for T {
fn to_str() -> str { "a" }
}
fn foo<T>(_f:fn()) -> T { fail }
fn main() {
log(error,
// 16 in a row
[do foo::<~@&*()>{;}]/_.
@rawsyntax
rawsyntax / defuns.el
Last active September 29, 2015 23:08
swap two windows
(require 'cl)
(defun swap-windows ()
"If you have 2 windows, it swaps them."
(interactive)
(cond ((not (= (count-windows) 2))
(message "You need exactly 2 windows to do this."))
(t
(let* ((w1 (first (window-list)))
(w2 (second (window-list)))
@creationix
creationix / webserver.c
Created September 11, 2011 07:47
libuv webserver updated to latest libuv
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "uv.h"
#include "http_parser.h"
static uv_stream_t server;
static http_parser_settings settings;
static uv_buf_t refbuf;