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
''' | |
This is an example of how to send data to Slack webhooks in Python with the | |
requests module. | |
Detailed documentation of Slack Incoming Webhooks: | |
https://api.slack.com/incoming-webhooks | |
''' | |
import json | |
import requests |
This example connects to an imap server and retrieves emails
npm install imap mailparser
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 re | |
import email.charset | |
from pathlib import Path | |
from glob import glob | |
from email import message_from_binary_file, policy | |
RE_QUOPRI_BS = re.compile(r'\b=20=\n') | |
RE_QUOPRI_LE = re.compile(r'\b=\n') | |
RE_LONG_WORDS = re.compile(r'\b[\w\/\+\=\n]{72,}\b') |
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
package foo; | |
import javax.mail.BodyPart; | |
import javax.mail.Message; | |
import javax.mail.MessagingException; | |
import javax.mail.internet.MimeMessage; | |
import javax.mail.internet.MimeMultipart; | |
import java.nio.charset.StandardCharsets; | |
import org.apache.nifi.annotation.behavior.InputRequirement; | |
import org.apache.nifi.annotation.documentation.CapabilityDescription; |
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
function YNABAccounts(accessToken, budgetId) { | |
const accounts = _getBudgetAccounts(accessToken, budgetId); | |
if(accounts == null) { | |
return null; | |
} | |
const columns = ["Name", "Type", "Budget", "Closed", "Balance"]; | |
const rows = accounts.map(function (acc) { | |
return [ |
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
from requests.auth import AuthBase | |
class SAML(AuthBase): | |
from bs4 import BeautifulSoup | |
"""Implemeents SSO with RH auth.redhat.com""" | |
def __init__(self, username, password): | |
# setup any auth-related data here | |
self.username = username | |
self.password = password |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<base target="_top"> | |
<title>Message Display Test</title> | |
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css"> | |
</head> | |
<body style="padding:3em;"> | |
<h1>Messages</h1> | |
<ul> |
- Log into unifi controller web UI
- Go to Settings
- Select Routing & Firewall
- Select Firewall
- Select Groups
- Hit "Create new Group"
- Enter all your DNS servers here you want to be allowed on the local LAN (Eg, mine is 10.0.1.1 - gateway, 10.0.1.14 - pi-hole)
- Name this "Allowed DNS Servers"
- Hit OK
- SSH into the Gateway - NOT the CloudKey (username/password is whatever you set up)
OlderNewer