Skip to content

Instantly share code, notes, and snippets.

View Akasurde's full-sized avatar
🌏
To the infinity and beyond

Abhijeet Kasurde Akasurde

🌏
To the infinity and beyond
View GitHub Profile
from pyVim.connect import SmartConnect, Disconnect
import ssl
import atexit
from pyVmomi import vim
def connect():
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.verify_mode = ssl.CERT_NONE
username = ''
@Akasurde
Akasurde / do.md
Created February 7, 2018 10:14
# Digital Ocean Promo Code for 2018 February / March / April 2018

Digital Ocean Promo Code for 2018 February / March / April 2018

Save $25 for your Cloud Computing Solution with Digital Ocean.

How to get the Discount?

1.) Use this link to Sign Up and save your first $10.

2.) Enter the Promocode LOWENDBOX when you choose your payment method and get another $15 discount.

@Akasurde
Akasurde / ca.md
Created November 7, 2017 15:20 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@Akasurde
Akasurde / haste.py
Created August 9, 2017 11:41 — forked from meunierd/haste.py
Hastebin Python Client
#!/usr/bin/env python
"""
Usage:
$ cat hastebin.py | ./hastebin.py
http://hastebin.com/KEY
$ ./hastebin.py hastebin.py
http://hastebin.com/KEY
"""
# 2to3 lib/ansible/modules/network/eos/eos_banner.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored lib/ansible/modules/network/eos/eos_banner.py
--- lib/ansible/modules/network/eos/eos_banner.py (original)
+++ lib/ansible/modules/network/eos/eos_banner.py (refactored)
@@ -97,7 +97,7 @@
want, have = updates
yum install -y nspr
yum install -y nspr-devel
yum install -y nss
yum install -y nss-devel
yum install -y 389-ds-base-devel
yum install -y krb5-devel
yum install libcrypto
yum install -y openssl-devel
yum install -y libuuid-devel
yum install -y libtalloc-devel
@Akasurde
Akasurde / rpm-digital-signature.sh
Created July 24, 2016 09:50 — forked from fernandoaleman/rpm-digital-signature.sh
How to sign your custom RPM package with GPG key
# How to sign your custom RPM package with GPG key
# Step: 1
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response:
@ECHO OFF
REM -- Automates cygwin installation
SETLOCAL
REM -- Change to the directory of the executing batch file
CD %~dp0
REM -- Configure our paths
SET SITE=http://mirrors.kernel.org/sourceware/cygwin/
@Akasurde
Akasurde / gist:ae0804f368b8ea3ee729
Created February 19, 2016 06:14
Self Signed Certificate
mkdir alias
certutil -N -d ./alias/
certutil -S -s "CN=CA Issuer" -n CACert -x -t "CT,C,C" -v 120 -m 1234 -d alias/
@Akasurde
Akasurde / gist:31170f5f25fc79700238
Created October 29, 2015 09:51
Installing vagrant-libvirt on RHEL 7 and CentOS 7
wget https://copr.fedoraproject.org/coprs/purpleidea/vagrant-libvirt/repo/epel-7/purpleidea-vagrant-libvirt-epel-7.repo -O /etc/yum.repos.d/vagrant-libvirt.repo
yum install -y vagrant-libvirt