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
| " set line no | |
| set nu | |
| " indents based on file extension | |
| filetype plugin indent on | |
| " show existing tab with 4 spaces width | |
| set tabstop=4 | |
| " when indenting with '>', use 4 spaces width |
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
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: netshoot | |
| labels: | |
| app: netshoot | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: netshoot |
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
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: debug-daemon | |
| namespace: default | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: debug-pod | |
| updateStrategy: |
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 pickle | |
| def write_binary_file(filename, data): | |
| with open(filename, 'wb') as file: | |
| pickle.dump(data, file) | |
| print(f"Data written to {filename}.") | |
| def read_binary_file(filename): | |
| try: | |
| with open(filename, 'rb') as file: |
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 csv | |
| def write_to_csv(filename, data): | |
| with open(filename, 'w', newline='') as csvfile: | |
| # Create a CSV writer object | |
| csv_writer = csv.writer(csvfile) | |
| # Write a single row | |
| csv_writer.writerow(["Name", "Age", "City"]) |
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
| def write_to_text_file(filename, data): | |
| with open(filename, 'w') as file: | |
| # Write a single line | |
| file.write("Header: Name, Age, City\n") | |
| # Write multiple lines | |
| for line in data: | |
| file.write(','.join(map(str, line)) + '\n') | |
| print(f"Data written to {filename}.") |
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
| alias k=kubectl | |
| alias kctx=kubectx | |
| alias kns=kubens | |
| # alias kx='f() { [ "$1" ] && kubectx $1 && kprompt || kubectx ; } ; f' | |
| # alias kn='g() { [ "$1" ] && kns $1 && kprompt || kns ; } ; g' |
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
| # go | |
| export PATH=$PATH:$(go env GOPATH)/bin | |
| # java | |
| export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
| # kubebuilder autocompletion | |
| if [ -f /usr/local/share/bash-completion/bash_completion ]; then | |
| . /usr/local/share/bash-completion/bash_completion | |
| fi | |
| . <(kubebuilder completion bash) |
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
| Kubeconfig: mainconfig.yaml | |
| ControllerCluster: | |
| Context: oss-mc-br-e2e-1 | |
| HubChartOptions: | |
| Release: kubeslice-controller | |
| Chart: kubeslice-controller | |
| Repo: "https://kubeslice.github.io/kubeslice/" | |
| Namespace: kubeslice-controller | |
| SetStrValues: | |
| "kubeslice.controller.logLevel": "debug" |