Skip to content

Instantly share code, notes, and snippets.

View dukenmarga's full-sized avatar

Duken Marga dukenmarga

View GitHub Profile
@dukenmarga
dukenmarga / python3.13.md
Last active December 5, 2025 05:18
Compile and Install Python 3.13 on openSuse 15.6

Notes to install Python 3.13

  • Download Python 3.13 source from the official website
  • Extract the files
  • Install required library header
sudo zypper install libffi-devel libbz2-devel gdbm-devel libuuid-devel libopenssl-devel zlib-devel readline-devel sqlite3-devel tk-devel
  • Configure the files wih optimization enabled
Deploy Function
gcloud config set project $PROJECT_ID
gcloud functions deploy $FUNCTION_NAME \
  --runtime $RUNTIME --set-env-vars "GCP_PROJECT=$PROJECT_ID" \
  --trigger-http --allow-unauthenticated \
  --update-labels feature=$FEATURE_LABEL \
  --docker-registry=artifact-registry
@dukenmarga
dukenmarga / IAM, Roles, and Permission.md
Created September 25, 2024 01:56
Google Cloud Platform

Roles and Service Account

To grant a user or our new app to do something on any resources on Google Cloud Platform, we or our app need permission that will grant us to perform anything that we want to do.

Two examples are:

  • We as user want to create a new Compoute Engine instance from Google Console. Then, we or let's say in this case our email need to have set of permission that allow us to create new instance.
  • Our new app made in Python deployed to Cloud Function need to create a Cloud Task queue or HTTP Task. We know that this app is triggered by HTTP request. How does Google know who run the app (not the one send the request)?
@dukenmarga
dukenmarga / python3.12.md
Last active December 15, 2024 11:36
Compile and Install Python 3.12 on openSuse 15.5

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