Merge branch 'main' of ssh://liamsgit.dev:2222/LiamPietralla/code-snippets
Build, Test & Publish / Build (push) Successful in 1m32s
Build, Test & Publish / Build and Publish Container Image (push) Successful in 1m0s
Build, Test & Publish / Deploy to Infrastructure (push) Successful in 35s

This commit is contained in:
2026-08-04 18:06:15 +10:00
7 changed files with 77 additions and 1 deletions
+16
View File
@@ -67,6 +67,14 @@ export default defineConfig({
{ text: 'Identify Untagged Resources', link: '/azure/identify-untagged-resources' }, { text: 'Identify Untagged Resources', link: '/azure/identify-untagged-resources' },
] ]
}, },
{
text: 'Backblaze',
link: '/b2/',
collapsed: true,
items: [
{ text: 'Development Bucket', link: '/b2/development-bucket' },
]
},
{ {
text: 'CSS', text: 'CSS',
link: '/css/', link: '/css/',
@@ -211,6 +219,14 @@ export default defineConfig({
items: [ items: [
{ text: 'String Literal Types', link: '/typescript/string-literal-types' }, { text: 'String Literal Types', link: '/typescript/string-literal-types' },
] ]
},
{
text: 'WSL',
link: '/wsl/',
collapsed: true,
items: [
{ text: 'Clear Unused Disk Space', link: '/wsl/clear-unused-disk-space' },
]
} }
], ],
+33
View File
@@ -0,0 +1,33 @@
# Development Bucket
To create a bucket for development that can be used by all origins we need to enable CORS for the bucket. First create the bucket and some access keys then download the `b2-windows.exe` tool from the website.
First login using the keys:
```powershell
b2 authorize-account <accountId> <applicationKey>
```
Next lets set the cors rules for the bucket:
```powershell
$rules =
@'
[
{
"corsRuleName": "allowall-s3",
"allowedOrigins": ["*"],
"allowedHeaders": ["*"],
"allowedOperations": [
"s3_get",
"s3_put",
"s3_head",
"s3_delete"
],
"exposeHeaders": ["ETag", "x-amz-server-side-encryption", "x-amz-request-id"],
"maxAgeSeconds": 3600
}
]
'@
b2 update-bucket --cors-rules $rules <bucketName>
```
+3
View File
@@ -0,0 +1,3 @@
# Backblaze Snippets and Musings
#### [Development Bucket](./development-bucket.md)
+8
View File
@@ -22,6 +22,10 @@ hero:
text: Azure text: Azure
link: /azure/ link: /azure/
- theme: alt
text: Backblaze
link: /b2/
- theme: alt - theme: alt
text: CSS text: CSS
link: /css/ link: /css/
@@ -90,6 +94,10 @@ hero:
text: Typescript text: Typescript
link: /typescript/ link: /typescript/
- theme: alt
text: WSL
link: /wsl/
# features: # features:
# - title: Feature A # - title: Feature A
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit # details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
+12
View File
@@ -0,0 +1,12 @@
# Clear Unused Disk Space
WSL will grow but never shrink the size of the virtual disk. This can be a problem if you have a lot of unused space in your WSL virtual disk. You can reclaim this space by running the following command in PowerShell admin:
```powershell
wsl --shutdown
# Navigate to the location of the ext4.vhdx file. This is usually in C:\Users\<username>\AppData\Local\Packages\<distro>\LocalState\ext4.vhdx
# Run the following command to compact the virtual disk
Optimize-VHD -Path .\ext4.vhdx -Mode Full
```
+3
View File
@@ -0,0 +1,3 @@
# WSL Snippets and Musings
#### [Clear Unused Disk Space](./clear-unused-disk-space.md)
+2 -1
View File
@@ -11,5 +11,6 @@
"dev": "vitepress dev --host 0.0.0.0", "dev": "vitepress dev --host 0.0.0.0",
"build": "vitepress build", "build": "vitepress build",
"preview": "vitepress preview" "preview": "vitepress preview"
} },
"packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be"
} }