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
import builddriver | |
result = builddriver.execute("make debug") | |
result.status() | |
# can be True or False | |
result.log() | |
# return a path where the output is captured (/tmp/foo.log) |
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
server_addr = "127.0.0.1" | |
server_port = 8888 | |
# debug level, can be debug, error, info, ... | |
loglevel = "debug" | |
paths = { | |
"route_set" : "/", | |
"interface_get" : "/", |
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 alex_hash() { | |
var hash = 0; | |
if (this.length == 0) return hash; | |
for (i = 0; i < this.length; i++) { | |
char = this.charCodeAt(i); | |
hash1 = ((char)-hash)+char; | |
hash2 = ((char<<8)-hash)+char; | |
hash3 = ((char<<16)-hash)+char; | |
hash4 = ((char<<24)-hash)+char; | |
hash = (hash1 ^ hash2 ^ hash3 ^ hash4) & 0xFFFFFF; |
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
""" | |
Various options for a JSON type for Python. | |
My best effort at using these libraries naturally for reading and writing JSON. | |
https://nelsonslog.wordpress.com/2016/01/08/a-better-python-object-for-json/ | |
""" | |
import json, copy | |
import dotmap, attrdict, easydict, addict |
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
sudo mount /dev/sda2 / | |
# mounting sda2 is boot time related via fstab: | |
# UUID=01e804ec-cc93-44c9-8b92-8fcd41c95aff / btrfs rw,relatime,space_cache 0 0 | |
# now add sdb1 to / | |
sudo btrfs device add /dev/sdb1 / | |
sudo btrfs filesystem show | |
# Label: none uuid: 01e804ec-cc93-44c9-8b92-8fcd41c95aff |
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/perl | |
# Nexus 4 | |
$db{'10:68:ff:ff:ff:ff'} = 0; | |
# Nexus 5 | |
$db{'c4:43:ff:ff:ff:ff'} = 0; | |
sub worker { | |
$scan=`(iw dev wlan1 station dump; iw dev wlan0 station dump) | grep Station`; | |
foreach $key (keys(%db)) { |
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
@virgo:/tmp $ ssh -vvvv root@10.10.10.1 | |
OpenSSH_6.7p1 Debian-3, OpenSSL 1.0.1k 8 Jan 2015 | |
debug1: Reading configuration data /home/pfeifer/.ssh/config | |
debug1: /home/pfeifer/.ssh/config line 101: Applying options for * | |
debug3: macs ok: [hmac-sha1,hmac-ripemd160] | |
debug1: Reading configuration data /etc/ssh/ssh_config | |
debug1: /etc/ssh/ssh_config line 19: Applying options for * | |
debug2: ssh_connect: needpriv 0 | |
debug1: Connecting to 10.10.10.1 [10.10.10.1] port 22. | |
debug1: Connection established. |
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
@virgo:~ $ sudo tcpdump -vvvv -ttt -i eth1 icmp6 and 'ip6[40] = 134' | |
00:00:00.000000 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 200) fe80::b675:eff:fefa:1cb > ip6-allnodes: [icmp6 sum ok] ICMP6, router advertisement, length 200 | |
hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s | |
source link-address option (1), length 8 (1): b4:75:0e:fa:01:cb | |
0x0000: b475 0efa 01cb | |
mtu option (5), length 8 (1): 1280 | |
0x0000: 0000 0000 0500 | |
prefix info option (3), length 32 (4): 2a01:ffff:43f::/64, Flags [onlink, auto], valid time 7200s, pref. time 1800s | |
0x0000: 40c0 0000 1c20 0000 0708 0000 0000 2a01 | |
0x0010: ffff 043f 0000 0000 0000 0000 0000 |
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
ping heise.de -c 300 -ni 0.5 | awk -F '[= ]' {'print $(NF-1)'} | grep -E '[0-9]' > /tmp/ipv4.dat | |
ping6 heise.de -c 300 -ni 0.5 | awk -F '[= ]' {'print $(NF-1)'} | grep -E '[0-9]' > /tmp/ipv6.dat | |
cat << EOF > /tmp/ping-rtt.gpi | |
#!/usr/bin/gnuplot | |
set terminal svg size 1000,600 fname "Gill Sans" fsize 14 rounded dashed | |
set style line 80 lt 0 | |
set style line 80 lt rgb "#808080" | |
set style line 81 lt 3 | |
set style line 81 lt rgb "#808080" lw 0.5 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder