This file contains hidden or 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
| # Since a pair of curly braces is used to define placeholder in an Ansible task, if the command contains curly braces it will become syntax failure. | |
| # To pass curly braces to the `command` properly `{% raw %}` can be used, but `\{\{` doesn't work. | |
| - name: Get path for the Docker volume | |
| command: docker volume inspect -f {% raw %} '{{ .Mountpoint }}' {% endraw %} docker-volume-name | |
| register: mp |
This file contains hidden or 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
| *filter | |
| -A OUTPUT -d 1.1.1.1/32 -p tcp --dport 443 -j REJECT |
This file contains hidden or 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 | |
| // This programme generates Windows Terminal colorScheme definition from minttyrc. | |
| import ( | |
| "bufio" | |
| "errors" | |
| "fmt" | |
| "io" | |
| "os" |
This file contains hidden or 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
| split -b 1G some-large-file.img "/path/to/some-large-file.img.parta" |
This file contains hidden or 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
| pipeline { | |
| agent { | |
| node { | |
| label any | |
| } | |
| } | |
| triggers { | |
| pollSCM 'H 20 * * 1-5' | |
| } |
This file contains hidden or 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
| ansible my.server -m setup |
This file contains hidden or 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
| ansible-playbook -i hosts -k -e 'ansible_python_interpreter=/usr/bin/python3' playbook.yml |
This file contains hidden or 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
| pkgfile -s msys-crypto-1.1.dll |
This file contains hidden or 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
| scrape_configs: | |
| - job_name: 'ec2' | |
| ec2_sd_configs: | |
| - region: '{{ prometheus_aws_region }}' | |
| access_key: '{{ prometheus_aws_access_key }}' | |
| secret_key: '{{ prometheus_aws_secret_access_key }}' | |
| port: 9100 | |
| refresh_interval: 1h | |
| filters: | |
| - name: 'tag:Name' |
This file contains hidden or 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
| ch := make(chan byte, 1) | |
| for p := range projs { | |
| go func() { | |
| r := getData(p) | |
| fmt.Println(r) | |
| ch <- 1 | |
| } | |
| <-ch | |
| }() |