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
| declare -A -r my_hashmap=( | |
| ["foo"]="bar" | |
| ["baz"]="qux" | |
| ) | |
| echo "${my_hashmap["foo"]}" | |
| for key in "${!my_hashmap[@]}"; do | |
| echo "key: $key, val: ${my_hashmap[$key]}" | |
| done |
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 | |
| set -eu | |
| declare -a all_deps=( ) | |
| for pkg_name in "$@" | |
| do | |
| declare -a deps=$(apt-cache depends -i --recurse $pkg_name | awk -F 'Depends: ' 'NF>1{ sub(/ .*/,"",$NF); print $NF }' | sort | uniq) | |
| all_deps+=$deps | |
| done |
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 | |
| set -eu | |
| # code-server's automatic install script. | |
| # See https://coder.com/docs/code-server/latest/install | |
| usage() { | |
| arg0="$0" | |
| if [ "$0" = sh ]; then | |
| arg0="curl -fsSL https://code-server.dev/install.sh | sh -s --" |
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/env bash | |
| result=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" | fzf) | |
| if [ $# -eq 0 ] | |
| then | |
| echo "kubectl exec -it $result /bin/bash" | |
| kubectl exec -it "$result" /bin/bash | |
| fi |
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
| cd /tmp | |
| java -Xmx5g -jar /opt/sonatype/nexus/lib/support/nexus-orient-console.jar | |
| CONNECT PLOCAL:/nexus-data/db/component admin admin | |
| REBUILD INDEX * | |
| REPAIR DATABASE --fix-graph | |
| REPAIR DATABASE --fix-links | |
| REPAIR DATABASE --fix-ridbags | |
| REPAIR DATABASE --fix-bonsai | |
| DISCONNECT |
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
| trivy image argoproj/argocd | |
| 2023-03-03T15:09:56.331+0700 INFO Vulnerability scanning is enabled | |
| 2023-03-03T15:09:56.331+0700 INFO Secret scanning is enabled | |
| 2023-03-03T15:09:56.331+0700 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning | |
| 2023-03-03T15:09:56.331+0700 INFO Please see also https://aquasecurity.github.io/trivy/v0.38/docs/secret/scanning/#recommendation for faster secret detection | |
| ^C | |
| [ssm-user@ip-10-9-28-94 ~]$ trivy image argoproj/argocd:v2.6.3 | |
| 2023-03-03T15:10:14.270+0700 INFO Vulnerability scanning is enabled | |
| 2023-03-03T15:10:14.270+0700 INFO Secret scanning is enabled | |
| 2023-03-03T15:10:14.270+0700 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning |
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: | |
| name: cilium-cli | |
| version: 0.13.0 | |
| epoch: 0 | |
| description: CLI to install, manage & troubleshoot Kubernetes clusters running Cilium | |
| target-architecture: | |
| - all | |
| copyright: | |
| - license: Apache-2.0 | |
| paths: |
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
| export LIST1=a b c d | |
| export LIST2=b c d e f | |
| INTERSECTION=($(comm -12 <(for X in "${LIST1[@]}"; do echo "${X}"; done|sort) <(for X in "${LIST2[@]}"; do echo "${X}"; done|sort))) | |
| echo ${INTERSECTION[@]} | |
| # b c d |
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: | |
| name: kubevela | |
| version: 1.7.0 | |
| epoch: 0 | |
| description: KubeVela is a modern application delivery platform that makes deploying and operating applications across today's hybrid, multi-cloud environments easier, faster and more reliable | |
| target-architecture: | |
| - all | |
| copyright: | |
| - license: Apache-2.0 | |
| paths: |
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 glob_test | |
| import ( | |
| "fmt" | |
| "regexp" | |
| "strings" | |
| "testing" | |
| "github.com/google/go-containerregistry/pkg/name" | |
| ) |