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 | |
# Exchange an external key with the AWS KMS API | |
openssl rsautl -encrypt \ | |
-in $1 \ | |
-oaep \ | |
-inkey $2 \ | |
-keyform DER \ | |
-pubin \ | |
-out $3 |
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 | |
# 2017 - Gordon Young : [email protected] | |
# Bash shell script for generating self-signed certs. | |
# Script accepts a single argument, the fqdn (DNS name) for the cert | |
# ./gencert.sh www.test.local | |
unameOut="$(uname -s)" | |
case "${unameOut}" in | |
Linux*) machine=Linux;; |
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 | |
ffmpeg -i $1 -vf "scale=min(iw\,600):-1" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 --colors 128 > $1.gif |
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
package main | |
import ( | |
"fmt" | |
"bytes" | |
"io/ioutil" | |
"net/http" | |
) | |
func main() { |
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 | |
vpcs=$(eval 'aws ec2 describe-vpcs | jq -r ".Vpcs[] | .VpcId"') | |
for i in $vpcs | |
do | |
sgviz generate --format=png --output-path $i --region us-west-2 --vpc-ids $i | |
done |
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/python | |
# -*- coding: utf-8 -*- | |
# Gordon Young 2017 github_api_get_issues.py | |
import ssl | |
import urllib2 | |
import json | |
import csv | |
# Create a fake SSL context to ignore the certificate error |
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
# Call the VGS proxy | |
# Argument $! is an FPE token value, result is clear text value | |
curl -s https://httpbin.verygoodsecurity.io/post -k \ | |
-x {0}:{1}@{sometenant}.{environment}.verygoodproxy.com:8080 \ | |
-H "Content-type: application/json" \ | |
-d '{"CCN": "'$1'"}' | jq --raw-output '.data' | jq --raw-output '.CCN' | |
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
# Call the VGS proxy | |
# Argument $! is a clear text value, result is an FPE token value | |
curl -s https://{some-tenant}.environment.verygoodproxy.com/post \ | |
-H "Content-type: application/json" \ | |
-d '{"CCN": "'$1'"}' | jq --raw-output '.data' | jq --raw-output .CCN |
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
node { | |
def mvnHome | |
stage('Preparation') { // for display purposes | |
// Get some code from a GitHub repository | |
git 'https://github.com/gjyoung1974/Secure_Connection_Pool.git' | |
// Get the Maven tool. | |
// ** NOTE: This 'M3' Maven tool must be configured | |
// ** in the global configuration. | |
mvnHome = tool 'M3' | |
} |
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
/** | |
* Gordon Young 2012 Microsoft© Corporation UserAdd.js A script to create local | |
* users, remove local users, and update passwords The actual maintenance work | |
* begins in the section: ***Start of script:*** v0.10092012 | |
*/ | |
// Collect some environment variables: | |
var objShell = new ActiveXObject("WScript.Shell"); | |
var objNetwork = WScript.CreateObject("Wscript.Network"); | |
var strComputer = objNetwork.ComputerName; |