Skip to content

Instantly share code, notes, and snippets.

View Jlaird's full-sized avatar

Jeremy Laird Jlaird

  • Endeavor Business Media
  • Fort Atkinson
View GitHub Profile
#!/bin/bash
months=(
"01"
"02"
"03"
"04"
"05"
"06"
"07"
@Jlaird
Jlaird / mongo_move_ebm.sh
Last active May 26, 2020 13:58
mongo move
#!/bin/bash
accounts=(
'as3_baseplatform'
'as3_clarity'
'cygnus_cavc'
'cygnus_cpa'
'cygnus_fhc'
'cygnus_ll'
'cygnus_mass'
#!/bin/bash
# Loops over hostzone and gets NS records and updates NameServers to match.
echo $1
for domain in $(cli53 export $1 |grep NS); do
if [[ $domain =~ 'ns-' ]]; then
ns_list+=($domain)
fi
done
#!/bin/bash
mkdir clean
for file in *.txt; do
#Remove .txt from end of files
domain=${file%".txt"}
cli53 create $domain --comment 'Gallo'
#!/bin/bash
mkdir clean
for file in *.txt; do
#Remove .txt from end of files
domain=${file%".txt"}
cli53 create $domain --comment 'Gallo'
@Jlaird
Jlaird / Route53-Transfer-Zone.sh
Last active October 8, 2018 15:25
Used to move zones from one AWS account to another. ./Route53-Transfer-Zone.sh domain.com
#!/bin/bash
# External AWS Key
export AWS_ACCESS_KEY_ID="123456"
export AWS_SECRET_ACCESS_KEY="123456"
# Export bind file
cli53 export --full --debug $1 > $1.bind
# Set Key's to blank so your system key is used
extension = "newrelic.so"
newrelic.enabled = true
newrelic.error_collector.record_database_errors = true
newrelic.browser_monitoring.auto_instrument = false
newrelic.capture_params = true
newrelic.transaction_tracer.record_sql = "raw"
node {
dir("${env.BUILD_NUMBER}") {
try {
docker.withRegistry('https://registry.hub.docker.com', 'docker-registry-login') {
stage("Copy Artifact") {
step ([$class: 'CopyArtifact', projectName: 'Platform/master']);
}
def myDocker = docker.image("registry.hub.docker.com/scomm/php5.6:latest")
myDocker.pull()
@Jlaird
Jlaird / build_vhosts.sh
Created June 7, 2017 16:15
Generate vhosts and certs for Nginx
#!/bin/bash
subdomains="r1,r2,r3"
domains=$(cat /etc/nginx/domain_list)
domains=(${domains//,/ })
subdomains=(${subdomains//,/ })
#!/bin/bash
#aws route53 create-hosted-zone --name altdotpop.com --caller-reference 2016-02-09-18:51 --hosted-zone-config Comment="Southcomm"
Id=$(aws route53 list-hosted-zones-by-name --dns-name baseplatform.io. --max-items 1 --query 'HostedZones[*].Id' --output text | awk -F'/hostedzone/' '{print $2}')
echo "