- Puppetlabs -> Chef
- Reductive Labs -> Opscode
- Puppet Master -> Chef Server
- Puppet Agent -> Chef Client
- Forge -> Supermarket
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 | |
module=$1 | |
for resource in `terraform show -module-depth=1 | grep module.${module} | tr -d ':' | sed -e 's/module.${module}.//'`; do | |
terraform taint -module ${module} ${resource} | |
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 -eo pipefail | |
## Allows for creation of "Basic" DNS records in a Route53 hosted zone | |
function main() { | |
record_name=$1 | |
record_value=$2 | |
[[ -z $record_name ]] && echo "record_name is: $record_name" && exit 1 | |
[[ -z $record_value ]] && echo "record_value is: $record_value" && exit 1 |
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
{ | |
"Metadata": { | |
"DcosImageCommit": "fb58e5c0a02fe44e8df2baf92de72bea3030f34b", | |
"TemplateGenerationDate": "2015-06-05 23:02:57.870011" | |
}, | |
"Description": "Launching the Mesosphere DCOS cluster", | |
"Parameters": { | |
"AcceptEULA": { | |
"Type": "String", | |
"Description": "Please read and agree to our EULA: https://docs.mesosphere.com/community-edition-eula/", |
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
aws ec2 describe-volumes | jq -r '.Volumes[] | select((.State == "available") and (.Size == 8)) | .VolumeId' | xargs -n 1 aws ec2 delete-volume --volume-id | jq -r '.return' |
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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "CloudFormation template for a generic VPC with public and private subnets (with private network Internet access via NAT)", | |
"Parameters" : { | |
"KeyPairName" : { | |
"Description" : "Name of an existing EC2 KeyPair (find or create here: https://console.aws.amazon.com/ec2/v2/home#KeyPairs: )", | |
"Type" : "String", |
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
#!/usr/bin/env ruby | |
require 'rest_client' | |
@username = URI.encode_www_form_component('username') | |
@password = URI.encode_www_form_component('password') | |
@host = 'yoursite.service-now.com' | |
def uri(table = @table) | |
return URI::HTTPS.build( { |
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
$ puppet resource user justin | |
user { 'justin': | |
ensure => 'present', | |
comment => 'Justin Clayton', | |
gid => '20', | |
groups => ['_appserveradm', '_appserverusr', '_lpadmin', 'access_bpf', 'admin'], | |
home => '/Users/justin', | |
password => '*', | |
shell => '/bin/zsh', | |
uid => '501', |
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 | |
aws ec2 describe-volumes \ | |
| jq '.Volumes[] \ | |
| select((.State == "available") and (.Size == 8)) \ | |
| .VolumeId' \ | |
| xargs -n 1 aws ec2 delete-volume --volume-id |
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
## janky theme | |
# | |
# based on https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/blinks.zsh-theme | |
# certain things cribbed from https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/agnoster.zsh-theme | |
function _battery_capacity { | |
ioreg -n AppleSmartBattery -r | \ | |
awk '$1~/Capacity/{c[$1]=$3} END{OFMT="%.2f%%"; max=c["\"MaxCapacity\""]; print (max>0? 100*c["\"CurrentCapacity\""]/max: "")}' | |
} |