Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / docker-cleanup-resources.md
Created August 14, 2017 02:59 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@pythoninthegrass
pythoninthegrass / gist:7b8ce5493369e828dc6680b06dc4666d
Last active December 22, 2017 22:46 — forked from chrissimpkins/gist:5bf5686bae86b8129bee
Atom Editor Cheat Sheet (Sweetmeat)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@pythoninthegrass
pythoninthegrass / lazy-ssh-agent.sh
Created December 28, 2017 22:05 — forked from bseibold/lazy-ssh-agent.sh
Lazy Loading for ssh-agent keys. Loads default SSH identities on demand. Tested with bash and zsh.
function wrapssh() {
setopt shwordsplit &>/dev/null
# load agent if it's not running
if [ -z "$SSH_AUTH_SOCK" ]; then
eval $(ssh-agent) &>/dev/null
fi
# load keys if necessary
DO_ADD=0
@pythoninthegrass
pythoninthegrass / vbox-cli-manual.md
Created January 3, 2018 20:46 — forked from mortymacs/vbox-cli-manual.md
VirtualBox Useful Commands

Create vm

VBoxManage createvm --name "Debian 9" --register

Modify vm

VBoxManage modifyvm "Debian 9" --memory 1024
@pythoninthegrass
pythoninthegrass / vbox_cli.md
Last active January 3, 2018 23:42 — forked from Driste/vbox_cli.md
VBox CLI

VirtualBox CLI

Installation

Mac

brew cask install virtualbox virtualbox-extension-pack

Linux

Linux Download

@pythoninthegrass
pythoninthegrass / backup-all-docker-images.sh
Created March 12, 2018 02:18 — forked from jrenggli/backup-all-docker-images.sh
Backup/Save all Docker Images to a compressed file
docker images | tail -n +2 | grep -v "none" | awk '{printf("%s:%s\n", $1, $2)}' | while read IMAGE; do
echo $IMAGE
filename="${IMAGE//\//-}"
filename="${filename//:/-}.docker-image.gz"
docker save ${IMAGE} | pigz --stdout --best > $filename
done
@pythoninthegrass
pythoninthegrass / backup_all_docker_images.sh
Last active January 11, 2023 04:58 — forked from dieterrosch/backup_all_docker_images.sh
A bash script to backup all docker images to files
#!/usr/bin/env bash
if [[ $# -eq 0 ]]; then
echo "Usage: $0 <backup_dir>"
exit
fi
destination=$1
if ! type "pv" > /dev/null; then
echo 'pv' command not found on your system, install it to get a nice progress indicator...
else
@pythoninthegrass
pythoninthegrass / uninstall_mso.sh
Last active April 22, 2025 14:38 — forked from pirafrank/uninstall_office_2016.sh
Uninstall Microsoft Office from macOS completely
#!/usr/bin/env bash
# SOURCES:
# https://gist.github.com/pirafrank/18d62c062e2806c1d183
# SEE THIS EXCELLENT SITE IF GIST FAILS:
# https://office-reset.com
# activate verbose standard output (stdout)
set -v
@pythoninthegrass
pythoninthegrass / remove_drivers.ps1
Last active April 24, 2018 17:55 — forked from jonman364/RemoveDrivers.ps1
Remove all OEM drivers from an offline image
$image = “D:\Windows\System32\DriverStore\FileRepository” # may just need mounted Windows root dir (e.g., "D:\")
$dism = dism /image:$image /get-drivers
ForEach($line in $dism){
If($line -like “Published Name*”){
$sp = ($line -split “ “)
$oem = $sp[3]
Dism /image:$image /Remove-Driver /Driver:$oem # /Recurse
}
}
@pythoninthegrass
pythoninthegrass / WindowsUpdateAgentReset.ps1
Last active July 9, 2018 23:08 — forked from dotps1/WindowsUpdateAgentReset.ps1
Resets the Windows Update Agent components.
<#
.SYNOPSIS
Resets the requried components of the Windows Update Agent.
.DESCRIPTION
Stops required services.
Removes cached files/folders used by the Windows Update Agent.
Resets the permissions on the bits and wuauserv services.
Registers dlls needed by the bits/Windows Update Agent.
Removes lingering registry entries from SUS if present.
Restarts all the services that where stopped.