Skip to content

Instantly share code, notes, and snippets.

View matthewcosgrove's full-sized avatar

Matthew Cosgrove matthewcosgrove

View GitHub Profile
Thu Nov 24 23:27:56 UTC 2016
---
applications:
- name: shocking-go-web-app
disk: 512M
memory: 512M
@matthewcosgrove
matthewcosgrove / osx-for-hackers.sh
Created November 30, 2016 12:55 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
#!/bin/bash
set -eux
export GOPATH=$PWD/../gopath
export PATH=$PWD/../gopath/bin:$PATH
export OPSMAN_OVA=$GOPATH/$OPSMAN_OVA
go version
platform: linux
image_resource:
type: docker-image
source: {repository: mattcosgrove/wake-me-up-b4u-go-govc, tag: "latest"}
inputs:
- name: pcf-vsphere
- name: pivnet-pcf-opsman
- name: govcwrap
---
resource_types:
- name: pivnet
type: docker-image
source:
repository: pivotalcf/pivnet-resource
tag: latest-final
resources:
@matthewcosgrove
matthewcosgrove / install_virtualbox5_centos7.sh
Created November 13, 2018 19:56
Install VirtualBox 5.0.x in CentOS 7
#!/bin/sh
echo ">>>> System update and get minimal required modules to use vboxdrv kernel <<<<"
yum update -y
yum install -y binutils qt gcc make patch libgomp glibc-headers glibc-devel
echo ">>>> Getting kernel headers and DKMS to favour future VirtualBox kernel Updates <<<<"
yum install -y kernel-headers kernel-devel dkms
repoFile="/etc/yum.repos.d/virtualbox.repo"
@matthewcosgrove
matthewcosgrove / aws_ubuntu_dropbox_up.sh
Last active December 18, 2018 09:10
Dropbox wrapper bootstrapping for ext4 issues
#!/usr/bin/env bash
sudo apt-get update
sudo apt install git build-essential python
pushd ~ > /dev/null
git clone https://github.com/dark/dropbox-filesystem-fix.git
pushd ~/dropbox-filesystem-fix > /dev/null
make
popd > /dev/null
wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
#!/usr/bin/env bash
df -hT
sudo debugfs -R features /dev/xvda1
cat /etc/fstab
echo "Checking pre-requisites..."
sudo apt-get -qq update
sudo apt -yqq install python
#!/usr/bin/env bash
: "${DROPBOX_FOLDER_TO_KEEP:? DROPBOX_FOLDER_TO_KEEP must be set e.g. DROPBOX_FOLDER_TO_KEEP=CapoeiraSubsonicLibrary ./dropbox_cli_selective_sync.sh }"
# TODO: avoid ls ---> http://mywiki.wooledge.org/ParsingLs
dropbox(){
/usr/local/bin/dropbox.py "$@"
}
pushd ~/Dropbox > /dev/null
while [ "$(ls -1 | grep -v $DROPBOX_FOLDER_TO_KEEP | wc -l)" -ne "0" ]