Skip to content

Instantly share code, notes, and snippets.

@mvertes
mvertes / graphviz-2.34.0-dotty-patch
Created December 12, 2013 14:54
This patch fixes a bug where dotty does not display label in nodes. This fix is already present upstream.
diff -rNpau graphviz-2.34.0/cmd/dotty/dotty_layout.lefty graphviz-2.34.0-mv1/cmd/dotty/dotty_layout.lefty
--- graphviz-2.34.0/cmd/dotty/dotty_layout.lefty 2013-09-07 03:07:52.000000000 +0200
+++ graphviz-2.34.0-mv1/cmd/dotty/dotty_layout.lefty 2013-12-12 15:44:12.466948990 +0100
@@ -5,7 +5,7 @@ dotty.grablserver = function (lserver) {
local fd;
if (~dotty.lservers[lserver] | tablesize (dotty.lservers[lserver]) == 0) {
- if (~((fd = openio ('pipe', lserver, 'r+', '%e -Txdot')) >= 0)) {
+ if (~((fd = openio ('pipe', lserver, 'r+', '%e -Txdot1.2')) >= 0)) {
dotty.message (0, concat ('cannot start ', lserver));
@mvertes
mvertes / backup.sh
Created March 18, 2014 17:12
Small and simple incremental backup tool using rsync(1)
#!/bin/sh
# incremental backup using rsync(1)
die() { echo "$0: fatal: $@" >&2; exit 1; }
[ "$(id -u)" = 0 ] || die must run as root
dest=${1:-bip.local:/home/backup}/$(hostname)
date=$(date +%Y%m%d_%H%M%S)
last=$(rsync --list-only $dest/ 2>/dev/null | cut -b 47- | tail -1)
case $last in
@mvertes
mvertes / sandbox.js
Created May 13, 2016 17:51
co-process for ijavascript jupyter kernel
#!/usr/bin/env node
const vm = require('vm');
const done = function (result) {
process.send({mime: {"text/plain": "undefined"}});
}
// initialize VM context
vm.runInThisContext('(function (_require, _done) {require = _require; co = require("co"); $$done$$ = _done; })')(require, done);

Keybase proof

I hereby claim:

  • I am mvertes on github.
  • I am mvertes (https://keybase.io/mvertes) on keybase.
  • I have a public key ASAaTluDdADHrbTdIPz52Q4UUNMRwWMtNKzUENm3SG5AlQo

To claim this, I am signing this object:

@mvertes
mvertes / Output
Created October 31, 2019 13:25
yaegi tests
Hello world