Skip to content

Instantly share code, notes, and snippets.

View nycnewman's full-sized avatar

Edward Newman nycnewman

View GitHub Profile
#!/usr/bin/env bash
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
echo "nix" > "$1/private/etc/synthetic.conf"
# Increase shared memory allocation for PostGresQL on MacOS
cat > "$1/private/etc/sysctl.conf" <<END
kern.sysv.shmmax=16777216
kern.sysv.shmmin=1
@nycnewman
nycnewman / gist:2f66a9bd7e5eb6ec45b7dee1571c03b6
Created July 27, 2020 22:33
VMWare issue - July 2020 - port 2222
Mon Jul 27 18:22:13 EDT 2020
No Job running - replacing agent
==> default: Stopping the VMware VM...
==> default: Deleting the VM...
Removing box 'azure-ci-node' (v0) with provider 'vmware_desktop'...
/Users/builder/images/initialized-20200717.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'azure-ci-node' (v0) for provider:
box: Unpacking necessary files from: file:///Users/builder/images/initialized-20200717.box
==> box: Successfully added box 'azure-ci-node' (v0) for 'vmware_desktop'!
INFO global: Vagrant version: 2.2.9
INFO global: Ruby version: 2.6.6
INFO global: RubyGems version: 3.0.3
INFO global: VAGRANT_LOG="info"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/bin/vagrant"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
WARN global: resolv replacement has not been enabled!
INFO manager: Registered plugin: NFS synced folders
@nycnewman
nycnewman / aws_security_group_details.sh
Created November 20, 2018 23:52 — forked from richadams/aws_security_group_details.sh
A quick and dirty script to list out all security group settings on an AWS account. Barely tested, use at own risk, etc. Requires awscli to be installed.
#!/bin/bash
# Requires: awscli (http://aws.amazon.com/cli/)
# Prints out a list of all security groups and their settings, just for quickly auditing it.
# Your AWS credentials
if [ -z ${AWS_ACCESS_KEY_ID} ]; then
export AWS_ACCESS_KEY_ID='***'
export AWS_SECRET_ACCESS_KEY='***'
fi