Skip to content

Instantly share code, notes, and snippets.

View rommerge.sh
#!/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 Oct 20, 2017
Custom cleanup command for git.
View git-cleanup
#!/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
View swagger.yaml
openapi: "3.0.0"
info:
version: a.bc
title: Swagger Petstore
description: Foobar
servers:
- url: http://petstore.swagger.io/v1
paths:
/pets:
get:
View setup.sh
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 Jan 24, 2014
A .gitignore for use in Android Studio
View Android Studio .gitignore
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files