Skip to content

Instantly share code, notes, and snippets.

View nikAizuddin's full-sized avatar
⚠️
s t a t i c

Nik Mohamad Aizuddin nikAizuddin

⚠️
s t a t i c
View GitHub Profile
@nikAizuddin
nikAizuddin / podman-installation-on-ubuntu-2004-wsl2.md
Last active April 22, 2024 13:46
Podman Installation on Ubuntu 20.04 WSL2

Podman Installation on Ubuntu 20.04 WSL2

Execute the following command to install Podman:

sudo apt update
sudo apt install ca-certificates
. /etc/os-release
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
sudo apt update
; 1 2 3 4 5 6 7
;01234567890123456789012345678901234567890123456789012345678901234567890
;=======================================================================
;+---------------------------------------------------------------------+
;| |
;| Example using FPU registers for floating point calculations. |
;| |
;| The purpose of this source code is to demonstrate on how to |
;| do floating-point operations using FPU registers. |
;| |
@nikAizuddin
nikAizuddin / NASMx86: Allocate heap memory
Created October 12, 2014 22:58
Example using brk() system call for dynamic memory allocations
; 1 2 3 4 5 6 7
;01234567890123456789012345678901234567890123456789012345678901234567890
;=======================================================================
;+---------------------------------------------------------------------+
;| |
;| Example using brk() system call for dynamic memory allocations. |
;| |
;| DON'T CONFUSE that brk() used in C Function is different with brk() |
;| systemcall (systemcall 45 for x86 ASM). |
;| |
; 1 2 3 4 5 6 7
;01234567890123456789012345678901234567890123456789012345678901234567890
;=======================================================================
;+---------------------------------------------------------------------+
;| |
;| Example using FPU registers for floating point calculations. |
;| |
;| The purpose of this source code is to demonstrate on how to |
;| do floating-point operations using FPU registers. |
;| |
@nikAizuddin
nikAizuddin / Podman Installation on Ubuntu 22.04 WSL2.md
Last active October 21, 2023 21:42
Podman Installation on Ubuntu 22.04 WSL2

Podman Installation on Ubuntu 22.04 WSL2

Execute the following command to install Podman:

sudo apt update
sudo apt -y install podman

Execute podman info to initialize rootless Podman:

@nikAizuddin
nikAizuddin / asmx86_xlib_plainWin
Created September 30, 2014 09:12
Create simple window using ASMx86 with Xlib
;+------------------------------------------------------------------+
;| Create simple window using ASMx86 with Xlib |
;| --------------------------------------------- |
;| |
;| This source code demonstrates on how to create GUI using |
;| ASMx86 NASM Language with Xlib. |
;| |
;| HOW TO COMPILE |
;| ---------------- |
;| |
@nikAizuddin
nikAizuddin / README.md
Created September 23, 2023 17:06
ROCM Tensorflow

Spawn:

podman run --rm -it --network=host \
  --device=/dev/kfd \
  --device=/dev/dri \
  --ipc=host \
  --security-opt label=disable \
  docker.io/rocm/tensorflow:rocm5.5-tf2.11-dev \
  bash
@nikAizuddin
nikAizuddin / OpenGL 2.1 Draw3D Cylinder
Last active May 16, 2023 06:39
This program will draw a 3D cylinder using OpenGL 2.1 API
/*------------------------------------------------------------------+
| |
| This program will draw a 3D cylinder using OpenGL 2.1 API |
| |
| Language: C89 strict |
| Compiler: GNU GCC 4.8.3 |
| |
| Tested on Fedora 19 64-bit and Windows 7 64-bit, |
| both works with no errors and no warnings :) |
| |
@nikAizuddin
nikAizuddin / Print floating-point number to stdout (NASM, for Linux)
Created October 27, 2014 12:36
Print double precision value to stdout using x86 Assembly Language (NASM Assembler for Linux).
; 1 2 3 4 5 6 7
;01234567890123456789012345678901234567890123456789012345678901234567890
;=======================================================================
;+---------------------------------------------------------------------+
;| |
;| Print floating-point number to stdout |
;| |
;| This example shows how to print double value from FPU register |
;| to stdout. |
;| |
@nikAizuddin
nikAizuddin / Podman Installation on OpenSUSE Tumbleweed WSL2.md
Created February 25, 2023 05:56
Podman Installation on OpenSUSE Tumbleweed WSL2

Podman Installation on OpenSUSE Tumbleweed WSL2

Make sure all packages up-to-date:

sudo zypper dup

Restart OpenSUSE by executing the following command using Powershell:

wsl --shutdown openSUSE-Tumbleweed