Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jousby's full-sized avatar

James Ousby jousby

  • Amazon Web Services
  • Sydney, Australia
View GitHub Profile
@jousby
jousby / endpoints.ts
Last active December 12, 2022 01:53
The vpc interface endpoints required to make AWS Batch work in private subnets without internet access (nat gateways).
// Without nat gateways, we need to create an interface endpoint
// for each service we need to access in a private subnet.
// Each vpc endpoint costs ~$0.01 per hour ($7.60/month), so we should
// try to minimise the number of endpoints we create.
this.addInterfaceEndpoints(this.vpc, [
[ec2.InterfaceVpcEndpointAwsService.BATCH, true],
[ec2.InterfaceVpcEndpointAwsService.CLOUDWATCH_LOGS, true],
[ec2.InterfaceVpcEndpointAwsService.EC2, true],
[ec2.InterfaceVpcEndpointAwsService.EC2_MESSAGES, true],
[ec2.InterfaceVpcEndpointAwsService.ECR, true],
@jousby
jousby / macos-devenv-bootstrap.sh
Created August 9, 2021 04:22
A macOS shell and developer toolchain setup script updated for Big Sur (Aug 2021)
#!/bin/bash
#####################################################################
#
# A macOS dev env setup script updated for a Big Sur
# install (08/2021). There isn't anything macos specific in here
# though, i just haven't tested it elsewhere.
#
# I have a seperate script that setups a fresh macOS install with
# a useful set of software applicatiions that you might want to run
@jousby
jousby / macos-software-bootstrap.sh
Last active November 24, 2021 04:29
A macOS software install script updated for a Big Sur install (Aug 2021)
#!/bin/bash
#####################################################################
#
# A macOS software bootstrap script updated for a Big Sur
# install (08/2021).
#
# I have a seperate script that setups zsh and installs programming
# language toolchains that you would run after this if you are in
# software development game.
#!/bin/bash
# Run outstanding system updates
echo "Updating system install..."
softwareupdate -ia --verbose
echo ""
# Install xcode cli development tools
echo "Installing xcode cli development tools..."
xcode-select --install
@jousby
jousby / GoogleStorageToS3.scala
Last active May 29, 2018 11:35
Happy path scala code for transferring files from Google Storage (Google Cloud Object Storage) to S3 (AWS Object Storage).
package com.example
import java.io.ByteArrayInputStream
import java.util.concurrent.atomic.AtomicInteger
import com.amazonaws.services.s3.AmazonS3ClientBuilder
import com.amazonaws.services.s3.model.ObjectMetadata
import com.google.cloud.storage.Storage.BlobListOption
import com.google.cloud.storage.{Blob, Bucket, StorageOptions}
@jousby
jousby / build.cygwin.sh
Created October 20, 2012 06:05 — forked from mslinn/play
Play Framework 2.0 start scripts for Cygwin
#! /usr/bin/env sh
PLAY_VERSION="2.0.4"
if [ -z "${JPDA_PORT}" ]; then
DEBUG_PARAM=""
else
DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}"
fi