This file contains 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
jq '.modules[].resources | to_entries[] | select(.value.type == "aws_security_group_rule" or .value.type == "aws_security_group")' test.json |
This file contains 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 | |
# query the root of the repo because git status prints | |
# relative paths within the repo | |
if ! pushd "`git rev-parse --show-toplevel`" >/dev/null | |
then | |
echo "git rev-parse --show-toplevel failed to return the root dir of the repo" | |
exit 1 | |
else | |
gitroot=`pwd` |
This file contains 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
for u in $(jq --raw-output ". | .[]" < members.json); do | |
clear; | |
echo Inviting user ${u}; | |
curl -i -X GET "https://slack.com/api/channels.invite?token=${API_TOKEN}&channel=${CHANNEL}&user=${u}" | head -n 20; | |
sleep 1; | |
done; |
This file contains 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 | |
read -p "Registry to clone from: " pull_registry | |
read -p "Username for $pull_registry: " user | |
read -s -p "Password for $pull_registry: " password | |
echo | |
read -p "Registry to clone onto: " push_registry | |
echo Querying $pull_registry... |
This file contains 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
:: Name: MsDepSvc.Port.cmd | |
:: Purpose: Modifies the TCP/IP port that the Web Deployment Agent Service | |
:: (MsDepSvc) listens on. Tested on Win7 Enterprise 32-bit. | |
:: Author: stevejansen_github@icloud.com | |
:: Revision: January 2013 | |
@ECHO OFF | |
SETLOCAL ENABLEEXTENSIONS | |
SETLOCAL ENABLEDELAYEDEXPANSION |
This file contains 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 | |
# exports DNS records from Rackspace Cloud DNS to text files | |
# Depends on https://github.com/wichert/clouddns/blob/master/src/clouddns.py | |
set -e | |
me=export-zone | |
base_domain= | |
rackspace_region= | |
rackspace_rate_limit_delay=3 |
This file contains 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
:: Name: Windows Startup.cmd | |
:: Purpose: A logon script to SUBST drive letters, wipe %TEMP%, and run defrag | |
:: Author: stevejansen_github@mac.com | |
:: Revision: April 2012 | |
@ECHO OFF | |
SETLOCAL | |
:: map local folders to drive letters | |
CALL :MAPDRIVE P: "%USERPROFILE%\Documents\Visual Studio 2010\Projects" |
This file contains 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
:: Name: Startup.Cmd.cmd | |
:: Purpose: Initializes a Windows command prompt shell | |
:: Author: stevejansen_github@mac.com | |
:: Revision: April 2012 | |
@ECHO OFF | |
SETLOCAL ENABLEEXTENSIONS | |
:: self-install this script, but, don't force an overwrite if an auto run script is already configured | |
IF /I "%~1"=="/install" ( |
This file contains 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
token_helper = "/Users/me/.vault-helper" |
This file contains 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 | |
stash() { | |
# check if we have uncommited changes to stash | |
git status --porcelain | grep "^." >/dev/null; | |
if [ $? -eq 0 ] | |
then | |
if git stash save -u "git-update on `date`"; | |
then |