Skip to content

Instantly share code, notes, and snippets.

View bravecobra's full-sized avatar
🏡
Working from home

bravecobra bravecobra

🏡
Working from home
View GitHub Profile
@bravecobra
bravecobra / Generate-Choco-InstallScript.ps1
Last active November 4, 2022 17:52
Generate Choco Install script based on current install
choco list --local-only --idonly -r | % { "choco install -y " + $_ } > Choco-Install.ps1
@bravecobra
bravecobra / delete-docker-desktop-install.ps1
Last active October 30, 2022 21:29
When uninstalling docker desktop, it does not remove your personal settings. This script makes sure your can start from a REALLY fresh install.
$ErrorActionPreference = "SilentlyContinue"
Stop-Process -force -processname 'Docker for Windows', com.docker.db, com.docker.slirp, com.docker.proxy, com.docker.9pdb, moby-diag-dl, dockerd
Stop-Process -force -processname com.docker.service
try {
Push-Location "C:\Program Files\Docker\Docker\Resources"
./MobyLinux.ps1 -Destroy
Pop-Location
} Catch {}
@bravecobra
bravecobra / localstack.md
Created May 19, 2020 08:59 — forked from lobster1234/localstack.md
Working with localstack on command line

Starting localstack

C02STG51GTFM:localstack mpandit$ make infra
. .venv/bin/activate; exec localstack/mock/infra.py
Starting local dev environment. CTRL-C to quit.
Starting local Elasticsearch (port 4571)...
Starting mock ES service (port 4578)...
Starting mock S3 server (port 4572)...
Starting mock SNS server (port 4575)...
@bravecobra
bravecobra / docker-cleanup-resources.md
Created February 17, 2019 14:22 — 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

@bravecobra
bravecobra / auto_git_file.md
Created January 26, 2019 14:50 — forked from darencard/auto_git_file.md
Automatic file git commit/push upon change

Automatically push an updated file whenever it is changed

Linux

  1. Make sure inotify-tools is installed (https://github.com/rvoicilas/inotify-tools)
  2. Configure git as usual
  3. Clone the git repository of interest from github and, if necessary, add file you want to monitor
  4. Allow username/password to be cached so you aren't asked everytime
git config credential.helper store
@bravecobra
bravecobra / build.sh
Created December 20, 2018 15:26
Cake linux bootstrapper for .NET Core
#!/usr/bin/env bash
# Define variables
CAKE_VERSION=${CAKE_VERSION:-0.31.0}
DOTNET_VERSION=2.1.502
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TOOLS_DIR=$SCRIPT_DIR/tools
CAKE_EXE=$TOOLS_DIR/dotnet-cake
CAKE_PATH=$TOOLS_DIR/.store/cake.tool/$CAKE_VERSION
# Define default arguments.
@bravecobra
bravecobra / gitflow-breakdown.md
Created February 5, 2018 14:23 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository