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 requests | |
import smtplib | |
from email.mime.text import MIMEText | |
# Website Checker: Compares the number of <keyword> mentions to a static value and notifies of changes by email | |
url = 'www.example.com' | |
header = {'User-Agent': 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0'} | |
keyword = 'example' |
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
# REST-Call to provision new device with Cisco ISE for TACACS access | |
# | |
# The 'NetworkDeviceGroupList' in the request body needs to be adapted to your environment, or substituted with variables. | |
--- | |
- name: ISE | |
hosts: test_switch | |
gather_facts: false | |
connection: network_cli | |
vars: |
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
// ==UserScript== | |
// @name LinkedIn Recent Feed | |
// @namespace http://tampermonkey.net/ | |
// @version 0.4 | |
// @description I always want my LinkedIn feed in chronological order! | |
// @downloadURL https://gist.github.com/pccasto/708b097ecbf1b9b8e22c30e450df804e/raw/ae930ab765918d7d0d74622e4176b300f2b85e12/LinkedInRecentPlease.user.js | |
// @author pcasto | |
// @include https://linkedin.com/* | |
// @include https://www.linkedin.com/* | |
// @exclude https://www.linkedin.com/tscp-serving/* |
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
def netmask_to_cidr(m_netmask): | |
return(sum([ bin(int(bits)).count("1") for bits in m_netmask.split(".") ])) |
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
var moment = require('moment') | |
// get this midnight and next moment object and convert into unix timestamp | |
// this midnight (1 minute after last midnight) | |
var thisMidnight = moment( moment().format('YYYY-MM-DD') + ' 00:01:00' ).unix() | |
// next midnight (1 minute before next midnight) | |
var nextMidnight = moment( moment().format('YYYY-MM-DD') + ' 23:59:00' ).unix() | |
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/env python | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |