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
# Add flow as a mix dep | |
# Killed by the OOM-killer | |
defmodule RipeTest do | |
use ExUnit.Case | |
doctest Ripe | |
# From https://ftp.ripe.net/ripe/dbase/split/ | |
@filename "./assets/ripe.db.inetnum.gz" | |
@outfile 'inetnum.dets' |
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
__main__.function_to_benchmark|0:00:00.000172 | |
__main__.function_to_benchmark|0:00:01.001560 | |
__main__.function_to_benchmark|0:00:02.001992 |
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 | |
usage() { | |
echo "$0 -f <filename>" | |
echo | |
echo " required:" | |
echo " -f input filename" | |
echo | |
} |
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
# Install graphviz using pip3 (on archlinux): | |
# $ sudo pip3 install graphviz | |
import graphviz as gv | |
g1 = gv.Graph(format="svg") # "svg" or "dot" | |
g1.node('A') | |
g1.node('B') | |
g1.node('C') | |
g1.edge('A', 'C') | |
g1.edge('B', 'C') |
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/bash | |
check_args=${@:?You forgot the markdown file(s) as arg} | |
cat << EOF | |
<html> | |
<head> | |
<title></title> | |
<!-- Bootstrap css themes --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> |
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
from scapy.all import * | |
ip_dst = "104.16.34.249" | |
for i in range(1, 65536): | |
ans,uns = sr(IP(dst=ip_dst) / TCP(dport=i, flags="S"), timeout=1, retry=-2, verbose=False) | |
try: | |
if ans[0][1].getlayer(TCP).flags & 0x12 == 0x12: | |
print str(i) + " is open" |
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/bash | |
# This simple helper script toggle the mute attribute for a program in pulseaudio. | |
PROG="Chromium" | |
all=$(pacmd list-sink-inputs | egrep -B 15 "client: [0-9]+ <${PROG}>" | sed -n '1p;8p') | |
index=${all:11:2} # get the index | |
muted=${all:22:3} # get 'yes' or 'no' |
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
#include <click/config.h> | |
#include <click/args.hh> | |
#include "DummyAnswer.hh" | |
#include "DummyProto.hh" | |
CLICK_DECLS | |
DummyAnswer::DummyAnswer() { }; | |
DummyAnswer::~DummyAnswer() { }; |
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
InfiniteSource(LIMIT 1) | |
-> UserElem() | |
-> Discard; |
NewerOlder