Skip to content

Instantly share code, notes, and snippets.

View Codes-Lab's full-sized avatar
🎯
Focusing

AM Codes-Lab

🎯
Focusing
  • 08:16 (UTC +01:00)
View GitHub Profile
@Codes-Lab
Codes-Lab / Shrink WSL Docker Disk
Last active August 21, 2025 08:27
Docker wsl disk size Shrink, Shrink Docker desktop Vdisk in Windows
wsl --shutdown
# make sure everything is stopped
wsl --list --verbose
#Verify everything is stopped by:
>> wsl.exe --list --verbose
#Then start diskpart:
>> diskpart
#and inside diskpart type:
@Codes-Lab
Codes-Lab / DropOracleTablesViewPkgs
Last active August 5, 2025 07:42
Delete all tables, views, packages, procedures, functions, sequences, MaterializerView and index in your Oracle schema.
BEGIN
FOR cur_rec IN (SELECT object_name, object_type
FROM user_objects
WHERE object_type IN
('TABLE',
'VIEW',
'PACKAGE',
'PROCEDURE',
'FUNCTION',
'SEQUENCE'
@Codes-Lab
Codes-Lab / Useful Docker Command
Last active August 4, 2025 13:58
#Delete or Find all Docker images with a prefix name
#Find all Docker Images with a prefix
docker image ls force-iiot/*
#Delete all images with a prefix name
docker image rmi $(docker image ls force-iiot/* --format "{{.ID}}")
@Codes-Lab
Codes-Lab / Useful Git Commands
Created August 3, 2025 18:18
Useful Git Commands
#Find count of changes done in last 24 hours.
git rev-list --count --since="24 hours ago" origin/develop
# Upgrade node version with choco
choco upgrade nodejs.install --version=21.5.0
@Codes-Lab
Codes-Lab / Docker Desktop In Windows 10 Does Not Launch
Created February 13, 2024 13:27
Docker Desktop In Windows 10 Does Not Launch
Follow these steps to fix it:
Stop Docker
Uninstall it from "Add Programs/Remove"
Remove Docker folder from AppData/Roaming
Remove docker folder from ProgramFiles
Remove docker folder from ProgramData
Restart machine
Installed Docker Desktop again
@Codes-Lab
Codes-Lab / StopAndRemoveminikubefromWindows10
Created November 10, 2023 13:21
Stop and Remove minikube from Windows 10
# powershell elevated privilages
minikube stop
minikube delete
# Delete the .minikube and .kube directories under user
C:\users\{user}\.minikube (rm $HOME/.minikube)
C:\users\{user}\.kube (rm $HOME/.kube)
# If one has installed it via chocolatey
minikube stop
@Codes-Lab
Codes-Lab / nginx.conf
Created May 18, 2023 13:46
nginx.conf with proxy configuration and proxy caching configuration. It also logs the status of cache if there was a cache hit or cache miss in the host.access.log
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
  • The default location of the Docker Desktop WSL virtual disk is the C drive and bigger containers can lead the C drive to get full quickly. In case we want to move the docker desktop disk to a different drive/location we can follow the steps below:

  • Docker disk default location at (%LOCALAPPDATA%/Docker/wsl/data)

  • Open PowerShell with Admin rights

  • Quit Docker Desktop

  • And run following command to get the docker-desktop-data file name

  • wsl -l -v

  • Shutdown the wsl

  • wsl --shutdown

@Codes-Lab
Codes-Lab / expandDockerStorage.md
Last active May 16, 2023 12:38
Expand Docker Storage on WSL2

Identify the path to virtual disk of the docker

  • (default location: %LOCALAPPDATA%/Docker/wsl/data).

Start diskpart from the command line.

  • diskpart

Select disk by using the command

  • select vdisk file=

Grow the image by running expand command

  • expand vdisk maximum=

Shut down WSL2 by executing

  • wsl --shutdown