Skip to content

Instantly share code, notes, and snippets.

View greysAcademicCode's full-sized avatar

Grey Christoforo greysAcademicCode

View GitHub Profile
@greysAcademicCode
greysAcademicCode / cleanDocker.sh
Last active January 31, 2016 15:33
this cleans up Docker's image storage
#!/usr/bin/env bash
# docker cleanup (if you're not careful, docker loves to eat disk space)
# bash <(curl https://gist.githubusercontent.com/greysAcademicCode/a46ea54e902cff5c3f81/raw/33151362a2e97b07db8e8dd82f68e4fbb0702097/cleanDocker.sh)
echo "Cleaning up unneeded docker images."
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker images | grep '<none>' | awk '{print $3}' | xargs docker rmi || echo "No docker cleaning needed."
@greysAcademicCode
greysAcademicCode / ddns-start
Last active July 10, 2023 15:26
Google Domains DDNS registration script
#!/bin/sh
# see: https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS#google-domains
# this script could go into /jffs/scripts of a router running Merlin's asus-wrt firmware
# you must then choose the "Custom" option for DDNS in the router's web interface
# it registers the WAN IP of the router with Google Domains' DDNS system
# get your login info from yout Google Domains dashboard
IP=$1
USER=
PASS=