This file contains hidden or 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
Set-ExplorerOptions -showHidenFilesFoldersDrives -showFileExtensions | |
# Enable-RemoteDesktop | |
cinst cmder | |
cinst sysinternals | |
cinst rsat | |
cinst git | |
cinst git-credential-winstore | |
cinst poshgit |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Set up user environment variables for installed scripts and modules | |
.DESCRIPTION | |
PowerShell seems to be neglecting the configuration of PATH and PSMODULEPATH | |
enviroments in the user context when installing scripts and modules using | |
PackageManagement. This function set those envronment vairables up so these | |
are available by default. | |
NOTE: PSMODULEPATH is replaced, PATH is appended | |
#> |
This file contains hidden or 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 Get-CinebenchScore { | |
$source = "http://http.maxon.net/pub/cinebench/CinebenchR20.zip" | |
$out = "C:\CinebenchR20.zip" | |
$cbfolder = "C:\cinebench\" | |
$cbpath = Join-Path $cbfolder "cinebench.exe" | |
$log = Join-Path $cbfolder "log.txt" | |
if(-not (Test-Path $cbpath)) { | |
# Download | |
Invoke-WebRequest -Uri $source -OutFile $out |
This file contains hidden or 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 Get-OctaneBenchScore { | |
$source = "https://render.otoy.com/downloads/a/787/7e324f5a-3598-41b2-9b07-3fbf678163af/OctaneBench_4_00c_win.zip" | |
$out = "C:\OctaneBench4.zip" | |
$obfolder = "C:\octanebench\" | |
$obpath = Join-Path $obfolder "OctaneBench_4_00c_win\octane-cli.exe" | |
$log = Join-Path $obfolder "log.txt" | |
if(-not (Test-Path $obpath)) { | |
# Download | |
Invoke-WebRequest -Uri $source -OutFile $out |
This file contains hidden or 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
# Based on https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4 | |
# Find the disk to work with | |
# lsblk | grep -v loop | |
DISK=${DISK-"mmcblk0"} | |
BOOTPART=${BOOTPART-"mmcblk0p1"} | |
ROOTPART=${ROOTPART-"mmcblk0p2"} | |
# Erase all partitions on the disk and create a new layout |
This file contains hidden or 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
# As root | |
MAIN_USER=${MAIN_USER:?"Must set MAIN_USER env prior to running"} | |
GITHUB_USERNAME=${GITHUB_USERNAME:-"jsmcnair"} | |
TIMEZONE="Europe/London" | |
KEYS=${KEYS:-"uk"} | |
LOCALE=${LOCALE:"en_GB.UTF-8"} | |
### Localization | |
# Set the TZ |
This file contains hidden or 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
PROJECT="<project_name>" | |
REGION="<region_name>" | |
# Delete all filestore backups in $PROJECT $REGION using gcloud CLI | |
gcloud filestore backups list --project $PROJECT --region $REGION --format "value(name)" | | |
xargs -d "\n" -I '{}' gcloud filestore backups delete '{}' --region $REGION --quiet --async --project $PROJECT | |
# Delete all disk snapshots in $PROJECT | |
gcloud compute snapshots list --project $PROJECT --format "value(name)" | | |
xargs gcloud compute snapshots delete --project $PROJECT | |