Don't use this, use wkhtmltopdf. Don't waste your life like I did.
Render PDFs using Chrome.
const m = Metalsmith(__dirname)
.use(markdown({
smartypants: true,
server { | |
listen 80; | |
server_name cors.tjvr.org; | |
root /usr/share/nginx/html; | |
index index.html; | |
client_max_body_size 1m; | |
client_body_buffer_size 64k; |
# -*- coding: latin-1 -*- | |
"""Heap queue algorithm (a.k.a. priority queue). | |
Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for | |
all k, counting elements from 0. For the sake of comparison, | |
non-existing elements are considered to be infinite. The interesting | |
property of a heap is that a[0] is always its smallest element. | |
Usage: |
class Wabt < Formula | |
desc "The WebAssembly Binary Toolkit" | |
homepage "https://github.com/WebAssembly/wabt" | |
head "https://github.com/WebAssembly/wabt.git" | |
#url "https://github.com/WebAssembly/wabt/archive/binary_0xc.tar.gz" | |
sha256 "0ee56305b232d2a07aebd18afd0861ba39941d137ebf2ce2d57395a1bcd82940" | |
depends_on "cmake" => :build | |
def install |
class Binaryen < Formula | |
desc "Compiler infrastructure and toolchain library for WebAssembly, in C++" | |
homepage "https://github.com/WebAssembly/binaryen" | |
url "https://github.com/WebAssembly/binaryen/archive/version_26.tar.gz" | |
head "https://github.com/WebAssembly/binaryen.git" | |
version "26" | |
sha256 "e78ff7ea4dbffa0d53084a0bc1ec8ed43445b674a02c17af798f3c0df13d418d" | |
depends_on "cmake" => :build |
line -> thing {% id %} | |
thing -> block {% id %} | |
| r_parens {% id %} | |
| b_parens {% id %} | |
n -> n4 {% id %} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<style type="text/css"> | |
svg.railroad-diagram { | |
background-color: hsl(30,20%,95%); | |
} | |
svg.railroad-diagram path { | |
stroke-width: 3; |
// 71 functions generated | |
// 37747 bytes | |
(function(ctx) { | |
return (function(lex) { | |
function error(id) { | |
throw new Error(id); | |
} | |
function g0() { |
JSON | |
✔ 🐮 x 830 ops/sec ±0.74% (90 runs sampled) | |
✔ syntax-cli x 385 ops/sec ±1.06% (85 runs sampled) | |
tosh | |
✔ 🐮 x 1,403 ops/sec ±0.80% (93 runs sampled) | |
✔ tosh x 428 ops/sec ±1.26% (87 runs sampled) | |
Python |
Don't use this, use wkhtmltopdf. Don't waste your life like I did.
Render PDFs using Chrome.
const m = Metalsmith(__dirname)
.use(markdown({
smartypants: true,
#!/usr/bin/python2 | |
import sys | |
import time | |
import RPi.GPIO as GPIO | |
# set the pins numbering mode | |
GPIO.setmode(GPIO.BOARD) |