Skip to content

Instantly share code, notes, and snippets.

View BraINstinct0's full-sized avatar
💔
cleaning my brain

Apparatus_Zero BraINstinct0

💔
cleaning my brain
View GitHub Profile
@BraINstinct0
BraINstinct0 / CP2DockerVol.sh
Created December 8, 2022 09:51
Bash script to copy file/folder into Docker Volume
# check if docker is running
docker 1> /dev/null
# success?
if [ $? -eq 0 ]; then
# folder/file exist?
if test -f "$2"; then
docker container create --name dummy -v $1:/root tianon/true
docker cp "$2" dummy:"/root/$3"
docker rm dummy
echo "Copied $2 to $3 in Volume $1"
@BraINstinct0
BraINstinct0 / OhMyPoshInstall.sh
Last active December 8, 2022 10:19
Oh My Posh install & update script for AMD64-based linux
echo "Installing 'Oh My Posh'..."
sudo wget https://www.github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
sudo chmod +x /usr/local/bin/oh-my-posh
echo "Oh My Posh installation complete. Version:"
oh-my-posh --version
@BraINstinct0
BraINstinct0 / GOGSetVersion4WinGet.ps1
Created May 1, 2022 00:09
PS script to add GOG version info to registry, so that WinGet can recognize it
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7258BA11-600C-430E-A759-27E2C691A335}_is1" -Name DisplayVersion -Value ((Get-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\GOG.com\GalaxyClient -Name version).version) -Force