- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml- using inventory:
127.0.0.1 ansible_connection=local| gcloud compute instance-groups unmanaged create taiwan \ | |
| --zone asia-east1-a | |
| gcloud compute instance-groups unmanaged add-instances taiwan \ | |
| --instances $(kubectl get nodes \ | |
| --context taiwan \ | |
| --output=jsonpath='{range .items[*]}{.metadata.name},{end}') \ | |
| --zone asia-east1-a | |
| gcloud compute instance-groups set-named-ports taiwan \ |
ansible-playbook --connection=local 127.0.0.1 playbook.yml127.0.0.1 ansible_connection=local| # File: etc/default/docker | |
| # Use DOCKER_OPTS to modify the daemon startup options. | |
| #DOCKER_OPTS="" | |
| DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock" |
| Movement: | |
| j, k down, up | |
| h, l left, right (in some contexts) | |
| space page down | |
| pg up/down page up/down | |
| arrows up, down, left, right |
| MAKE := make --no-print-directory | |
| DESCRIBE := $(shell git describe --match "v*" --always --tags) | |
| DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE)) | |
| VERSION_TAG := $(word 1,$(DESCRIBE_PARTS)) | |
| COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS)) | |
| VERSION := $(subst v,,$(VERSION_TAG)) | |
| VERSION_PARTS := $(subst ., ,$(VERSION)) |
| <?php | |
| function slugify($string, $toLower = true) { | |
| $rules = "Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove;"; | |
| if ($toLower) { | |
| $rules .= ' Lower();'; | |
| } | |
| $string = transliterator_transliterate($rules, $string); | |
| // Remove repeating hyphens and spaces (e.g. 'foo---bar' becomes 'foo-bar') |
| # create exchange | |
| curl -i -u guest:guest -H "content-type:application/json" \ | |
| -XPUT -d'{"type":"fanout","durable":true}' \ | |
| http://localhost:15672/api/exchanges/%2f/my.exchange.name | |
| # create queue | |
| curl -i -u guest:guest -H "content-type:application/json" \ | |
| -XPUT -d'{"durable":true,"arguments":{"x-dead-letter-exchange":"", "x-dead-letter-routing-key": "my.queue.dead-letter"}}' \ | |
| http://localhost:15672/api/queues/%2f/my.queue |
| SELECT | |
| tmp.ipAddress, | |
| -- Calculate how many connections are being held by this IP address. | |
| COUNT( * ) AS numConnections, | |
| -- For each connection, the TIME column represent how many SECONDS it has been in | |
| -- its current state. Running some aggregates will give us a fuzzy picture of what | |
| -- the connections from this IP address is doing. | |
| FLOOR( AVG( tmp.time ) ) AS timeAVG, |
| name: Minimal Android CI Workflow | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - 'v*' | |
| jobs: |