Skip to content

Instantly share code, notes, and snippets.

View mal1kc's full-sized avatar
🔍

malik mal1kc

🔍
View GitHub Profile
@mal1kc
mal1kc / wsl2_install_archlinux.md
Last active September 27, 2022 11:37
install archlinux to wsl 2

install archlinux to wsl 2

  1. install archlinux-bootsrap-<version>-x86_64.tar.gz from one of the mirrors file and verify its signature
  2. import using
   wsl --import <distro name> <install location> <location of archlinux-bootstrap.tar.gz file>
   # example
   wsl --import arch "d:\wslDistroStorage\arch" "d:\wslD*\archlinux-bootstarp.tar.gz"
@mal1kc
mal1kc / system_hardware_info.py
Last active July 11, 2022 15:24
system hardware info with python3 ;psutil module and builtin platform,datetime modules
import psutil
import platform
from datetime import datetime
def get_size(bytes, suffix="B"):
"""
Scale bytes to its proper format
e.g:
1253656 => '1.20MB'