- 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)
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
# Upsert function for pandas to_sql with postgres | |
# https://stackoverflow.com/questions/1109061/insert-on-duplicate-update-in-postgresql/8702291#8702291 | |
# https://www.postgresql.org/docs/devel/sql-insert.html#SQL-ON-CONFLICT | |
import pandas as pd | |
import sqlalchemy | |
import uuid | |
import os | |
def upsert_df(df: pd.DataFrame, table_name: str, engine: sqlalchemy.engine.Engine): |
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
// ID of the calendar, can be found in sharing settings of the calendar | |
var calendarID = "[email protected]" | |
// Input data from the sheet with name "Final Planning" | |
let planning = SpreadsheetApp.getActive().getSheetByName('Final Planning') | |
// Get cell values as strings in 2D array format | |
let eventsData = planning.getDataRange().getValues() | |
// Column name shortcuts, their index get determined in setRowIndices based on the column header |
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
# Docker compose to set up containers for all services you need: | |
# VPN | |
# Sonarr, Radarr, Lidarr, Qbittorrent | |
# Non-VPN | |
# Plex, get_iplayer | |
# Before running docker-compose, you should pre-create all of the following folders. | |
# Folders for Docker State: | |
# /volume1/dockerdata. - root where this docker-compose.yml should live | |
# /volume1/dockerdata/plex - Plex config and DB | |
# /volume1/dockerdata/sonarr - Sonarr config and DB |
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
// In some page_object.ts | |
// For this scenario, we have a Cypress test that triggers a download email to be sent to the user's inbox after performing | |
// some UI steps on the page i.e. clicking a button on the page to export data to a CSV for us to download | |
// We need to follow the download link in the email back to the web app we own and control to continue the test | |
redirectToCSVDownloadPageFromEmail({ | |
user, | |
pass, | |
searchString, | |
}: { | |
user: string; |
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
# Manging Rhasspy calls for the climate entity | |
# A climate entity controls temperature, humidity, or fans, such as A/C systems and humidifiers. | |
# --> https://developers.home-assistant.io/docs/core/entity/climate/ | |
automation: | |
#Changing the Temperature | |
- alias: Rhasspy Set Temperature | |
description: Set new target temperature | |
trigger: | |
- event_data: {} |
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> |
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
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
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; |
NewerOlder