Author Archives: Huang Shiyang

How to upload a file to Google Drive from the command line

I’ve been looking at several linux projects here recently, such as LibreNMS, and you’ll need to be sure you are backing them up. I wanted to quickly backup a compressed copy of my LibreNMS install and so I went looking for a super easy way to... Read More | Share it now!

Ansible 用 Vault 管理敏感资料

导入 Ansible 组态工具,多少会使用明文 (Plain text) 在 Playbooks 里存放敏感资料 (sensitive data) 1,更别说我们还会搭配 Git 版本系统使用,这很可能会造成潜在的资安风险!接下来冻仁将通过 Vault... Read More | Share it now!

Ansible

https://www.w3cschool.cn/automate_with_ansible/automate_with_ansible-db6727oq.html ... Read More | Share it now!

io — Core tools for working with streams

https://docs.python.org/3/library/io.html Overview The io module provides Python’s main facilities for dealing with various types of I/O. There are three main types of I/O: text I/O, binary I/O and raw I/O. These are... Read More | Share it now!

Google Cloud Registry (GCR) with external Kubernetes

For information about how to pull from other private registries, see the following topics: Docker Hub private repository with Kubernetes Amazon EC2 Container Registry (ECR) with Kubernetes If you run Kubernetes on Google Cloud Platform (GCP), Google... Read More | Share it now!

Comparison method violates its general contract!

源码 list.sorted((o1, o2) -> { return o1.getCreateTime().getTime() -... Read More | Share it now!

Pull image from private registry

https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ Create a Secret based on existing Docker credentials A Kubernetes cluster uses the Secret of docker-registry type to authenticate with a container... Read More | Share it now!

Elasticsearch python client

https://elasticsearch-py.readthedocs.io/en/master/ from datetime import datetime from elasticsearch import Elasticsearch es = Elasticsearch() doc = { 'author': 'kimchy', 'text': 'Elasticsearch: cool. bonsai cool.', 'timestamp':... Read More | Share it now!