This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export __NV_PRIME_RENDER_OFFLOAD=1 | |
export __GLX_VENDOR_LIBRARY_NAME=nvidia | |
export __VK_LAYER_NV_optimus=NVIDIA_only | |
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json | |
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-IsoFile | |
{ | |
<# .Synopsis Creates a new .iso file .Description The New-IsoFile cmdlet creates a new .iso file containing content from chosen folders .Example New-IsoFile "c:\tools","c:Downloads\utils" This command creates a .iso file in $env:temp folder (default location) that contains c:\tools and c:\downloads\utils folders. The folders themselves are included at the root of the .iso image. .Example New-IsoFile -FromClipboard -Verbose Before running this command, select and copy (Ctrl-C) files/folders in Explorer first. .Example dir c:\WinPE | New-IsoFile -Path c:\temp\WinPE.iso -BootFile "${env:ProgramFiles(x86)}\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\efisys.bin" -Media DVDPLUSR -Title "WinPE" This command creates a bootable .iso file containing the content from c:\WinPE folder, but the folder itself isn't included. Boot file etfsboot.com can be found in Windows ADK. Refer to IMAPI_MEDIA_PHYSICAL_TYPE enumeration for possible media types: http://msdn.micr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !WARNING! | |
# Script moved to https://blob.CLITools.tk/install-storjio(https://github.com/marrobHD/clitools/blob/master/install-storjio) | |
# This script is no longer updated on GitHub Gist. | |
# !WARNING! | |
#!/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !WARNING! | |
# Script moved to https://blob.CLITools.tk/uninstall-docker(https://github.com/marrobHD/clitools/blob/master/uninstall-docker) | |
# This script is no longer updated on GitHub Gist. | |
# !WARNING! | |
# Remove docker compose | |
sudo rm $(which docker-compose) | |
sudo pip uninstall docker-compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !WARNING! | |
# Script moved to https://blob.CLITools.tk/install-docker(https://github.com/marrobHD/clitools/blob/master/install-docker) | |
# This script is no longer updated on GitHub Gist. | |
# !WARNING! | |
# wget -qO- https://gist.github.com/marrobHD/42f1ab222d4f83e811b15bae72a346ea/raw | bash | |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Cleanup docker files: untagged containers and images. | |
# | |
# Use `docker-cleanup -n` for a dry run to see what would be deleted. | |
untagged_containers() { | |
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1. | |
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6). | |
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470 | |
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable Commercial Repo | |
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list && apt-get update | |
# Add PVE Community Repo | |
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list && apt-get update | |
# Remove nag | |
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script && apt --reinstall install proxmox-widget-toolkit | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to https://github.com/marrobHD/proxmox-tools/blob/master/leave-cluster.sh | |
and https://raw.githubusercontent.com/marrobHD/proxmox-tools/master/leave-cluster.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# wget -qO - https://gist.githubusercontent.com/marrobHD/760704aa7c864a10a7c5c5fa323b0012/raw/043d2f61ad5717228504f476e923eb829b3f9d58/hassosproxmoxinstall.sh | bash -s local-lvm | |
set -o pipefail | |
shopt -s expand_aliases | |
alias die='EXIT=$? LINE=$LINENO error_exit' | |
trap die ERR | |
function error_exit() { | |
REASON=$1 | |
MSG="\e[91mERROR: \e[93m$EXIT@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SETLOCAL | |
SET REG="%WINDIR%\system32\reg.exe" | |
SET INTRANET_DOMAINS=contoso.local example.local | |
SET TRUSTED_DOMAINS=microsoft.com example.com | |
IF EXIST "%USERPROFILE%\..\Default User\NTUSER.DAT" SET NTUSER="%USERPROFILE%\..\Default User\NTUSER.DAT" | |
IF EXIST "%USERPROFILE%\..\Default\NTUSER.DAT" SET NTUSER="%USERPROFILE%\..\Default\NTUSER.DAT" | |
IF DEFINED PROGRAMFILES(x86) SET X64=TRUE |
NewerOlder