Skip to content

Instantly share code, notes, and snippets.


m.l cundi

View GitHub Profile
cundi / Tornado AsyncHTTPClient POST JSON
Created Jan 21, 2019 — forked from Integralist/Tornado AsyncHTTPClient POST JSON
[Tornado AsyncHTTPClient POST form params example] #python #tornado #post #httpclient #asynchttpclient
View Tornado AsyncHTTPClient POST JSON
# synchronous api
# response =
# except urllib.error.HTTPError as exc:
# async implementation
api_endpoint = ''
headers = {'Authorization': f'Bearer {sendgrid_api_key}',
'Content-Type': 'application/json'}
cundi /
Created Nov 4, 2018 — forked from toolness/
Python script to create server SSL certs and sign them with a custom CA.
#! /usr/bin/python
This simple script makes it easy to create server certificates
that are signed by your own Certificate Authority.
Mostly, this script just automates the workflow explained
Before using this script, you'll need to create a private
cundi /
Created Oct 31, 2018 — forked from deviantony/
VMWare Vsphere info in Python using pyvmomi
#!/usr/bin/env python
import pyVmomi
import argparse
import atexit
import itertools
from pyVmomi import vim, vmodl
from pyVim.connect import SmartConnect, Disconnect
import humanize
cundi /
Created Aug 1, 2018 — forked from fffaraz/
CS 306 - Linux/UNIX Programming
cundi /
Created Jun 5, 2018 — forked from paulirish/
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
cundi /
Created May 8, 2018 — forked from viper233/
Example using Ansible API 2.0 to run a playbook
#!/usr/bin/env python
# stolen from
import os
import sys
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory
cundi /
Created Apr 12, 2018 — forked from tuxfight3r/
python tcp socket client / server examples
import socket #for sockets
import sys #for exit
#create an AF_INET, STREAM socket (TCP)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error, msg:
print 'Failed to create socket. Error code: ' + str(msg[0]) + ' , Error message : ' + msg[1]
cundi /
Created Jan 8, 2018
demo for delete kandy user
huatang_DAK = xxx
huatang_DAS = xxx
def get_dat(dak, das):
Domain access token
url = api_host + '/v1.3/domains/accessTokens?key={0}&domain_api_secret={1}'.format(dak, das)
cundi / README.rst
Created Jun 13, 2017 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText
View README.rst

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

cundi / server-vars.yml
Created Jun 2, 2017 — forked from dangtrinhnt/server-vars.yml
Open edX server-vars.yml variables
View server-vars.yml
# variables common to the lms role, automatically loaded
# when the role is included
# These are variables that default to a localhost
# setup and are meant to be overwritten for
# different environments.
# Variables in all caps are environment specific
# Lowercase variables are internal to the role
You can’t perform that action at this time.