Skip to content

Instantly share code, notes, and snippets.

View joshmenden's full-sized avatar

Josh Menden joshmenden

  • YNAB
  • Lehi UT
View GitHub Profile
@joshmenden
joshmenden / dotfile_automated_setup.sh
Created October 19, 2023 01:47
A bash script for setting up the symlinks for your dot files
#!/bin/bash
green='\033[0;32m'
reset='\033[0m'
# position-based matching
# pwd assumes you are running this from the root of your dotfile dir
files=( ~/.zshrc )
links=( "$(pwd)/.zshrc" )
name: deploy-production
on:
push:
branches:
- main
jobs:
deploy:
name: deploy my stuff
const golangLambda = new lambda.Function(this, 'golang-lambda-function-cdk-template-func', {
functionName: "GolangLambdaFunctionCDKTemplateFunc",
runtime: lambda.Runtime.GO_1_X,
timeout: cdk.Duration.seconds(15),
memorySize: 128,
handler: 'main',
code: lambda.Code.fromAsset(path.join(__dirname, '/../../golang-lambda-function-cdk-template.zip')),
environment: { REGION: cdk.Stack.of(this).region },
});
build:
GOOS=linux GOARCH=amd64 go build -o main cmd/main.go
run:
go run cmd/main.go -local=true
zip:
zip golang-lambda-function-cdk-template.zip main
clean:
docker build . -t sakila:latest
docker run -d --name sakila sakila:latest
docker exec -it sakila mysql -u root sakila
FROM ubuntu:latest
ENV MYSQL_ALLOW_EMPTY_PASSWORD=true
ADD sakila-schema.sql /tmp/sakila-schema.sql
ADD sakila-data.sql /tmp/sakila-data.sql
RUN apt-get update && apt-get -y install mysql-server vim
RUN service mysql restart \
aws route53 domains accept-domain-transfer-from-another-aws-account --domain "livingissodear.com" --password "CeT2Zxs~Example"
HTTP/1.1 200
{
"OperationId":"308c56712-faa4-40fe-94c8-b4230example"
}
> aws route53domains transfer-domain-to-another-aws-account --domain "livingissodear.com" --acount-id "ABC123EFG456"
HTTP/1.1 200
{
"OperationId":"308c56712-faa4-40fe-94c8-b4230example",
"Password":"CeT2Zxs~Example"
}
> git clone https://github.com/joshmenden/transfer-route53 && cd transfer-route53
# uses positional args
# 1) old aws profile name
# 2) old hosted zone ID
# 3) new aws profile name
# 4) new hosted zone ID
> ./convert.rb my_old_aws_profile_name ABCD123EFG456 my_new_aws_profile_name XYZ987QRS012
Records are being created in Hosted Zone Z03124042TP23SK0Z532M!