Skip to content

Instantly share code, notes, and snippets.

@gdelgado
gdelgado / lambda_trigger_control.sh
Last active January 22, 2017 16:51
Bash to enable or disable lambda triggers.
#!/bin/bash
usage ()
{
echo "-h, --help: Display this message"
echo "-p, --profile: AWS Profile"
echo "-r, --region: AWS Region"
echo "-n, --name: Lambda function name"
echo "-e, --enable: Enable Lambda trigger (Enable or Disable)"
}
@gdelgado
gdelgado / shutdown_vm.py
Last active August 3, 2016 13:03
pyvmomi script graceful OS shutdown.
#!/usr/bin/env python
"""
vSphere Python SDK program for shutting down VMs
"""
from __future__ import print_function
from pyVim.connect import SmartConnect, Disconnect
from pyVmomi import vim, vmodl
import argparse
@gdelgado
gdelgado / 0_reuse_code.js
Created May 26, 2016 01:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console