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,
# /etc/udev/rules.d/99-pico.rules | |
# Make an RP2040 in BOOTSEL mode writable by all users, so you can `picotool` | |
# without `sudo`. | |
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666" | |
# Symlink an RP2040 running MicroPython from /dev/pico. | |
# | |
# Then you can `mpr connect $(realpath /dev/pico)`. | |
SUBSYSTEM=="tty", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0005", SYMLINK+="pico" |
const moo = require('moo') | |
function compileClass(constructor, indent) { | |
let s = '' | |
s += indent + 'var ' + constructor.name + ' = ' + constructor | |
for (let key in constructor.prototype) { | |
s += '\n\n' | |
const value = constructor.prototype[key] | |
if (typeof value === 'function') { | |
s += indent + constructor.name + '.prototype.' + key + ' = ' + value |
#!/usr/bin/env python | |
import socket | |
import struct | |
import sys | |
HOST = "192.168.1.39" | |
PORT = 5000 | |
def switch(input_port): |
[Unit] | |
Description=Control MPRIS media players with your Flirc | |
[Service] | |
ExecStart=/usr/bin/flirc_mpris.py | |
Restart=always | |
[Install] | |
WantedBy=default.target |
sda5_crypt UUID=c66880c1-c2f1-40fc-9580-f25d493876ef none luks,discard |
#!/usr/bin/python2 | |
import sys | |
import time | |
import RPi.GPIO as GPIO | |
# set the pins numbering mode | |
GPIO.setmode(GPIO.BOARD) |
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,
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 |
// 71 functions generated | |
// 37747 bytes | |
(function(ctx) { | |
return (function(lex) { | |
function error(id) { | |
throw new Error(id); | |
} | |
function g0() { |
<!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; |