Before shrinking a WSL2 virtual disk, you need to ensure that WSL2 is not running.
You can check if it’s running with the command wsl.exe --list --verbose
in PowerShell:
PS C:\Users\valorin> wsl.exe --list --verbose
NAME STATE VERSION
View: Pods(<namespace>)[number of pods listed] | |
NAME pod name | |
READY number of pods in ready state / number of pods to be in ready state | |
RESTARTS number of times the pod has been restarted so far | |
STATUS state of the pod life cycle, such as Running | ... | Completed | |
CPU current CPU usage, unit is milli-vCPU | |
MEM current main memory usage, unit is MiB | |
%CPU/R current CPU usage as a percentage of what has been requested by the pod | |
%MEM/R current main memory usage as a percentage of what has been requested by the pod |
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |
There a times when you need to build something from the nix unstable channel. For example the master contains a new package you need, but the next nixpkgs release is somewhere in the future, and you need this package now. In this guide I want to show how to install packages from unstable by using nix-env. Furthermore I hope to give a basic understanding of the channels concept.
A channel is a set of expressions which includes severall build, installation and configuration instructions for packages, services and the system itself. The repository normaly used here is nixpkgs. It is developed at https://github.com/NixOS/nixpkgs.
The unstable channel is a copy of the NixOS/nixpkgs master. It is pulled from github once in a while and will be available from a mirror under https://nixos.org/channels/nixpkgs-unstable. Since NixOS uses half-anual released stable channels, some changes (especially new f
package main | |
import ( | |
"net/http" | |
"net/url" | |
"runtime" | |
"strings" | |
"context" | |
"bytes" |
# Luke's config for the Zoomer Shell | |
# Enable colors and change prompt: | |
autoload -U colors && colors | |
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " | |
# History in cache directory: | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
HISTFILE=~/.cache/zsh/history |
#!/bin/bash -x | |
# --- Start MAAS 1.0 script metadata --- | |
# name: 00-dell-firmware-00-all | |
# type: commissioning | |
# title: Firmware Update for PowerEdge R740xd | |
# description: Dell PowerEdge R740xd Firmware Updates | |
# script_type: commissioning | |
# tags: commissioning update_firmware | |
# for_hardware: mainboard_product:00WGD1 | |
# may_reboot: True |
#!/bin/bash | |
# Usage: ./get_kubeconfig_custom_cluster_rancher2.sh cluster_name | |
# Needs to be run on the server running `rancher/rancher` container | |
# Check if jq exists | |
command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; } | |
# Check if clustername is given | |
if [ -z "$1" ]; then | |
echo "Usage: $0 [clustername]" |
#!/bin/bash -x | |
# --- Start MAAS 1.0 script metadata --- | |
# name: 00-hp-array-01-config | |
# type: commissioning | |
# title: Configure HP Smart Array controllers on HP systems | |
# description: Configure HP Smart Array Controllers | |
# script_type: commissioning | |
# destructive: True | |
# tags: configure_hba commissioning | |
# --- End MAAS 1.0 script metadata --- |
package main | |
import ( | |
"net/http" | |
"net/url" | |
"runtime" | |
"strings" | |
"context" | |
"bytes" |