Skip to content

Instantly share code, notes, and snippets.

View dukenmarga's full-sized avatar

Duken Marga dukenmarga

View GitHub Profile
@dukenmarga
dukenmarga / python3.12.md
Last active April 8, 2024 08:39
Compile and Install Python 3.12 on openSuse 15.6

Notes to install Python 3.12

  • Download Python 3.12 source from the official website
  • Extract the files
  • Configure the files wih optimization enabled
./configure --enable-optimizations
  • Generate installation script
@dukenmarga
dukenmarga / remove-space-in-boot.md
Created September 8, 2023 00:19
Reduce space in /boot when updating kernel openSuse 15

Operating System

Although this apply and proven to openSuse 15, but it is possible to apply this to other operating system.

Issue

When updating kernel to newer version, sometimes the process is halt since we are running out of /boot space. Typical error message is shown below.

installing package kernel-default-5.14.21-150500.55.19.1.x86_64 needs 2MB on the /boot filesystem
@dukenmarga
dukenmarga / firebase_downside.md
Created July 28, 2023 03:50
Firebase Downside

Can't use multiple equal or not equal

❌ We cannot use more than 1 NOT_EQUAL operator

allPost, err := fsClient.Collection("posts").
    Where("name", "!=", "post").
    Where("name", "!=", "quote").
    Documents(ctx).
    GetAll()
@dukenmarga
dukenmarga / linux.md
Created July 3, 2023 08:06
Linux Command Line

Convert SVG to PNG

Install ImageMagick first.

convert -density 1200 -resize 200x200 -transparent white input.svg output.png
@dukenmarga
dukenmarga / cheatsheet.md
Last active July 15, 2023 07:43
Go Lang

Checking Order when run/test a file.go

When we invoke go run file.go or go test, the compiler will check the following file sequentially. This is my observation and I don't have any valid resource to validate it.

  • file *.go (file.go)
    • check import-ed module
  • go.mod
    • check file exist
    • if missing, error: go.mod file not found
  • check module name
@dukenmarga
dukenmarga / jupyter-lab.txt
Created June 4, 2023 02:12
Jupyter Lab use virtualenv
Jupyter lab use venv
Inside virtual environment:
python -m ipykernel install --user --name=virtualenv
@dukenmarga
dukenmarga / Rocky Linux 1.md
Last active March 29, 2023 06:16
Rocky Linux 9: Install docker and network management

Network management

Source

Network Configuration - Rocky Linux 9

Introduction

NetworkManager is use to manage networking state. As of version 9, NetworkManager is replacing Network-Scripts. NetworkManager is running as service and the status can be checked using command below

@dukenmarga
dukenmarga / reason_to_use_fortran.txt
Created January 24, 2023 14:34
Valid Reason to Start Structural Analysis Software Project Using Fortran
Valid Reason to Start Structural Analysis Software Project Using Fortran
1. Trivial
- It has nice printing formatting by default
- Less keywords to memorize
- Long life since 1966 and will be keep alive by using modern standard
- Compiled and fast
2. Numerical Reason
- Supports matrix operation in simple terms compared to C/C++
@dukenmarga
dukenmarga / command.md
Created November 8, 2022 13:46
List of Useful Linux Commands

Generate Random String

Source

# Method 1: md5 Hash
echo $RANDOM | md5sum | head -c 20; echo;
996e405cb0cdd2e10299

# Method 2: UUID
cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20; echo;
c23174ce6fa149498fc7
@dukenmarga
dukenmarga / GitCheatSheet.md
Last active January 19, 2024 14:49
Git Cheat Sheet

Initialise a repository

git init

Basic

# Add
git add somefile.py