Function Today {
[CmdletBinding()]
Param (
[Parameter(ValueFromPipeline = $True)]
[System.IO.FileInfo[]]$Files,
[Parameter(ValueFromPipeline = $True)]
[System.IO.DirectoryInfo[]]$Folders
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 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 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 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 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: