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
let quote = @"When solving problems, it's smart to keep things simple. Don't overthink it, Just look for what makes sense. There's always another way, maybe easier than you first thought. Tools like kusto help a lot by making hard tasks feel easy. A real hacker doesn't work harder—they work smarter."; | |
let words = split(quote, " "); | |
print phrase = strcat_array(pack_array(words[12], words[20], words[30], words[42]), " ") |
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
#!/bin/bash | |
# Input validation | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: ./mergekubeconfig.sh <kubeconfig1> <kubeconfig2>" | |
exit 1 | |
fi | |
# Function to generate a random string | |
generate_random_string() { |
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
#!/bin/sh | |
# Source: http://kubernetes.io/docs/getting-started-guides/kubeadm | |
set -e | |
source /etc/lsb-release | |
if [ "$DISTRIB_RELEASE" != "20.04" ]; then | |
echo "################################# " | |
echo "############ WARNING ############ " |
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
#!/bin/bash | |
# Start kubectl proxy in the background | |
kubectl proxy & | |
# Save the process ID of kubectl proxy | |
kubectl_proxy_pid=$! | |
# Base URL to the logs directory on the node | |
base_url="http://localhost:8001/api/v1/nodes" |
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
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"log" | |
"github.com/containerd/containerd" | |
"github.com/containerd/containerd/namespaces" |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"github.com/containerd/containerd" | |
"github.com/containerd/containerd/namespaces" | |
cadvisorapi "github.com/google/cadvisor/info/v1" |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/containerd/containerd" | |
"github.com/containerd/containerd/namespaces" | |
) |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"strings" | |
"github.com/containerd/containerd" | |
"github.com/containerd/containerd/namespaces" | |
) |
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
#!/bin/bash | |
# Variables for the Azure AKS cluster and Log Analytics workspace | |
clusterrg="akscilium" | |
clustername="akscilium" | |
workspaceRG="ammanrg" | |
workspacename="ammaninternal" | |
# Get the variables with CLI. | |
# if you are running on a node, replace the variables with static entries. |
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
# Backup WSL | |
# Backup WSL | |
#.\script.ps1 backup 'C:\wsl-backup' | |
# Restore WSL | |
#.\script.ps1 restore 'C:\wsl-backup' | |
function Backup-WSL { | |
[CmdletBinding()] | |
param ( |
NewerOlder