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
require 'fileutils' | |
module Jekyll | |
class DitaaBlock < Liquid::Block | |
def initialize(tag_name, markup, tokens) | |
super | |
end | |
def render(context) | |
File.open('/tmp/ditaa.txt', 'w') {|f| f.write(super)} |
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
# Author: Nick Anderson (http://www.cmdln.org) | |
# Contributions: Matthias Vogelgesang (http://bloerg.net) | |
# Description: Simple Bash Completion for ticgit | |
_ti() | |
{ | |
local cur prev opts state_opts | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
opts="assign checkout comment list new points recent show state sync tag" |
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
#include <gtk/gtk.h> | |
enum | |
{ | |
COLUMN_ARTICLE = 0, | |
COLUMN_PRICE, | |
N_COLUMNS | |
}; | |
typedef struct |
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
TEMPLATE = template.tex | |
STYLESHEET = style.css | |
MD = $(wildcard *.md) | |
TEX = $(patsubst %.md,%.tex,$(MD)) | |
HTML = $(patsubst %.md,%.html,$(MD)) | |
PDF = $(patsubst %.md,%.pdf,$(MD)) | |
.PHONY: clean pdf html | |
all: pdf html |
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
PKGS = glib-2.0 | |
SRC = $(wildcard *.c) | |
OBJ = $(patsubst %.c,%.o,$(SRC)) | |
BIN = foo | |
CFLAGS := $(CFLAGS) $(shell pkg-config --cflags $(PKGS)) | |
LDFLAGS := $(LDFLAGS) $(shell pkg-config --libs $(PKGS)) | |
.PHONY: clean | |
$(BIN): $(OBJ) |
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
require 'typogruby' | |
module Jekyll | |
class MarkdownConverter < Jekyll::Converter | |
def convert(content) | |
setup | |
return Typogruby.improve(Maruku.new(content).to_html) | |
end | |
end | |
end |
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
from concurrent.futures import Future, ThreadPoolExecutor | |
class promise(object): | |
executor = ThreadPoolExecutor(max_workers=100) | |
def __init__(self, func): | |
self.func = func |
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
SRC=$(wildcard *.tex) | |
OPTS=--pdf | |
.PHONY: clean | |
all: $(patsubst %.tex,%.pdf,$(SRC)) | |
%.pdf: %.tex | |
@rubber $(OPTS) $< |
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
# -*- coding: utf-8 -*- | |
import re | |
import difflib | |
import codecs | |
from itertools import chain | |
_diff_split_re = re.compile(r'(\s+)(?u)') |
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
def coroutine(func): | |
def start(*args, **kwargs): | |
g = func(*args, **kwargs) | |
g.next() | |
return g | |
return start | |
def produce(consumer): | |
for item in (1,2,3,4): |
OlderNewer