I hereby claim:
- I am pennig on github.
- I am pennig (https://keybase.io/pennig) on keybase.
- I have a public key whose fingerprint is 16FD 0B25 48BA 5040 F040 779F EE72 B6A8 9459 87BD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'nokogiri' | |
require 'json' | |
require 'time' | |
require 'timeout' | |
def parse | |
doc = Nokogiri::HTML(`curl -s http://admin:password@192.168.100.1/cgi-bin/ConnectionCgi`) | |
error_log = Nokogiri::HTML(`curl -s http://admin:password@192.168.100.1/cgi-bin/EventLogCgi`) | |
tables = doc.css('td table') |
function convert(text) { | |
var word = /^\w/, | |
tag = /^\s*<(a|b|i|strong|em|cite)([ \=\'\"\w\-\/\.\:]+)*>/i, | |
tokens = text.split('\n'), token, src = []; | |
for (var i=0, len=tokens.length; i < len; i++) { | |
token = tokens[i]; | |
if (word.test(token) || tag.test(token)) { | |
src.push('<p>' + token + '</p>'); |