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
#!/bin/sh | |
for rrd in *.rrd; do | |
since="$(rrdtool dump $rrd|grep -oE '[[:digit:]]{10}'|sort|tail -n1)" | |
rrdtool create $rrd.new --start "$since" --step 60 \ | |
DS:upstate:GAUGE:120:0:1 \ | |
DS:clients:GAUGE:120:0:200 \ | |
RRA:AVERAGE:0.5:1:120 \ | |
RRA:AVERAGE:0.5:5:1440 \ | |
RRA:AVERAGE:0.5:60:720 \ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Graph-Test</title> | |
<script src="//code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script type="text/javascript" src="lib/flot/jquery.flot.js"></script> | |
<script type="text/javascript" src="lib/flot/jquery.flot.time.js"></script> | |
<script type="text/javascript" src="lib/flot/jquery.flot.selection.js"></script> | |
<script type="text/javascript" src="lib/flot/jquery.flot.tooltip.js"></script> | |
<script type="text/javascript" src="lib/javascriptrrd/binaryXHR.js"></script> |
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
#!/bin/sh | |
set -e | |
# functions | |
usage() { | |
cat <<EOF | |
Automatically builds gluon images from the latest versions of the repositories. |
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
<?php | |
require("write_key.inc.php"); | |
?> | |
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> | |
<title>Mesh-VPN-Schlüssel eintragen</title> |
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
#!/usr/bin/env nodejs | |
var fs = require('fs'); | |
var _ = require('underscore'); | |
var RRD = require('rrd').RRD; | |
var argv = require('optimist') | |
.usage('Usage: $0 -b <batvis file> -a <alias file> <destination dir>') | |
.options('b', {alias: 'batvis', describe: 'File containing output of batadv-vis -f jsondoc', demand: true, string: true}) | |
.options('d', {alias: 'details', describe: 'File containing details sent by the nodes', demand: true, string: true}) | |
.argv; |
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
\documentclass{scrartcl} | |
\usepackage{tikz} | |
\usetikzlibrary{graphdrawing,graphs} | |
\usegdlibrary{circular} | |
\begin{document} | |
\begin{tikzpicture}[simple necklace layout] | |
\graph { A -> B -> C -> A}; | |
\end{tikzpicture} | |
\end{document} |
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
[{"2412": ["6511A5AF+", "9CA6B13E+", "C7A646CE", "238742BA"], "2472": ["1A2B3912-"], "2462": ["80DFA95A", "0543E2A4", "C7A6A76E", "96D72006"], "2437": ["0F6EB6A4", "2506C763", "1D19D85E", "1DD19B4A", "4FB59AB4"], "2452": ["83BF6A82", "24FE03AD-"], "2442": ["2308AD52-"]}, {"2412": ["03557B22", "2308015E+", "2DB38AD9+"], "2472": ["1C284EB1"], "2462": ["8DF730F1-"], "2422": ["317035E5", "C63C55C8"], "2437": ["040E2C9D", "2E9E3916", "1A4F01E2", "BDB99066", "80DF7CD7"], "2457": ["1C2812C7"]}, {"2412": ["23087FE1", "2308E857", "31C4156A+", "31C43F2E", "23085221", "C63C3FB3"], "2422": ["040ED55D", "1D199CD5"], "2447": ["96D7A2DE", "A8E4F368", "C7A6F2A2-"], "2472": ["651172E5", "31C40A3D"], "2462": ["1F33777C", "16E36874", "1C4A0129-", "6D8FCEB6-"], "2437": ["1E58849F", "26F24594+", "7EE53D88", "1E580919", "1CF08464", "040E5692", "264D08B0-", "264D0C81", "265AAFBB", "150C8C77"], "2417": ["96D7A280+", "1A2ACAD0", "C63C266C+"], "2442": ["66B3EE61-"], "2432": ["8DF7790B+", "C63CB6E1"], "2457": ["1401CE1D", "7EE50084-", |
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
function update_latency(int link_latency) { | |
bgp_community.add((64511, link_latency)); | |
if (64511, 9) ~ bgp_community then bgp_community.delete([(64511, 1..8)]); | |
else if (64511, 8) ~ bgp_community then bgp_community.delete([(64511, 1..7)]); | |
else if (64511, 7) ~ bgp_community then bgp_community.delete([(64511, 1..6)]); | |
else if (64511, 6) ~ bgp_community then bgp_community.delete([(64511, 1..5)]); | |
else if (64511, 5) ~ bgp_community then bgp_community.delete([(64511, 1..4)]); | |
else if (64511, 4) ~ bgp_community then bgp_community.delete([(64511, 1..3)]); | |
else if (64511, 3) ~ bgp_community then bgp_community.delete([(64511, 1..2)]); | |
else if (64511, 2) ~ bgp_community then bgp_community.delete([(64511, 1..1)]); |
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
local function timeout_popen(timeout, ...) | |
local outerpiper, outerpipew = nixio.pipe() | |
if nixio.fork() == 0 then | |
outerpiper:close() | |
local innerpiper, innerpipew = nixio.pipe() | |
local pid = nixio.fork() | |
if pid == 0 then | |
outerpipew:close() | |
innerpiper:close() | |
nixio.dup(innerpipew, nixio.stdout) |
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
#!/bin/sh | |
CMD="${@:-bash}" | |
unshare -unpirf --mount-proc sh -c ' | |
hostname sandbox | |
TMPNAME=$(mktemp -d) | |
# replace /dev by minimal dummy version | |
mount -t tmpfs -o nosuid,mode=755 none $TMPNAME |
OlderNewer