Function Today {
[CmdletBinding()]
Param (
[Parameter(ValueFromPipeline = $True)]
[System.IO.FileInfo[]]$Files,
[Parameter(ValueFromPipeline = $True)]
[System.IO.DirectoryInfo[]]$Folders
This file contains hidden or 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 Get-FolderHash ($Folder) { | |
| Get-ChildItem $folder -Recurse -Exclude "*.psd1" | Where-Object {!$_.psiscontainer} | ForEach-Object {[Byte[]]$contents += [System.IO.File]::ReadAllBytes($_.fullname)} | |
| $hasher = [System.Security.Cryptography.SHA1]::Create() | |
| [string]::Join("",$($hasher.ComputeHash($contents) | %{"{0:x2}" -f $_})) | |
| } |
This file contains hidden or 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
| ### ctrl+arrows | |
| bindkey "\e[1;5C" forward-word | |
| bindkey "\e[1;5D" backward-word | |
| # urxvt | |
| bindkey "\eOc" forward-word | |
| bindkey "\eOd" backward-word | |
| ### ctrl+delete | |
| bindkey "\e[3;5~" kill-word | |
| # urxvt |
This file contains hidden or 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
| #cloud-config | |
| # Requires that the node template used has the jq utility installed. | |
| runcmd: | |
| - 'hostnamectl set-hostname $(cloud-init query -a | jq -r .v1.local_hostname)' |
This file contains hidden or 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 com.santaba.agent.groovyapi.http.*; | |
| import java.time.LocalDate | |
| import java.time.LocalDateTime | |
| import java.time.Duration | |
| import java.time.format.DateTimeFormatter | |
| import groovy.json.JsonBuilder | |
| DEBUG = true | |
| API_URL = "https://api.qtsdatacenters.com" | |
| USERNAME = hostProps.get("qts.username") |
- Create the cluster:
k3d cluster create -p "8081:80@loadbalancer" --servers 3 - Deploy a web application
kubectl create deployment nginx --image=nginx --replicas=3 - Expose the application as a service of type ClusterIP
kubectl expose deployment/nginx --port 80 --name nginx - Create an ingress object for the service:
This file contains hidden or 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
| -- Create a table to store the health status of the object | |
| local hs = {} | |
| -- Check if the object has any status at all | |
| if obj.status ~= nil then | |
| -- Check if the object has any conditions at all | |
| if obj.status.conditions ~= nil then | |
| -- Loop through each condition | |
| for i, condition in ipairs(obj.status.conditions) do | |
| -- If the "Ready" condition is False |
This file contains hidden or 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
| blueprint: | |
| name: πͺ Contact Sensor Left Open Notification by Malte | |
| description: | | |
| π² Notifies you when a door or window is left open. | |
| π Version 2024.04.23.1 | |
| Are you tired of worrying about open doors or windows? This blueprint has got you covered! It's designed to send you a prompt notification when a door or window remains open for a specified duration. | |
| π For Details see this [Blog post](https://community.home-assistant.io/t/contact-sensor-door-or-window-left-open-notification/652571) |