Skip to content

Instantly share code, notes, and snippets.

View laf's full-sized avatar

Neil Lathwood laf

View GitHub Profile
#!/usr/bin/env python
"""Yale Smart Alarm python client which interacts with the Yale Smart Alarm products.
See https://github.com/laf/yale-smart-alarm for more information.
"""
import logging
import requests
_LOGGER = logging.getLogger(__name__)
@laf
laf / gist:4d31652016fef0b40d721384e4f6315c
Created March 5, 2018 09:58
Oxidized install from source
cd /root
git clone https://github.com/laf/oxidized/
git checkout ssh-auth-methods
gem build *.gemspec
gem uninstall oxidized
gem install oxidized-0.21.0.gem
@laf
laf / cisco-asa.php
Created January 31, 2018 15:46
Generate list of Cisco ASA vuln to cisco-sa-20180129-asa1
<?php
chdir(dirname($argv[0]));
$init_modules = array();
require realpath(__DIR__ . '/..') . '/includes/init.php';
$devices = dbFetchRows("SELECT `devices`.`device_id`, `hostname`, `version`, `hardware`, `mempool_total` FROM `devices` LEFT JOIN `mempools` ON `mempools`.`device_id`=`devices`.`device_id` WHERE `os`='asa' AND `mempool_descr` LIKE '%System Memory' GROUP BY `hostname`");
$v = [];
@laf
laf / keybase.md
Created January 19, 2018 15:31
keybase.md

Keybase proof

I hereby claim:

  • I am laf on github.
  • I am laf (https://keybase.io/laf) on keybase.
  • I have a public key ASDVQcByNq7vxQvF17XWIo956n64_f5sleeuGuyXSnkUbgo

To claim this, I am signing this object:

aad821c20 docs: Added alert rule mapping doc (#7748)
133313020 docs: Added how to add graph ports to dashboards (#7749)
864ee84e8 fix: enexus do not disable the os discovery module (#7745)
47a36b1ce fix: Fixed bgpPeers_cbgp discovery for junos (#7743)
22f4974eb docs: Add sudo guidelines for Proxmox (#7739)
ae1cb5e6c docs: Add sudo suggestion for SMART monitoring (#7738)
600b2f332 device: Added additional APC rPDU2 Sensors (#7490)
e6ba1ee79 (Rosiak/master) Merge pull request #7741 from murrant/two_gets_getHostOS
e4a775a9c docs: fix for VM images doc. (#7740)
d59695f08 fix: revert to two gets for sysDescr and sysObjectID Some devices don't like asking for them in one get for some reason.
rules:
- name: Lights
entities:
- light.ash_grove
states:
- state: 'on'
class: 'light-on'
- state: 'off'
class: 'light-off'
action:
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].209 = 65
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].210 = 65
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].211 = 65
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].212 = 65
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].213 = 65
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].214 = 65
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].215 = 65
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].216 = 65
dot1qTpFdbPort[0][6:0:a0:1d:51:d2].218 = 65
dot1qTpFdbPort[0][6:1:0:c:cc:cc].204 = 65
+----------------------------+--------------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------+--------------+------+-----+-------------------+-------+
| port_id | int(11) | NO | PRI | NULL | |
| port_adsl_updated | timestamp | NO | | CURRENT_TIMESTAMP | |
| adslLineCoding | varchar(8) | NO | | NULL | |
| adslLineType | varchar(16) | NO | | NULL | |
| adslAtucInvVendorID | varchar(8) | NO | | NULL | |
| adslAtucInvVersionNumber | varchar(8) | NO | | NULL | |
| adslAtucCurrSnrMgn | decimal(5,1) | NO | | NULL | |
<svg viewBox="0 0 250 250" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><g fill="#932279"><path d="M136.72 36.72h25.78l16.406 17.186-42.187 42.188V36.72zm76.56 76.56V87.5l-17.186-16.406-42.188 42.187h59.375z"/><path d="M168.09 36.612h45.298v45.3L195.71 64.23l-49.718 49.72-9.39-.553-.553-9.392 49.717-49.72-17.678-17.676z"/></g><g fill="#efa724"><path d="M213.28 136.72v25.78l-17.186 16.406-42.188-42.187h59.375zm-76.56 76.56h25.78l16.406-17.186-42.187-42.188v59.375z"/><path d="M213.388 168.09v45.298h-45.3l17.68-17.677-49.72-49.718.553-9.39 9.392-.553 49.72 49.717 17.676-17.678z"/></g><g fill="#262577"><path d="M113.28 213.28H87.5l-16.406-17.186 42.187-42.188v59.375zm-76.56-76.56v25.78l17.186 16.406 42.188-42.187H36.72z"/><path d="M81.91 213.388H36.613v-45.3l17.677 17.68 49.718-49.72 9.39.553.553 9.392-49.717 49.72 17.678 17.676z"/></g><g fill="#9ccd2a"><path d="M36.72 113.28V87.5l17.186-16.406 42.188 42.187H36.72zm76.56-76.56H87.5L71
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.