This file contains 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 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 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 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 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 logging | |
import os | |
import pickle | |
from concurrent.futures import ThreadPoolExecutor | |
from os import path | |
from urllib.parse import urlparse | |
import requests | |
from bs4 import BeautifulSoup |
This file contains 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 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 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 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 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" |