Skip to content

Instantly share code, notes, and snippets.

Suresh Prajapati toddlers

Block or report user

Report or block toddlers

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
innovia /
Created Dec 17, 2017
Lambda concurrent execution custom metric on CloudWatch
#!/usr/bin/env python
import boto3
import datetime
import time
rkrzr /
Last active Oct 15, 2019
Automatically generate ansible tags of the same name for each role in a playbook
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin:
irvingpop /
Last active Sep 12, 2019
Terraform external data source example - dynamic SSH key generation
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use:
# "${data.external.ssh_key_generator.result.public_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key_file}" (path)
data "external" "ssh_key_generator" {
program = ["bash", "${path.root}/../"]
query = {
customer_name = "${var.customer_name}"
customer_group = "${var.customer_group}"
so0k /
Last active Nov 15, 2019
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
julz / main.go
Created Nov 20, 2015
containersched minicontainer
View main.go
package main
import (
func main() {
pablitoc /
Last active Oct 24, 2017
Configuring Proxy Protocol

##Install AWS CLI Tools##

  1. Install AWS CLI Tools. You can also use the EC2 API Tool if you are more comfortable with them. But this write-up uses the EC2 CLI.
  2. Create a user via Amazon IAM or download the security accessID and securitykey you will need it to query Amazon CLI.
  3. using Terminal cd into .aws directory cd ~/.aws edit or create new file named config paste the following contents inside.
    `aws_access_key_id = ACCESS_ID`
    `aws_secret_access_key = SECRET_ID`
    `output = json OR bson OR text`

Save the file as "config"

kcd83 / gist:79030f14be869f4884d0
Last active Aug 29, 2015 — forked from tehranian/gist:7123269
Allow SSH on ports other than 22 and create the directory
View gist:79030f14be869f4884d0
# High-performance, native SSH implementation for Jenkins SSH slaves. Jenkins'
# standard turn-key SSH slave implementation uses an embedded, "pure Java"
# implementation of SSH (
# That standard implementation combines all of the convenience of a pure Java
# implementation with all of the "performance" of a pure Java implementation :P
# If your distributed build process generates large build artifacts like ISOs,
# VM images, Vagrant boxes, etc, then you will see a substantial benefit from
davidkelley / network.template
Created Apr 13, 2014
AWS Cloudformation that launches Private and Public Subnets inside a configured VPC complete with a Bastion Host
View network.template
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Creates networking infrastructure.",
"Parameters" : {
"BastionKeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the bastion host",
"Type" : "String",
regit / Netfilter-dashboard
Created Mar 23, 2014
Netfilter Kibana Dashboard
View Netfilter-dashboard
"title": "Netfilter Logs",
"services": {
"query": {
"list": {
"0": {
"query": "dvc:*",
"alias": "Netfilter",
"color": "#7EB26D",
"id": 0,
You can’t perform that action at this time.