Skip to content

Instantly share code, notes, and snippets.

@CYPI
CYPI / whatwouldhappenon.sh
Created October 4, 2018 18:23
testing puppet branch on a remote node
#! /bin/bash
if [[ "$1" == "-h" || "$1" == "--help" ]];
then
echo "Usage: whatwouldhappenon.sh [host_name]"
echo "the script runs your puppet branch environment in noop mode on a [ host_name ] to test your changes"
echo "it grabs your branch name automatically or ask for it if it doesn't find it"
exit 0
fi
# target [host_name] where you will run puppet agent on in noop mode
SERVER=$1
@CYPI
CYPI / aws_ebs_snapshoting.py
Created August 30, 2018 21:06
script to automatically snapshot local ebs volumes. Keep a pre-define number of snapshot and update them.
import os
import sys
import time
import boto3
from botocore.exceptions import ClientError
def aws_ec2_session():
try:
session = boto3.Session(profile_name=none)
@CYPI
CYPI / nomad_alloc_vs_used.py
Created August 10, 2018 18:30
Compare container resources allocated vs resources actually used in a Nomad cluster
#!/usr/bin/env python
import requests
import sys
import json
nomad_api = 'https://localhost:4646'
def api_call(endpoint):
try:

Keybase proof

I hereby claim:

  • I am cypi on github.
  • I am cypi (https://keybase.io/cypi) on keybase.
  • I have a public key ASAvgL5HkthLtMUPHsK2lsTDRM2JC_lkqwZ6wgoi1FKEzAo

To claim this, I am signing this object: