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
args <- commandArgs(TRUE) | |
# out/gl002/20180329-080444/logsysstat-glmark2.dat | |
logfile <- args[1] | |
print(paste("log file is", logfile)) | |
log <- read.table(logfile, header=FALSE) | |
colnames(log) <- c("timestamp", "counter", "counter2") | |
# add differential (+1 empty row at start) |
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 | |
# Enable IP Forwarding | |
# Run this, then route packets on device with: | |
# | |
# ip route add default via THIS_DEVICE_IP | |
# | |
OUT_IFACE=enp0s25 | |
IN_IFACE=enx00249b1ad5b2 | |
IPTABLES=/sbin/iptables |
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 paramiko | |
if __name__ == '__main__': | |
ssh = paramiko.SSHClient() | |
# important line if you've never logged into the machine before | |
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
ssh.connect('192.168.0.10', username='pi', password='raspberry') | |
ssh.exec_command('touch /tmp/sshisawesome') | |
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 python3 | |
from twitter import Twitter, OAuth | |
from twitter_auth import (CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, | |
ACCESS_TOKEN_SECRET) | |
if __name__ == '__main__': | |
my_auth = OAuth(token=ACCESS_TOKEN, | |
token_secret=ACCESS_TOKEN_SECRET, | |
consumer_key=CONSUMER_KEY, |