This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"admin_user": "{{env `ADMIN_USER`}}", | |
"admin_password": "{{env `ADMIN_PASSWORD`}}", | |
"source_image": "{{env `SOURCE_IMAGE`}}", | |
"image_family": "{{env `IMAGE_FAMILY`}}", | |
"project_id": "{{env `PROJECT_ID`}}", | |
"network_id": "{{env `NETWORK_ID`}}" | |
}, | |
"_comment": "Packs an image of Windows Server for GCP", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
servers = [ | |
{ | |
:name => "k8s-master", | |
:type => "master", | |
:box => "centos/7", | |
:box_version => "1902.01", | |
:eth0 => "192.168.122.50", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
brew install ffmpeg | |
brew cask install xquartz #dependency for gifsicle, only required for mountain-lion and above | |
open /usr/local/Cellar/x-quartz/2.7.4/XQuartz.pkg # runs the XQuartz installer (YOU NEED TO UPDATE THE PATH) | |
brew install gifsicle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
minikube stop | |
minikube delete | |
rm -r -f $HOME/.minikube | |
minikube config set cpus 4 | |
minikube config set memory 8196 | |
minikube config set vm-driver hyperkit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get current status of git repo | |
function parse_git_dirty { | |
status=`git status 2>&1 | tee` | |
dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"` | |
untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"` | |
ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"` | |
newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"` | |
renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"` | |
deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"` | |
bits='' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This script gets a population of closed pull requests | |
from github import Github | |
import pandas as pd | |
from datetime import datetime | |
git_hub = Github("") | |
repo = git_hub.get_repo("") | |
pulls = repo.get_pulls(state='closed', sort='created', direction='desc') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This script gets a population of closed pull requests | |
from github import Github | |
import pandas as pd | |
from datetime import datetime | |
git_hub = Github("") | |
repo = git_hub.get_repo("") | |
pulls = repo.get_pulls(state='closed', sort='created', direction='desc') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Count total EBS based storage in AWS | |
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add" | |
# Count total EBS storage with a tag filter | |
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add" | |
# Describe instances concisely | |
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]' | |
# Wait until $instance_id is running and then immediately stop it again | |
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id | |
# Get 10th instance in the account |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# print reuests from inbound HTTP methods GET, POST, PUT, and DELETE | |
# expose your service to the interwebs via http://serveo.net/ | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create a High Sierra ISO for CICD stuffs | |
hdiutil create -o /tmp/Mojave.cdr -size 7500m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
sudo '/Applications/Install macOS Mojave.app/Contents/Resources/createinstallmedia' --volume /Volumes/install_build --nointeraction --downloadassets | |
mv /tmp/Mojave.cdr.dmg ~/Desktop/InstallSystem.dmg | |
hdiutil detach /Volumes/Install\ macOS\ Mojave | |
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/Mojave.iso |