Skip to content

Instantly share code, notes, and snippets.

Vinod Chandru vinodc

Block or report user

Report or block vinodc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vinodc
vinodc / ke_config_skel.sh
Created Jun 27, 2019 — forked from david-thorman/ke_config_skel.sh
Kloudless Enterprise configuration file skeleton generator
View ke_config_skel.sh
#!/bin/bash
set -eu -o pipefail
gen_priv() {
openssl genrsa 2048 2> /dev/null
}
gen_pub() {
echo "${1}" | openssl rsa -pubout 2> /dev/null
}
@vinodc
vinodc / azure-key-credentials.py
Created Aug 23, 2017
Python script to print out information to configure an Azure app's keyCredentials entry.
View azure-key-credentials.py
#!/usr/bin/env python
import os
import sys
from base64 import b64encode
from uuid import uuid4
try:
from cryptography import x509
from cryptography.hazmat.backends import default_backend
@vinodc
vinodc / vmfusion.sh
Created May 24, 2016
Shell script to run VMware VM in headless mode.
View vmfusion.sh
#!/bin/sh
# Modified version of:
# http://tech.namshi.com/blog/2015/08/02/vmware-fusion-headless/
# See above for adding `vmrun` to your path.
if [ -z "$vmFile" -a -f *.vmx ]
then
vmFile=`ls *.vmx | head -n 1`
echo "vmFile set to $vmFile."
@vinodc
vinodc / kloudless-upload-location-iam-policy.json
Last active Aug 29, 2015
Kloudless Upload Location IAM Policy JSON
View kloudless-upload-location-iam-policy.json
{
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetObjectAcl",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:ListBucket"
@vinodc
vinodc / kloudless_webhooks.py
Last active Jul 8, 2019
Simple Kloudless API webhooks receiver for testing purposes
View kloudless_webhooks.py
#!/usr/bin/env python
"""
This is a simple webhooks receiver for testing purposes. It should NOT be used on
production as it does not verify the sender. For an example that does, check out
http://blog.kloudless.com/2014/10/19/getting-started-with-kloudless-webhooks/
To install dependencies and run:
$ pip install flask
@vinodc
vinodc / ipsec.secrets
Created Dec 30, 2014
/etc/ipsec.secrets, /etc/ipsec.secrets.d/us-west-2.secrets
View ipsec.secrets
# /etc/ipsec.secrets
# Add the location of our secrets files.
include /etc/ipsec.secrets.d/*
@vinodc
vinodc / us-west-2.conf
Last active Aug 29, 2015
/etc/ipsec.d/us-west-2.conf
View us-west-2.conf
# /etc/ipsec.d/us-west-2.conf
conn us-west-2
auto=start
type=tunnel
# right is remote
right=REMOTE_ELASTIC_IP
rightid=@REMOTE_PRIVATE_SUBNET
rightsubnet=REMOTE_PRIVATE_SUBNET
# left is local
@vinodc
vinodc / 99-openswan.conf
Created Dec 30, 2014
/etc/sysctl.d/99-openswan.conf
View 99-openswan.conf
# /etc/sysctl.d/99-openswan.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.default.send_redirects = 0
View lazy_dict.py
# Wrote this before realizing django.utils.functional.lazy existed.
class LazyDict(dict):
"""
Loads data lazily.
"""
def __init__(self, loader, *args, **kwargs):
self._data_loaded = False
self.loader = loader
super(LazyDict, self).__init__(*args, **kwargs)
@vinodc
vinodc / file-explorer.html
Created Oct 10, 2014
Kloudless File Explorer example implementation
View file-explorer.html
<!DOCTYPE html>
<html>
<head>
<title>File Explorer</title>
</head>
<body>
<!--
Throw in the HTML from the JSFiddle's HTML tab here.
The JSFiddle is at http://jsfiddle.net/pseudonumos/PB565/embedded/
-->
You can’t perform that action at this time.