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 natapp proc, check logfile, post new url | |
# USAGE: nat_endpoint_checker.sh (system startup / crontab) | |
NATAPP_AUTHTOKEN=0fe7367cxXxXxXxX | |
SERVERCHAN_KEY=SCU14967TxXxXxXxXb9881e859ba765c77730fdb659f8xXxXxXxX | |
LOGFILE=/tmp/natapp.log | |
KEYWORD="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
require "nokogiri" | |
require "open-uri" | |
x_weeks_last = params['last-x-weeks'].to_i | |
width = params['width'].to_i | |
height = params['height'].to_i | |
url = "https://github.com/users/#{params['username']}/contributions" | |
document = Nokogiri::HTML(open(url)) |