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
variable "tcp" { default = [42, 53, 88, 135, 137, 139, 389, 445, 636, 1512, 3268, 3269] } | |
variable "udp" { default = [42, 53, 88, 135, 137, 138, 389, 445, 1512] } | |
resource "aws_security_group" "active_directory" { | |
name = "active_directory" | |
description = "Allow AD Protocols" | |
vpc_id = "${module.aws_networks.vpc}" | |
tags { | |
Name = "active_directory_sg" | |
} |
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 -e | |
# I wonder how much easier this is to do with Terraform :) | |
pw=$(openssl rand -base64 8) | |
ORG=${ORG:=dev} | |
AZ_LOCATION=${AZ_LOCATION:=eastus} | |
RESGROUP=${ORG}ADFSRG | |
# Resource Group must be created first. | |
az group create -l $AZ_LOCATION --name $RESGROUP |
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
irb(main):001:0> 3 - 0 % 3 - 1 | |
=> 2 | |
irb(main):002:0> 3 - 1 % 3 - 1 | |
=> 1 | |
irb(main):003:0> 3 - 2 % 3 - 1 | |
=> 0 | |
irb(main):004:0> 3 - 3 % 3 - 1 | |
=> 2 | |
irb(main):005:0> 3 - 4 % 3 - 1 | |
=> 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
#!/bin/sh | |
yes | sudo pkg install gcc-6 autotools wget gmake pcre openssl | |
sudo portsnap fetch | |
sudo portsnap extract | |
cd /usr/ports/www/nginx | |
sudo OPTIONS_DEFAULT='DSO FILE_AIO HTTP HTTP_ADDITION HTTP_AUTH_REQ HTTP_CACHE HTTP_GZIP_STATIC HTTP_REALIP HTTP_REWRITE HTTP_SSL HTTP_STATUS THREADS HTTP_UPSTREAM_CHECK HTTP_UPSTREAM_FAIR HTTP_UPSTREAM_STICKY NAXSI' make config && sudo make && sudo make package |
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
provider "aws" {} | |
data "aws_region" "current" { | |
current = true | |
} | |
data "aws_availability_zones" "available" {} |
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 | |
set -o errexit -o errtrace -o pipefail | |
trap signal_and_exit ERR | |
function my_instance_id | |
{ | |
curl -sL http://169.254.169.254/latest/meta-data/instance-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
#!/bin/bash -e | |
host=$1; shift | |
uri="rdp://full%20address=s:$host" | |
# Redirect | |
uri="${uri}&redirectdrives=i:1" | |
uri="${uri}&redirectclipboard=i: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
#!/bin/bash -e | |
# Install prerequisites | |
sudo apt-get -qq update && \ | |
sudo apt-get -yqq install \ | |
git-core \ | |
cmake \ | |
build-essential \ | |
g++ \ | |
zlib1g-dev \ |
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
kind: PersistentVolume | |
apiVerison: v1 | |
metadata: | |
name: jenkins-pv-us-west-2a | |
labels: | |
jenkins: master | |
spec: | |
capacity: | |
storage: 80Gi | |
accessModes: |
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
println "Running plugin enumerator" | |
println "" | |
def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins() | |
plugins.each {println "- ${it.getShortName()}:${it.getVersion()}"} | |
println "" | |
println "Total number of plugins: ${plugins.size()}" | |
println "" | |
println "Jenkins Users" |