Simple overview of use/purpose.
An in-depth paragraph about your project and overview of use.
| import random | |
| randomlist1 = [] | |
| randomlist2 = [] | |
| list = [] | |
| for i in range(0,100): | |
| a = random.randint(1,30) | |
| b = random.randint(1,30) | |
| randomlist1.append(a) |
| Filter | Description | Example |
|---|---|---|
| allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
| intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
| inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
| allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
| intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
| $terminatingNamespaces = kubectl get ns --field-selector=status.phase==Terminating -o jsonpath="{range .items[*]}{.metadata.name}{'\n'}{end}" | |
| foreach ($ns in $terminatingNamespaces) { | |
| Write-Verbose '[FOUND]: Forcefully removing $ns' | |
| $jsonObj = kubectl get namespace $ns -o json | ConvertFrom-Json | foreach-object { $_.spec.finalizers = @(); $_ } | | |
| convertto-json | kubectl replace --raw /api/v1/namespaces/$namespace/finalize -f - | |
| } |
| #!/bin/bash | |
| namespaces=$(kubectl get ns --field-selector=status.phase==Terminating -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}') | |
| if [ -z "$namespaces"] | |
| then | |
| echo "No namespaces to delete." | |
| exit | |
| else | |
| for namespace in $namespaces |
| using System.Diagnostics; | |
| string path = @"C:\Path\to\your\file.txt"; | |
| ProcessStartInfo processInfo = new ProcessStartInfo(); | |
| processInfo.FileName = @"powershell.exe"; | |
| processInfo.Arguments = $@"-Command $ErrorActionPreference = 'Stop'; $VerbosePreference = 'Continue'; $ProgressPreference = 'SilentlyContinue'; | |
| $fi = Get-ItemProperty -Path '{path}'; | |
| $ShellApplication = New-Object -ComObject Shell.Application; | |
| $ShellFolder = $ShellApplication.Namespace($fi.Directory.FullName); |
| Summary: | |
| Run tcpdump on a pod and then see that information through Wireshark locally on my machine. | |
| Topology | |
| -------- | |
| [laptop with wireshark] ------> [AKS Node] ------> [POD (tcpdump is here)]. | |
| ##1. Create the fifo on your local machine (where wireshark will run) | |
| ``` | |
| mkfifo /tmp/remote-capture.fifo |
| Simple GET example | |
| $response = Invoke-RestMethod 'http://example.com/api/people' | |
| # assuming the response was in this format { "items": [] } | |
| # we can now extract the child people like this | |
| $people = $response.items | |
| GET with custom headers example | |
| $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
| $headers.Add("X-DATE", '9/29/2014') | |
| $headers.Add("X-SIGNATURE", '234j123l4kl23j41l23k4j') | |
| $headers.Add("X-API-KEY", 'testuser') |
| resource "azurerm_kubernetes_cluster_node_pool" "np" { | |
| name = var.node_pool_name | |
| kubernetes_cluster_id = azurerm_kubernetes_cluster.k8s.id | |
| vm_size = var.np_size | |
| node_count = var.np_count | |
| enable_auto_scaling = var.np-enable_auto_scaling | |
| max_count = var.np-enable_auto_scaling_max_count | |
| min_count = var.np-enable_auto_scaling_min_count | |
| zones = (var.np-availability_zones == "") ? [] : split(",", var.np-availability_zones) | |
| max_pods = var.np-max_pods |
| kubectl get nodes -o=custom-columns=NAME:.metadata.name,CAPACITY:.status.capacity.pods |