Skip to content

Instantly share code, notes, and snippets.

View asifiqbal's full-sized avatar

ASIF IQBAL asifiqbal

View GitHub Profile
@asifiqbal
asifiqbal / Cliref.md
Created March 14, 2017 23:15 — forked from yunga/Cliref.md
CLIRef.md
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.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
@asifiqbal
asifiqbal / firewall.sh
Last active August 29, 2015 14:12 — forked from rbdcti/firewall.sh
# 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: ---