Skip to content

Instantly share code, notes, and snippets.

View neolaw84's full-sized avatar

Ed. Law neolaw84

  • Asia Pacific
View GitHub Profile
@neolaw84
neolaw84 / _python_logger_best_practice.md
Last active May 13, 2024 02:40
Python Logger Best Practice

Python Logger Best Practices

Situation

Depending on where the code runs (dev, staging or prod) and what the intention of the run (debug/dev, integration test, production runs), the called modules/components need to log differently.

Current Practices

Current practice includes some code snippets like this:

@neolaw84
neolaw84 / microsoft_teams_in_citrix_with_linux_host.md
Last active May 13, 2024 02:40
Microsoft Teams in Citrix with Linux Host (Ubuntu 20.04) Won't Detect Audio Devices

Microsoft Teams in Citrix with Linux Host (Ubuntu 20.04) Won't Detect Audio Devices

Situation

  • Citrix (remote Windows 10 system) has Microsoft Teams Installed.
  • Citrix client is installed in Linux Host.
  • Microsoft Teams won't detect any audio device in Linux Host.

Pre-requisites

@neolaw84
neolaw84 / install_rocm_on_ubuntu_20.04.2_radeon_rx570.md
Last active June 3, 2024 12:13
Installing rocm on Ubuntu 20.04.4 + Radeon RX570

Install ROCm on Ubuntu 20.04.4 and Radeon RX570

Situation

Installing by closely following ROCm Installation Guide because :

  • it misses to install libnuma-dev and libncurses5
  • installing dkms breaks ROCm after reboot

Actions

@neolaw84
neolaw84 / README.md
Created May 6, 2021 10:01
Black Box App Needs Basic Authentication

Black Box App Needs Basic Authentication

Situation

We have a black box app (written in who-knows-what-language). This is usually a situation when we have an app running in a docker container. We need to enable very basic user/password authentication (to secure the site's content and to reduce chance of DDOS).

Action

Note: it is better to install and use WSGI parallel servers such as gunicorn but sometimes, for a docker app, that boat has already sailed.

@neolaw84
neolaw84 / README.md
Created May 6, 2021 07:32
Enabling SSH log-in to Google Cloud VM

Enabling SSH log-in to Google Cloud VM

Situation

We want to SSH into the newly created VM in Google Cloud. We already have the private key (id_rsa) and associated public key (id_rsa.pub)

Pre-requisites

  • You should have permossions to run gcloud utility.
@neolaw84
neolaw84 / README.md
Last active May 6, 2021 01:19
Setting up the Google Compute Engine Virtual Machine

Setting up the Google Compute Engine Virtual Machine

Situation/Problem

Need to set-up a Google Compute Engine Virtual Machine for development jobs. We need:

  • set-up ssh keys
  • java and maven
  • anaconda
  • docker
@neolaw84
neolaw84 / README.md
Last active May 6, 2021 01:22
Notes on RabbitMQ Clustering

Notes on RabbitMQ Clustering

RabbitMQ Clustering

I have experiences working in single-node RabbitMQ server. However, I don't have much experiences in a RabbitMQ cluster. This is the gist for myself after going through https://www.rabbitmq.com/clustering.html

Ways of Forming a Cluster

A RabbitMQ cluster can formed in a number of ways:

@neolaw84
neolaw84 / 01_spring_boot_web_ssl_x509.md
Last active July 2, 2024 11:26
Creating a Spring Boot Web (REST) service with SSL
@neolaw84
neolaw84 / mirror_git_repo_in_github.md
Last active May 25, 2019 05:45
Mirroring git repository in github

Mirroring a Git Repository in Github

Situation/Problem

A git repository is present in local (or somewhere on the net) but it is not in github.

We want to replicate the commit history (and all branches) in github.

Action/Solution