Skip to content

Instantly share code, notes, and snippets.

View hongmengwang's full-sized avatar
Enjoy Coding

Hongmeng Wang hongmengwang

Enjoy Coding
View GitHub Profile
hongmengwang / my.sublime3
Last active December 17, 2021 19:20 — forked from tucq88/Sublime Text 3 | Eclipse - Shortcuts
macOS Eclipse shortcuts key bindings for Sublime Text 3
{ "keys": ["super+shift+w"], "command": "close_all" },
{ "keys": ["super+shift+s"], "command": "save_all" },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["super+alt+j"], "command": "join_lines" },
{ "keys": ["super+alt+down"], "command": "duplicate_line" },
{ "keys": ["shift+super+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
hongmengwang / default.yaml
Last active June 2, 2023 09:01
kind: IstioControlPlane
tag: 1.4.3
defaultNamespace: istio-system
# Traffic management feature
enabled: true
# This chart is compatible with different images, please choose one
repository: datadog/agent # Agent6
# repository: datadog/dogstatsd # Standalone DogStatsD6
tag: latest # Use 6.3.2-jmx to enable jmx fetch collection
pullPolicy: Always
## It is possible to specify docker registry credentials
## See
# pullSecrets:
# - name: regsecret
hongmengwang /
Last active March 18, 2018 08:33
Install Mesos/Marathon

Compute Engine: n1-standard-1 (1 vCPU, 3.75 GB, Intel Ivy Bridge, asia-east1-a region)

OS: CentOS 7

  • master
  • slave1
  • slave2
  • slave3


hongmengwang /
Created January 24, 2018 04:54 — forked from bastman/
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

hongmengwang / blog-compose.yml
Created January 22, 2018 11:17
Deploy apps with docker swarm
version: "3"
image: "mysql:5.7"
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0
hongmengwang /
Created January 22, 2018 09:50
proxy Aliyun's domain to AWS's server

I registed my domain "" on Aliyun, and applied free EC2 server for one year on AWS.

After building my blog on AWS, I set A parse to the server's IP of AWS.

But yesterday I received email from Aliyun which said that my server was not in Aliyun after they checking, it was not allowed, I have to miggrate my blog server to Aliyun, otherwise they will undo my authority number.

After thinking about this, for saving money(Aliyun is not free for one year), I solved it by the way below:

1.Set A parse to my friend's server ip which was bought in Aliyun.
hongmengwang /
Last active March 18, 2018 08:33
prevent web site being mirrored

I thought something before, when I check nginx's log, I found a wired hostname.

After checking, I think out website was mirrored.

I think they parsed their domain by CNAME to our domain, and we don't do any host check at that time.

To prevent being mirrored again, I add host check configuration in nginx.conf

set $flag 0;
hongmengwang /
Created January 22, 2018 09:38
replace yum repository on redhat6

1. delete yum repo on redhat6

rpm -aq | grep yum|xargs rpm -e --nodeps

2. download centos's rpm packages

hongmengwang /
Last active March 18, 2018 08:33
test task to do

Task list of Hongmeng Wang blog

  • Apply domain
  • Apply server
  • Apply https certificate
  • Build blog with docker-compose/wordpress
  • Write post
  • Continous