Skip to content

Instantly share code, notes, and snippets.

@iainconnor
iainconnor / rommerge.sh
Last active June 4, 2020 21:52
Rom Merge
#!/bin/bash
ROMS="./roms-old"
UPGRADES="./upgrades"
NEW="./roms-new"
for ROM_FILE in $ROMS/*.zip $ROMS/*.7z; do
[ -f "$ROM_FILE" ] || break
ROM_FILE_NAME=$(basename "$ROM_FILE")
@iainconnor
iainconnor / git-cleanup
Last active October 20, 2017 21:05
Custom cleanup command for git.
#!/bin/sh
source "$(git --exec-path)/git-sh-setup"
if git diff-index --quiet HEAD --; then
git checkout master
git remote update origin --prune
for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote &> /dev/null; done
git pull --all
git branch -r --merged master | grep -v master | sed 's/origin\///' | xargs -n 1 git push --delete origin &> /dev/null
openapi: "3.0.0"
info:
version: a.bc
title: Swagger Petstore
description: Foobar
servers:
- url: http://petstore.swagger.io/v1
paths:
/pets:
get:
@iainconnor
iainconnor / setup.sh
Last active September 8, 2019 16:00
OSX Setup
me=$(whoami)
# Get Sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# Install Xcode command line tools.
xcode-select --install
@iainconnor
iainconnor / Android Studio .gitignore
Created January 24, 2014 20:20
A .gitignore for use in Android Studio
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files