Skip to content

Instantly share code, notes, and snippets.

View karrots's full-sized avatar

Jonathan Karras karrots

View GitHub Profile
@karrots
karrots / check_portchannels.pl
Created May 9, 2018 23:37
Perl script used with Icinga2 to check port channel status.
#!/usr/bin/env perl
use strict;
use warnings;
use Net::SNMP;
use Getopt::Long;
sub snmp_error {
my $session = shift;

Keybase proof

I hereby claim:

  • I am karrots on github.
  • I am jkarras (https://keybase.io/jkarras) on keybase.
  • I have a public key ASCrQEbcxKFpC2IFszi8sk9iHnzzwHy3JbyKrTkQtUv8zAo

To claim this, I am signing this object:

local function testHTTP()
net.dns.resolve("www.google.com", function(sk, ip)
if ip == nil then
print("DNS fail!")
else
print("Resolved: " .. ip)
end
end)
http.get("http://httpbin.org/ip", nil, function(code, data, result)
@karrots
karrots / 10-moteino-gateway.conf
Last active May 7, 2016 03:08
Self install script for RaspberryPi-Gateway. Copy to base Jessie or Jessie Lite install. Change permissions and run as root.
#rsyslog config to redirect moteino-gateway logs to the home directory.
#Place this file in /etc/rsyslog.d/ then restart the rsyslog daemon.
if $programname == 'moteino-gateway' then /home/pi/gateway/logs/gateway.log
& ~
@karrots
karrots / local.json5
Created December 3, 2015 03:25
Example config changing the user/group used by the server
{
general : {
user : 'pi',
group : 'pi',
}
}