Skip to content

Instantly share code, notes, and snippets.

View frogamic's full-sized avatar

Dominic Shelton frogamic

View GitHub Profile
@frogamic
frogamic / docker.sh
Last active May 24, 2021 06:13
Wrapper to launch docker.app if it is not running when you use a CLI docker command
#! /usr/bin/env bash
set -Euo pipefail
DOCKER_APP="/Applications/Docker.app"
DOCKER_CLI="${DOCKER_APP}/Contents/Resources/bin/docker"
pgrep -qf Docker.app
if [ $? != 0 ]; then
read -n1 -p "The Docker app is not running, launch it now? [Y/n]" LAUNCH_DOCKER
@frogamic
frogamic / fetch-kill-la-kill.ps1
Created October 31, 2020 13:44
For fetching the fantastic composite screengrabs from /u/iamonlyoneman on /r/killlakill
$user = 'iamonlyoneman'
$subreddit = 'KillLaKill'
$stateFile = 'fetch-last.txt'
function Get-Page {
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string] $Uri,
[Parameter()]