I hereby claim:
- I am lapo-luchini on github.
- I am lapo (https://keybase.io/lapo) on keybase.
- I have a public key whose fingerprint is 1651 5D1E D58A BCB0 36C3 1F59 83B0 B8C6 CBDA 71F0
To claim this, I am signing this object:
| #!/bin/sh | |
| FILE="$1" | |
| shift | |
| PARAM="$@" | |
| svn log -q "$FILE" | egrep '^r[0-9]+' | while read REV ALL; do | |
| OUT=`svn cat -r $REV "$FILE" | egrep -n "$PARAM"` | |
| if [ $? -eq 0 ]; then | |
| echo "====> $REV $ALL" | |
| echo "$OUT" | |
| fi |
| /*! dynamically change favicon from CSS (does not work on Internet Explorer and Safari) | |
| * | |
| * use with: | |
| * <link id='linkCSS' href='my.css' type='text/css' rel='stylesheet' /> | |
| * <link id='favicon' rel="shortcut icon" href="../images/favicon.png" type="image/png" /> | |
| * | |
| * my.css can contain: | |
| * #favicon { background-image: url(any valid URL); } | |
| */ |
| #! /usr/bin/env node | |
| // decode output from a variety of hex dumps, such as | |
| // - BSD hexdump / hd | |
| // 00000000 50 4f 53 54 50 4f 53 54 50 4f 53 54 50 4f 53 54 |POSTPOSTPOSTPOST| | |
| // - od -t x1 | |
| // 0000000 50 4f 53 54 50 4f 53 54 50 4f 53 54 50 4f 53 54 | |
| // - Java javax.net.debug=all | |
| // 0000: 50 4F 53 54 50 4F 53 54 50 4F 53 54 50 4F 53 54 POSTPOSTPOSTPOST |
I hereby claim:
To claim this, I am signing this object:
| BEGIN { dump = 0; } | |
| /^Full thread dump/ { dump = "dump " prev ".txt"; } | |
| dump != 0 { print $0 > dump; } | |
| /^ PSPermGen/ { getline; print $0 > dump; dump = 0; } | |
| { prev = $0; } |
| #!/usr/bin/env node | |
| //jshint node: true, esversion: 6, strict: global, indent: 4, immed: true, undef: true, sub: true, newcap: false | |
| 'use strict'; | |
| const fs = require('fs'), | |
| readline = require('readline'), | |
| https = require('https'), | |
| now = Date.now(), | |
| c = { | |
| reset: '\x1b[0m', |
| #!/bin/sh | |
| # first you need to set the Hyper-V virtual switch named "WSL" to "external network" (bridge mode) | |
| cat <<EOF > /etc/resolv.conf | |
| nameserver 192.168.1.1 | |
| nameserver 8.8.8.8 | |
| nameserver 2001:4860:4860::8888 | |
| EOF | |
| ip addr add 192.168.1.8/24 dev eth0 | |
| route add default gw 192.168.1.1 | |
| route del default gw 172.23.160.1 |
| #!/bin/sh | |
| # Script informed by the collectd monitoring script for smartmontools (using smartctl) | |
| # by Samuel B. <samuel_._behan_(at)_dob_._sk> (c) 2012 | |
| # source at: http://devel.dob.sk/collectd-scripts/ | |
| # TODO: This probably needs to be a little more complex. The raw numbers can have more | |
| # data in them than you'd think. | |
| # http://arstechnica.com/civis/viewtopic.php?p=22062211 | |
| # can be add to /etc/crontab like this, and node_exporter will see it automatically: |
| // generates flashcards to study multiplications and division of numbers up to 100 | |
| // can be imported into Anki via the File→Import option, use "Basic" type cards | |
| let x = {}; | |
| for (let a = 2; a <= 100; ++a) | |
| x[a] = []; | |
| for (let a = 2; a < 100; ++a) | |
| for (let b = a; b < 100; ++b) { | |
| let m = a * b; | |
| if (m > 100) | |
| continue; |
| #!/bin/sh | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: $0 FQDN" | |
| exit 1 | |
| fi | |
| cd `dirname "$0"` | |
| if [ ! -f ca.crt ]; then | |
| openssl ecparam -genkey -name prime256v1 -out ca.key | |
| openssl req -x509 -new -SHA256 -nodes -days 3652 -subj "/CN=Root CA/OU=zrepl/O=YourName/C=IT" -key ca.key -out ca.crt | |
| fi |