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
| from datetime import datetime | |
| from multiprocessing import Lock | |
| import mysql.connector | |
| USER = "root" | |
| PASSWD = "admin" | |
| HOST = 'localhost' | |
| DB = "db_test" |
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
| mkdir -p k8s/cert/ && cd k8s/cert/ | |
| openssl req -nodes -newkey rsa:2048 -keyout dashboard.key -out dashboard.csr -subj "/C=/ST=/L=/O=/OU=/CN=*" | |
| openssl x509 -req -sha256 -days 3650 -in dashboard.csr -signkey dashboard.key -out dashboard.crt | |
| microk8s kubectl -n kube-system delete secret kubernetes-dashboard-certs | |
| microk8s kubectl -n kube-system create secret generic kubernetes-dashboard-certs --from-file=dashboard.crt --from-file=dashboard.key | |
| microk8s kubectl -n kube-system edit deploy kubernetes-dashboard -o yaml | |
| # change args part | |
| args: |
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
| # This file maps Internet media types to unique file extension(s). | |
| # Although created for httpd, this file is used by many software systems | |
| # and has been placed in the public domain for unlimited redisribution. | |
| # | |
| # The table below contains both registered and (common) unregistered types. | |
| # A type that has no unique extension can be ignored -- they are listed | |
| # here to guide configurations toward known types and to make it easier to | |
| # identify "new" types. File extensions are also commonly used to indicate | |
| # content languages and encodings, so choose them carefully. | |
| # |
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 ( | |
| "errors" | |
| "fmt" | |
| "log" | |
| "os" | |
| "strconv" | |
| "sync" | |
| "time" |
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 ( | |
| "bufio" | |
| "fmt" | |
| "os/exec" | |
| "time" | |
| ) | |
| func main() { |
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 ( | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| function2() |
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
| version: '3.1' | |
| services: | |
| db: | |
| image: mysql | |
| ports: | |
| - "3306:3306" | |
| environment: | |
| MYSQL_DATABASE: morph | |
| MYSQL_USER: mysql |
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
| func debugStruct(d interface{}) { | |
| s, _ := json.MarshalIndent(d, "", "\t") | |
| fmt.Println(string(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
| package caskdb | |
| import ( | |
| "github.com/cornelk/hashmap" | |
| "math" | |
| "sync" | |
| "testing" | |
| ) | |
| type m struct { |
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 ast | |
| import os | |
| from random import randrange | |
| from graphviz import Digraph | |
| def random_color(): | |
| r = randrange(255) | |
| g = randrange(start=0, stop=10) |