Skip to content

Instantly share code, notes, and snippets.

@otaviog
otaviog / WSL-import-export.md
Created July 22, 2024 14:00
WSL import/export commands
## No
Do-Thing | Out-Null
## yes
$null = Do-Thing
[void](Do-Thing)
@MartinMiles
MartinMiles / install-latest-docker-without-desktop.ps1
Created April 8, 2024 05:28
Installs latest docker without desktop
#Run as Admin
# https://gist.github.com/jermdavis/6fb0a6e47d6f1342c089af4c04d29c35#file-1_install-docker-ps1
param(
[string]$dockerEnginePath = "C:\",
[string]$dockerInstallPath = "C:\Docker",
[string]$dockerEngineUrl = "https://download.docker.com/win/static/stable/x86_64/docker-24.0.6.zip",
[string]$dockerZip = "docker.zip",
@netfantom-spb
netfantom-spb / WSL.md
Last active September 18, 2025 11:04
WSL

WSL list

Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss" -Recurse

Move WSL to another drive/PC

wsl --export Ubuntu .\Ubuntu\ext4.vhdx --vhd
wsl --unregister Ubuntu
wsl --import-in-place Ubuntu .\Ubuntu\ext4.vhdx
@monsat
monsat / storedState.ts
Created May 14, 2023 14:08
Nuxt useState with VueUse useStorage composables
import { useStorage } from '@vueuse/core'
export const useStoredState = <T>(key: string, initValue: T) => {
const shared = useState<T>(key, () => initValue)
const stored = useStorage<T>(key, initValue)
const state = computed({
get: () => shared.value,
set: (value: T) => {
shared.value = value
@Omerr
Omerr / git lol.md
Last active September 7, 2025 16:18
git lol - an alias to Git that shows the commit graph in a pretty format

log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

To configure as an alias git lol:

git config --global alias.lol "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit"

#!/bin/bash
access_token="$( az account get-access-token --resource-type arm | jq -r '.accessToken' )"
# echo "${access_token}" | jq -R 'split(".")|.[1]|@base64d|fromjson'
subscriptionId="706df49f-998b-40ec-aed3-7f0ce9c67759"
# IFS='' read -r -d '' azureResourceGraphQuery <<'EOF'
# SpotResources
@PedroCavaleiro
PedroCavaleiro / mount-vmdk-linux.md
Last active March 3, 2025 05:32
Mount VMDK on Linux

Read VMDK on Linux

VMDK is a virtual disk file from VMWare, reading without any "special" software is rather useful specially because I didn't want to install VMWare software

It's possible that this works with vhd and vhdx but I didn't test it... If someone does test it let me know

The steps are rather easy

Mounting VMDK

@brian9206
brian9206 / loki.yml
Last active September 23, 2022 19:11
Single-node small & lightweight Grafana Loki deployment
auth_enabled: false
analytics:
reporting_enabled: false
server:
http_listen_port: 3100
common:
path_prefix: /var/loki
@DavidWells
DavidWells / javascript-proxy-as-rest-client.js
Last active July 31, 2025 20:51
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {