NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
_________ _____ _______________ _____
\_ ___ \\ \\___________ \____ / ____\ ~/.bash/cliref.md
/ \ \/| | | || _/ __ \ __\ copy/paste from whatisdb
\ \___|__ |_|_ || | \ __/|_ | http://pastebin.com/yGmGiDQX
\________ /_____ \_||____|_ /____ /_| yunga.palatino@gmail.com
20160515 \/ 1527 \/ \/ \/
alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'
| from __future__ import print_function | |
| from pyVim import connect | |
| from pyVmomi import vim | |
| si = connect.SmartConnect(host='vcsa', user='my_user', pwd='my_password') | |
| content = si.RetrieveContent() | |
| # A list comprehension of all the root folder's first tier children... | |
| datacenters = [entity for entity in content.rootFolder.childEntity |
| # Drop ICMP echo-request messages sent to broadcast or multicast addresses | |
| echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts | |
| # Drop source routed packets | |
| echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route | |
| # Enable TCP SYN cookie protection from SYN floods | |
| echo 1 > /proc/sys/net/ipv4/tcp_syncookies | |
| # Don't accept ICMP redirect messages |
| --- | |
| # ^^^ YAML documents must begin with the document separator "---" | |
| # | |
| #### Example docblock, I like to put a descriptive comment at the top of my | |
| #### playbooks. | |
| # | |
| # Overview: Playbook to bootstrap a new host for configuration management. | |
| # Applies to: production | |
| # Description: | |
| # Ensures that a host is configured for management with Ansible. |
| #!/bin/bash -x | |
| #=============================================================================== | |
| # | |
| # FILE: percona-xtrabackup.sh | |
| # | |
| # USAGE: ./percona-xtrabackup.sh | |
| # | |
| # DESCRIPTION: Forked from https://gist.github.com/jaygooby/5208373 | |
| # | |
| # OPTIONS: --- |