Docker使用小结

搭建redis服务器 docker run -p 6379:6379 -v redis_data:/data --name redis -d redis:latest 搭建mongo服务器 docker run -p 27017:27017 -v mongo_data:/data/db --name mongo -d mvertes/alpine-mongo crcom爬虫 编译生成docker镜像 docker build -t crcom:latest . 生成dock [Read More]

Nexus6p_刷入magisk

TWRP msgisk magisk manager magisckSU magisk Hide resetprop Magisk 主页 v18.0 https://forum.xda-developers.com/apps/magisk https://github.com/topjohnwu/Magisk/releases TWRP Nexus 6p https://dl.twrp.me/angler/ https://twrp.me/Devices/ 1. 手动进入bootloaer adb reboot bootloaer 2. 开启oem解锁 fastboot oem unlock //fastboot flashing unlock 3. 开始root操作 [Magisk-v18.0.zip 拷贝到手机下载目录] [Read More]

Go笔记补充

11. try err的方式 if data, err := func (); err != nil{ }else{ } 22. slice s2 = append(s2[:3], s2[4:]…) 33. struct 工厂函数 func createTreeNode(value int) *TreeNode{ return &TreeNode{value:value} } 1. type( byte int8 rune int32 ) 2. iota 同行 位同一值;碰到const io [Read More]

Kubernetes

install minikube brew cask install minikube brew install docker-machine-driver-hyperkit sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit sudo chmod u+s /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit minikube config set vm-driver hyperkit minikube start minikube dashboard //Deployment 是管理 Pod 创建和伸缩的推荐方法。 //kubectl run hello-node --image=hello-node:v1 --port=8080 kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node kubectl get deployments kubectl get pods kubectl get events kubectl config view kubectl expose deployment hello-node --type=LoadBalancer --port=8080 [Read More]

Anki服务器搭建

服务器搭建 export ANKI_SYNC_DATA_DIR=~/anki-sync-server-docker-data mkdir -p "$ANKI_SYNC_DATA_DIR" docker run -it \ --mount type=bind,source="$ANKI_SYNC_DATA_DIR",target=/app/data \ -p 27701:27701 \ --name anki-container \ --rm \ kuklinistvan/anki-sync-server:latest 创建用户 # docker exec -it anki-container /bin/sh /app/anki-sync-server # ./ankisyncctl.py --help usage: ./ankisyncctl.py <command> [<args>] Commands: adduser <username> - add a new user deluser <username> - delete a user lsuser - list users passwd <username> - change password of a user [Read More]

Google_cloud_functions

setting up a gcp project create a new gcp project https://console.cloud.google.com/cloud-resource-manager go to the https://console.cloud.google.com/functions/list , you may have to enable biling Enable the cloud functions api install gcloud CLI https://cloud.google.com/sdk/docs/ update gcloud components update gcloud components install beta config gcloud config set project <PROJECT_ID> confirm gcloud functions list hello world as service create a folder and edit go file mkdir cloud-functions-golang cd cloud-functions-golang vim helloworld. [Read More]

Mongodb使用场景

用在一些第三方信息的获取或者抓取,因为MongoDB的schema-less,所有格式灵活,不用为了各种格式不一样的信息专门设计统一的格式, [Read More]

Py_chromeHeadless操作

Chrome DevTools Protocol Chrome DevTools Protocol https://github.com/ChromeDevTools/devtools-protocol API 文档 https://chromedevtools.github.io/devtools-protocol/ 本地启动Headless Chrome docker run -it --rm --name alpine-chrome -p 9222:9222 einverne/alpine-chrome //启动之后可以访问。http://localhost:9222/json [Read More]

Ansible_docker

1. brew install ansible 2. //配置服务器; 默认的文件路径为 /etc/ansible/hosts [DevWorker] 192.168.0.0 192.168.0.1 [DevMaster] 192.168.0.2 3. Playbook命令集 - hosts: all tasks: - name: yum更新 shell: yum -y update - name: 设置repository shell: [Read More]