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 | |
#Makes a CSV of UNIX Time, wget speed, and link speed from an SNMP router | |
TEMPFILE="/tmp/10m" | |
STARTBYTES=`snmpwalk -OvQ -v2c -c SNMPRO ROUTERIP 1.3.6.1.2.1.2.2.1.10.7` | |
STARTTIME=`date +%s` | |
WGETOUTPUT=`/usr/bin/wget -O$TEMPFILE "http://mirror.internode.on.net/pub/test/10meg.test" 2>&1` | |
FINISHBYTES=`snmpwalk -OvQ -v2c -c SNMPRO ROUTERIP 1.3.6.1.2.1.2.2.1.10.7` | |
FINISHTIME=`date +%s` | |
BPS=`echo \(\($FINISHBYTES-$STARTBYTES\)/\($FINISHTIME-$STARTTIME\)\)/1024|/usr/bin/bc` | |
DATALINE=`echo $WGETOUTPUT | /usr/bin/perl -ne 'print "$1 $2" if /.*(?:\()([0-9]+) (KB|MB)\/s(?:\)).*/' ` |
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
<html> | |
<head> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1", {packages:["annotatedtimeline"]}); | |
google.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var data = new google.visualization.DataTable(); | |
data.addColumn('date', 'Time'); | |
data.addColumn('number', 'Bytes/Second'); |
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 gdata.youtube | |
import gdata.youtube.service | |
import Queue | |
import threading | |
import string | |
valid_chars = "-_.() %s%s" % (string.ascii_letters, string.digits) | |
from urllib import urlopen, unquote | |
import urllib | |
from urlparse import parse_qs, urlparse | |
yt_service = gdata.youtube.service.YouTubeService() |
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
exiftran -a -i -p * | |
mkdir thumbs | |
cp *.JPG thumbs | |
cp *.jpg thumbs | |
cp *.PNG thumbs | |
cp *.png thumbs | |
cd thumbs | |
mogrify -resize 100x * | |
cd .. | |
title=`pwd | sed 's/.*\///'` |
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
/queue tree get number=queue1 value-name=bytes | |
print out the number of bytes | |
:put [/queue tree get number=queue1 value-name=bytes ] | |
:if ($bytesIn > 53687091200) do={ | |
:global bytesIn; |
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 | |
# $Id: read-growatt,v 1.3 2012/03/13 00:46:43 az Exp $ | |
# | |
# File: read-growatt | |
# Date: Sun Jun 5 15:46:42 2011 | |
# Author: Alexander Zangerl (az) | |
# | |
# Abstract: | |
# read current statistics values from a growatt inverter | |
# |
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 | |
#Makes a CSV of UNIX Time, wget speed, and link speed from an SNMP router | |
VOLTS=`snmpwalk -OvQ -v2c -cpublic IP .1.3.6.1.4.1.14988.1.1.3.8.0` | |
TIME=`date +%s` | |
VOLTS=`echo "scale=3;$VOLTS/10"|/usr/bin/bc` | |
echo $TIME,$VOLTS V >> /home/mwheeler/scripts/volts.csv |
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
<html> | |
<head> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1", {packages:["annotatedtimeline"]}); | |
google.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var data = new google.visualization.DataTable(); | |
data.addColumn('date', 'Time'); | |
data.addColumn('number', 'Volts'); |
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 socket | |
import random | |
hexs = "0123456789ABCDEF" | |
UDP_PORT = 6969 | |
MESSAGE = "DOS" | |
PREFIX = "2001:" | |
sock = socket.socket(socket.AF_INET6, # Internet |
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
//requires npm install snmp-native moment | |
var snmp = require('snmp-native'); | |
var session = new snmp.Session({ host: '10.0.0.254', port: 161, community: 'public' }); | |
var http = require('http'); | |
function postData(volts){ | |
var options = { |
OlderNewer