Tran Sang Dev Blog
  • HOME
  • Meta Programming
  • Javascript
  • bash
Subscribe
Google Play Console AD_ID permission error

Google Play Console AD_ID permission error

In Google Play Console, if you get the following error. This post will show how to solve it. Error This release includes the com.google.android.gms.permission.AD_ID permission but your declaration on Play Console says your app doesn't use advertising ID. You must update your advertising ID
May 28, 2023 — 3 min read
Recommended javascript/nodejs resources

Recommended javascript/nodejs resources

I share several useful javascript/nodejs resources. * Everyday javascript, list of trending javascript projects including short-term trending stuffs: https://bestofjs.org/ * Medium/long-term trending javascript technologies, annual Javascript survey (multiple languages available): https://stateofjs.com/ Its sibling css version (multiple languages available): https://stateofcss.com/ * Learn javascript through efficient code
Apr 23, 2023 — 1 min read
Recommended flutter resources

Recommended flutter resources

I list several useful resources for Flutter dev. * Official home page: https://docs.flutter.dev/ * Flutter Layout Cheat Sheet: medium post, snapshot. * From the same author, Flutter Animation Cheat Sheet: medium post, snapshot, demo. * Inherited widget in deep (in Japanese, Flutter大学): post, snapshot. * Flutter gallery: a collection of available widgets,
Apr 23, 2023 — 2 min read
How to permanently enable iptables rules

How to permanently enable iptables rules

iptables rules are all lost when the PC is shutdown. This post shows how to permanently enable the added rules even after restarts. The post uses systemctl startup script introduced here. Suppose that you want to add this rule: -A INPUT -i docker0 -j ACCEPT -p tcp --dport 1234. Step
Mar 31, 2023 — 1 min read
How to patch a package with yarn

How to patch a package with yarn

Sometimes you need to quickly fix an npm package without waiting for a new version to be published which usually takes time. In this post, I will show you how to do that with yarn 2, without using any additional tools. For yarn 1 users, please use the patch-package package
Mar 16, 2023 — 43 min read
Intelij: prevent open file/directory with vscode

Intelij: prevent open file/directory with vscode

For me, it is so annoying that the "Show in Files" menu in Intelij IDE is replaced with "Show in Visual Studio Code" after installing VS Code. The "Open In" menu is also changed from "Files" to "Visual Studio Code". Screenshots after pressing ctrl + shift + @. Screenshots of the right-click menu:
Mar 6, 2023 — 1 min read
Create a multiple domains (SAN) self-signed SSL certificate

Create a multiple domains (SAN) self-signed SSL certificate

This post includes the following content: * Create a certificate signing request (CSR) * Create your own certificate authority (CA) certificate to self-sign the CSR * Test the signed certificate with chrome and curl Part 1: Create a certificate signing request (CSR) Step 1: Create a private RSA key openssl genrsa -out server.
Aug 31, 2022 — 9 min read
3 ways to use apt in a private server

3 ways to use apt in a private server

In this post, I will show 3 ways to use apt in a private server (a server that does not have direct internet access). Method 1: Download the .deb files and install them manually Adding  --print-uris to the apt command will print the URLs to download necessary .deb files. You
Aug 31, 2022 — 3 min read
SSH through a proxy server in one command line

SSH through a proxy server in one command line

This post shows you how to SSH through a proxy server. Prerequisites The local client is required to have OpenBSD netcat installed. There are 2 versions of netcat. Traditional netcat and OpenBSD netcat. This tutorial explicitly requires OpenBSD netcat. Traditional netcat won't work. See their difference here. In macOS: # nc
Aug 1, 2022 — 5 min read
CUDA/Cudnn/Driver/GCC/TensorFlow/Python version compatibility charts

CUDA/Cudnn/Driver/GCC/TensorFlow/Python version compatibility charts

Running (training) legacy machine learning models, especially models written for TensorFlow v1, is not a trivial task mostly due to the version incompatibility issue. This post will show the compatibility table with references to official pages. The general flow of the compatibility resolving process is * TensorFlow → Python * TensorFlow → Cudnn/Cuda
Jun 21, 2022 — 18 min read
How to add a user to an AWS EKS cluster

How to add a user to an AWS EKS cluster

Initially, when you create a Kubernetes cluster in AWS (or we call EKS = Elastic Kubernetes Service), only the creator can have full access to the cluster. Other AWS users, even with the Administrator access of the AWS organization, can see the cluster name and several general configurations, but cannot access
May 23, 2022 — 3 min read
Control multiple AWS organizations' access from a single AWS account

Control multiple AWS organizations' access from a single AWS account

You have your own AWS account (in your organization), and several accounts in client organizations. This post shows you how to manage all accesses in a single account. So that you do not have to log out and log in every time. Some values used in this post: * Your organization
May 23, 2022 — 2 min read
Some browsers have minimum font size settings in specific conditions

Some browsers have minimum font size settings in specific conditions

For security purposes, some browsers have a minimum font setting larger than zero by default in a specific condition. When your website has text with a font size smaller than 10px or 12px, you should expect that that text might be rendered as 10px (even you set it as smaller,
Mar 30, 2022 — 2 min read
ssh handshake is rejected with 'no mutual signature algorithm' error

ssh handshake is rejected with 'no mutual signature algorithm' error

It sometimes happens that although you have already set up your private/public key, you still cannot get connected to the remote server with ssh. In practice, there is an uncountable number of reasons: firewall, server configuration that restricts external access, ... The recommended method to find the reason is to
Jan 6, 2022 — 2 min read
Order of NULL in SQL result

Order of NULL in SQL result

This article explains the order of the NULL value in the ORDER BY clause in sql, with reference to the official document for each dialect. The default behavior The following SQL dialects consider NULL as the largest value (the last position in ascending order of any value type): PostgreSQL, Oracle.
Jan 6, 2022 — 3 min read
add-apt-repository does not work after updating to Python 3.9

add-apt-repository does not work after updating to Python 3.9

If you are using Python 3.9, you might get the following error when running the add-apt-repository command: Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 191, in if not sp.add_source_from_shortcut(shortcut, options.enable_source): File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line
Dec 16, 2021 — 1 min read
Remove unused XCode simulators

Remove unused XCode simulators

TLDR; Go to /Library/Developer/CoreSimulator/Profiles/Runtimes and delete your unused simulators. To quickly open the directory. There are 3 ways: * From the terminal, run open /Library/Developer/CoreSimulator/Profiles/Runtimes. * In Finder, press Cmd + shift + g, paste the directory path. * In Finder, select Go menu, select Go to
Apr 28, 2021 — 1 min read
Position/Dimension properties in Javascript

Position/Dimension properties in Javascript

Fundamental concepts * In general, x/ left suffices refer to the horizontal distance, while y/ top suffices refer to the vertical one. * Viewport is the area/portion of the web page (precisely speaking, the nearest iframe) that we can see on the screen. Imagine a web page is an infinite landscape,
Apr 15, 2021 — 12 min read
Screen/viewport movement commands in Vim and their mnemonic

Screen/viewport movement commands in Vim and their mnemonic

TLDR; * z z or z .: move the current line to the center (in German: zentrum) of the viewport. * z t: move the current line to the top of the view port. * z b: move the current line to the bottom of the view port. * ctrl y: move the viewport up
Apr 15, 2021 — 1 min read
Create swap space in Ubuntu

Create swap space in Ubuntu

Check the current swap space configuration Use swapon --show or free -h. If swap space is not used, swapon --show will output nothing, while free -h outputs with 0 bytes for swap, for example: total used free shared buff/cache available Mem: 1.9Gi 214Mi 138Mi 2.0Mi 1.6Gi
Feb 10, 2021 — 2 min read
Everything about event bubbling/capturing

Everything about event bubbling/capturing

Definition What is event bubbling? Most events attached to the DOM node do propagate (bubble/capture). In other words, when an event is triggered * It first goes from the most parent event (i.e., the window object) to the lowest descendant. This phase is called capturing. Note: IE does not
Dec 20, 2020 — 7 min read
PR review practices

PR review practices

I made this post to summarize several critical practices in the PR review process based on my experience. The list includes only essential rules, rather than general ones. Feel free to pick up and adopt any of them to your team. Hope that they can be helpful. -------------------------------------------------------------------------------- P1. Avoid
Nov 6, 2020 — 3 min read
My coding convention for React projects

My coding convention for React projects

In this post, I will share my coding convention for my React projects. If you think they are useful for your project especially at the initial setup stage of the project, please feel free to pick up any of them and apply to your team. Although these rules are rather
Oct 26, 2020 — 6 min read
Meta programming in Javascript

Meta programming in Javascript

From ES6, there are Proxy [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy] and Reflect [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect] classes that allow us to customize the objects at several language levels. For example property retrieval, assignment, iteration, function
Sep 14, 2020 — 1 min read
Check if a value is array type in Javascript

Check if a value is array type in Javascript

Check if a value is an array type. To check whether an object is array type, use Array.isArray() [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray] , instead of instanceof Array. Reason: instanceof Array does not work across realms ( window, iframe). Check here [https://stackoverflow.
Sep 13, 2020 — 1 min read
Tran Sang Dev Blog © 2023