Skip to content

アメリカアクセントコースを受けて学んだこと

この記事は、アメリカ在住者向けのオンラインのアメリカ英語発音コースを受講して、新しく学ぶことが多かったので参考までに日本語でまとめたものです。アメリカの英語といってもいくつもアクセントがあるのですが、このコースではNatural Accentについて学びました。最も一般的な発音らしいです。 このコースは最初の試験でどれだけアクセントがあるかを、複数の英語利用のコンテキストから評価して、特に修正が必要なものを中心に練習していくコースでした。 このコースの概要は以下の通りです。 1時間のセッションが週1回ある。ほぼ毎週、3つほど修正が必要な母音・子音の発音や、ストレスについて学ぶ。 残りの時間はそのセッションで学んだことの練習期間。オンラインサービスで自分の発音を何度か聞きながら練習できるが、システム自体はかなり古いので、スマホには向いていない。 私自身はアメリカに5年以上住んでおり、仕事では英語でコミュニケーションしています。ですがアクセントが強く、他の人が理解できない発音で英語を話していることが多く、そのようなフィードバックを受けることもあるレベルです。 発音に関してはほとんど独学で、時々オンライン英会話の講師の方に部分的に教わっていました。 この記事の用語について 専門用語は、元の英語を以下のように和訳しています。 Syllable: 音節 Phonetic symbols: 発音記号 Stress:ストレス。音の強勢 Accent:アクセント。なまりや話し方の癖のこと Vowel:母音 Diphthong:二重母音 Consonant:子音 Consonant cluster: 子音群 Blend:連続子音 Contractions: 単語の短縮形。例えば、I amをI’mと表すこと Reduced form: 音の短縮形。例えば、Want toをWannaと発音すること 英語の発音について まず、ざっくりと日本語と英語の発音の違いについて、個人的な考えをまとめておきます。 日本語は基本的に 子音は母音と一緒に発音します。例外は「ん」。 ただし、「です」「すき」の「す」のように、無声子音(k, s, t, h, pなど)の後にあり、次も無声子音か語末になるiやuは、口の形はそのままで声帯が振動せず(母音の無声化)、子音だけのように聞こえることがあります。 文字と発音が一対一。 音節がどこにあっても発音の位置は変わりません。例えばトマトの最初と最後の「ト」の発音は基本的に変わりません。漢字で書くとスペルが変わる単語はあります。例えば「一」。 ストレスは音が高いか低いかの基本2パターン。例えば、はし(橋)とはし(箸)。 しかし英語はこれらがすべて異なります。 子音だけで発音されることが多い。 発音方法の方がアルファベット数よりも多い。発音の規則はあるが例外が非常に多い。 同じ発音記号を使用していても、発音が語尾にある場合とそうでない場合で異なる場合がある。 音の高さと強弱は、大げさにいえば歌うように変化する。 また母音に関しては、舌の位置と高さ、唇を丸めるかによって変わります。各母音ごとにどういう舌の位置や唇を丸めるかについては、母音図というものを調べると視覚的にわかるかもしれません。例えば、こちらのWebサイトがあります。 また、こちらのWebサイトでも詳しくこの図について解説されていますが、日本人が発音できないであろう er がなく、二重母音と呼ばれるそれに関連したarとor もないため、最初のサイトの母音図を確認されることをおすすめします。 今回受けたコースでは、カテゴリは細かく分類されていました。今回のコースで私が学んだのは、大体日本語にない音でした。 母音: /ɑ/, /oʊ/, /ɚ/, /ɝ/, /æ/ 二重母音: /ɑɚ/, /oɚ/ 最初に発音する子音: 最後に発音する子音: /ŋ/, /n/, /θ/, /ð/ 連続子音: /θr/ 発音しない/n/と/l/: /n/ 最後の子音群 単語の短縮形、音の短縮形 ストレスがどこにつくのかについてなども学びましたが、この記事では各音の発音方法のみを扱います。

Read more →

November 7, 2026

Learning Grafana Thanos architecture

The overview of Thanos is quite concisely explained in the following video. In this article, I collected some information, mainly from components pages in the official documents like this compactor page. Components Query Frontend This component is stateless and follow a few features. Query splitting Split long query into multiple short queries, based on --query-range.split.interval flag value. The default is 24 hours. Retry and caching Querier/Query This is stateless and horizontally scalable. This component is to aggregate and deduplicate multiple metrics.

Read more →

March 30, 2025

Learning Grafana Mimir architecture

Grafana Mimir is a multi tenant, horizontal scalable, long-term storages for Prometheus. In this article, I collect some information to understand how Mimir works to understand it’s benefit. There are some articles that you can read which might be more benefit. Mimir benefit Architecture The detailed architecture of an ingestion pipeline. graph TD subgraph Mimir Ingester1(Ingester 1) Ingester2(Ingester 2) KVStore((Key Value Store)) ObjectStorage((Object Storage)) Distributor --> KVStore Distributor -->|shard1| Ingester1 Distributor -->|shard2| Ingester2 Ingester1 --> ObjectStorage Ingester2 --> ObjectStorage Compactor --> ObjectStorage end Prometheus1(Prometheus 1) Prometheus2(Prometheus 2) Prometheus1 --> Distributor Prometheus2 --> Distributor A few features are supported by Grafana Mimir.

Read more →

March 28, 2025

Investigate a Redis cluster

Note This article contents haven’t been verified by running redis nodes. Please read official documents to verify the correctness of this document. tl; dr This is about a gist of this article. Redis cluster is multi-primary, multi-replicas cluster. A replica can be used to promote a primary node if one primary node is disconnected receive a query on a replica if a client sends a READONLY command a cluster redirects a client to access a correct node by replying MOVED command (permanent) or ASK (only once) if a request comes to an incorrect node from a client cluster_node_timeout is used to identify if a node is faulty state or not, and run failover And none of primary and replica nodes for a hash slot isn’t available, cluster doesn’t allow write queries anymore. Redis cluster 101 I’ve used a Redis as a cache in the past, but I’ve never learned how to operate a Redis, especially in a scale. In a large scaled DB system, there are a few things to be taken into account

Read more →

January 19, 2025

React reference

The quick reference for a React Hooks A react hook must be called at the top level of React’s components. useState useRef useRef is a useful for a value that’s not needed for rendering, because changing a ref does not trigger a re-render. This is particularly used to handle DOM elements in React. See the officla document for more details.

Read more →

June 22, 2024

Getting Started Stable Diffusion with LoRA models

1. About Stable Diffusion There are various terminologies and explanations about stable diffusion and LoRA, so it’s better to read them first: I’m also a beginner about these topics. Hugging Face: Using LoRA for Efficient Stable Diffusion Fine-Tuning Anakin.ai: How to Use Lora in Stable Diffusion - A Step-by-Step Guide Anakin.ai: How to Use Stable Diffusion Checkpoints - A Complete Guide In this article, I followed the article in Anakin.ai mostly.

Read more →

May 24, 2024

Cheat sheet for programming languages

Basics PHP Python Golang TypeScript null None nil null Undefined key undefined Equal $var1 == $var2 var1 == var2 var1 == var2 var1 == var2 Strict equal $var1 === $var2 var1 === var2 Null Coalescence $var ?? 'default' var ?? 'default' Null Assertion (Ignore null value) var! Strict equal in TypeScript 2 variables have the same types Syntax for types PHP Python Golang TypeScript Type Alias type NewType OldType type VariableType = OldType type FunctionType = (var: number) => void Interface interface Interface { method(var int) void } interface VariableInterface { var: number; } interface FunctionInterface { (var: number): void; } The difference of type and interface between TypeScript:

Read more →

April 28, 2024

Linux command cheetsheet

String handling For more details, see a shell parameter expansion page. $[var##pattern}: Remove the beginning of a string matching a pattern var=“abc%cdg.txt” echo ${var##.} txt echo ${var##%} cdg.txt ${var%%pattern}: Remove the trailing portion of a string matching a pattern var=“abc%cdg.txt” echo ${var%%.} abc%cdg echo ${var%%%} abc Basic commands file names basename: Extract the basename of a file from a file path dirname: Extract the parent directory name from a file path grep grep’s regular expression is basic regular expression as default.

Read more →

March 30, 2024

Getting Started with Golang text/template

Template package First example It outputs the result to Stdout Insert variables into a template Use Go playground {% raw %} type TemplateVariables struct { Name string } tmpl := template.Must(template.New("template").Parse(`{{ .Name }}`)) err := tmpl.Execute(os.Stdout, TemplateVariables{ Name: "name inserted", }) if err != nil { return err } return nil {% endraw %}

Read more →

August 5, 2023

Follow Kubernetes the Hard way

This article was written by just following Kelsey Hightower’s Kubernetes Hardway document to understand Kubernetes internal architecture. Overview Control plane The control plane’s overview: Each node on the control plane: etcd: Store cluster states 2379: Client API port 2380: Peer API port Kubernetes API Server 6443 Scheduler Controller Manager nginx For HTTP heath check from GCP Load Balancer Each middleware was installed by systemd.

Read more →

June 19, 2023

GCP Billing Analyze

There are a few documents to manage billing data in BigQuery Attribution of committed use discount fees and credits How to export to BigQuery Structure of the standard data Queries Sum of all costs From the official document: SELECT invoice.month, SUM(cost) + SUM(IFNULL((SELECT SUM(c.amount) FROM UNNEST(credits) c), 0)) AS total, (SUM(CAST(cost AS NUMERIC)) + SUM(IFNULL((SELECT SUM(CAST(c.amount AS NUMERIC)) FROM UNNEST(credits) AS c), 0))) AS total_exact FROM `project.dataset.gcp_billing_export_v1_XXXXXX_XXXXXX_XXXXXX` GROUP BY 1 ORDER BY 1 ASC ; How to calculate commitment fees From the official document:

Read more →

May 3, 2023

Getting started cgroups for kubernetes resource requests and limits

Overview There are many excellent articles or videos describing what is Kubernetes CPU resources requests and limits and how they are implemented. Watch followings to understand how the CPU resource requests and limits of a container on the Pod spec works on a Linux host with cgroup. Kaslin and Kohei’s video in CNCF in 2021 A YouTube video The slides of this video Shon’s articles CPU resource requests CPU resource limits {% comment %} https://blog.kintone.io/entry/2022/03/08/170206 https://medium.com/omio-engineering/cpu-limits-and-aggressive-throttling-in-kubernetes-c5b20bd8a718 https://engineering.squarespace.com/blog/2017/understanding-linux-container-scheduling {% endcomment %}

Read more →

April 27, 2023

Manage kubernetes StatefulSet

Operations Increase the storage sizes without downtime We cannot update the resources.storageSize of the StatefulSet to increase the volume sizes. So, we have to follow a few steps to update them. See this article for more details. Confirm if the storageclass of persistent volumes has .allowVolumeExpansion=true > kubectl get storageclass standard -o yaml | yq .allowVolumeExpansion true ``` Update all PVC to have more storage sizes Delete the statefulset objects without deleting pods by kubectl delete statefulset $statefulset_name --cascade=orphan Recreate the statefulset with the new storage size

Read more →

March 23, 2023

Getting Started OpenTelemetry on Golang

Getting Started At first, develop a tutorial in the official document and develop a go clients.

Read more →

March 19, 2023

The Basics of Elasticsearch

Following videos are helpful to understand the overview of Elasticsearch more. Elasticsearch architecture About search relevance Documents and index Document: JSON object, equivalent to a row in a table of RDBMS Index: The set of documents collected by the same type of data. For exaple, one index is for a user, second one is for a product in an e-commerce service. Elasticsearch Cluster

Read more →

March 15, 2023

Getting Started with Grafana Tempo

Grafana Tempo Follow this example. Install grafana tempo with microservices-tempo-values.yaml. I commented out storage values because when I tried to use GCS, it failed due to the permission issue to access GCS Added the grafana tempo as the data source of Grafana and see if it works The service is -gateway created by the helm chart Update Grafana Operator I deployed the Grafana by grafana-operator on this post. So, it was required to update Grafana by following this example

Read more →

March 12, 2023

Prometheus Metrics Overview on Grafana

In this post, some variables defined in Grafana are used for Prometheus metrics, including $__rate_interval: This article describes the benefit of this variable Kubernetes Metrics These metrics require installing some of followings: Node Exporter kube-state-metrics cAdvisor Node metrics CPU utilization per node: 1 - (avg by (instance)(rate(node_cpu_seconds_total{mode="idle"}[$__rate_interval]))) Memory utilization per node: 1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) Disk utilization per node: 1 - (node_filesystem_avail_bytes / node_filesystem_size_bytes) Number of pods with a certain phases on a node (from this comment): sum by(node)(kube_pod_info{} * on(pod, namespace) group_right(node) kube_pod_status_phase{phase="$phase"})

Read more →

March 12, 2023

Set up a Grafana operator

Follow this document mainly. Set up a Grafana First, clone a repository and apply a change. kubectl kustomize deploy/manifests -o grafana-operator.yml kubectl apply -f grafana-operator.yml Then create a Grafana resource in the same namespace. I tried to create it in the different namespace, but didn’t work for some reasons.

Read more →

February 27, 2023

Use Google Secret Manager in a GKE cluster

There are an awesome article about the options to use the Google Secret Manager and their pros and cons. In this article, use Secrets Store CSI Driver by following this page. Set up a secrets store CSI driver First, install the secrets-store-csi-driver in kube-system namespace helm repo add secrets-store-csi-driver https://kubernetes-sigs.github.io/secrets-store-csi-driver/charts helm install csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver --namespace kube-system Next, install the GCP provider for the secrets store CSI driver from this repository. Unfortunately, there is no helm chart as the time of this post is written, according to this GitHub issue.

Read more →

February 26, 2023

Set up a config sync in a GKE cluster

Basically, follow this document Enable a Config Sync Select **Install Config Sync > your cluster" Clear the Enable Policy Controller checkbox and click Next. Leave the Enable Config sync checkbox enabled. In the Repository list, select “Custom”. Set your repository on your URL and click “SHOW ADVANCED SETTINGS” Choose how to read a GitHub repository by one of the ways described in this document. I used a GitHub Token which will be expired shortly. And set it out on our cluster. Set the Configuration directory as the root directory on the repository. I set config-sync Change the Source format to hierarchy. You can see the details about it in here. Set up a GitHub repository Create files under the config sync directory set above and see if the config sync works. The guestbook is the manifest set no the other getting started in this post.

Read more →

February 25, 2023

Set up a prometheus by a prometheus operator in a kubernetes cluster

This document is written by following this document. Install a prometheus operator First, create CRDs and resources in the default namespace. set LATEST (curl -s https://api.github.com/repos/prometheus-operator/prometheus-operator/releases/latest | jq -cr .tag_name) curl -sLO https://github.com/prometheus-operator/prometheus-operator/releases/download/$LATEST/bundle.yaml kubectl apply -f bundle.yaml Note that I failed to create a prometheus resource because the CRD definition was too big like next.

Read more →

February 25, 2023

Set up a vertical pod autoscaler in a GKE cluster

To figure out which kubernetes objects are how much resource, a vertical pod autoscaler might be useful. It has a feature to either automatically update values, or suggest values. But it cannot be used with a horizontal pod autoscaler to update values if the horizontal pod autoscaler doesn’t use a custom or external metrics. In that case, use a multidimensional pod autoscaling. In this post, it’s to test a vertical pod autoscaler by following this document and this article.

Read more →

February 25, 2023

Manage TiKV regions on TiDB

TiDB data is split into multiple nodes and they’re called the name as a region. In this document, I just played around to confirm the places and behaviors for regions on TiDB. Manage TiKV regions through PD metadata To handle PD metadata from CLI, follow this document. At first, a port-forward to access PD pods kubectl port-forward -n tidb-cluster svc/basic-pd 2379:2379 &>/tmp/portforward-pd.log & Then run following sub commands to check each. These commands are one of pd-ctl, listed in this document, and to execute them, it has to add a command like tiup ctl:v6.5.0 pd -u http://127.0.0.1:2379 store:

Read more →

February 11, 2023

Online Schema Change on TiDB

There is a good video to describe a algorithms of TiDB: Also, there are a few documents related to online DDL The Online DDL design is descrbed in this design document Google F1 algorithm, which is refered from TiDB online schema change, is described in this research paper Online Schema change It seems it’s unable to confirm the schema version on TiKV node. Inside a PD node, it’s stored in the /tidb/ddl/global_schema_version in the etcd according to this article.

Read more →

February 11, 2023

Getting Started with cue

Install go install cuelang.org/go/cmd/cue@latest Generate a YAML file from cue Prepare a sample file user.cue by a cue

Read more →

February 9, 2023

Getting Started with Kubernetes API by Kubebuilder

This document just follows a quick tutorial for kubebuilder and learn its behavior. Install Install kubebuilder. curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/$(go env GOOS)/$(go env GOARCH) chmod +x kubebuilder && mv kubebuilder /usr/local/bin/ Workaround a first project At first, create a project and a Guestbook API, and make manifests

Read more →

February 9, 2023

Working around MySQL lock metadata

There are multiple documents about innodb locks on MySQL 5.7: InnoDB locking Locks Set by Different SQL Statements in InnoDB Using InnoDB Transaction and Locking Information Granularity of locks There are 4 types of granularity of locks Shared lock Exclusive lock Intention shard lock Intention exclusive lock Types of locks Record locks Gap locks Next-Key locks the value in the index for the next-key lock indicates as “supreme” pseudo-record, which is not a real value Insert Intention locks AUTO-INC locks This is a table lock, and how to lock the table depending on the configuration of innodb_autoinc_lock_mode Lock tables information_schema.innodb_trx information_schema.innodb_locks information_schema.innodb_lock_waits Use cases Update queries without an index Create a test table and insert a few records.

Read more →

January 16, 2023

Upgrade Windows 10 to Windows 11

I used to use Windows 11, but for some reasons, the OS stopped working and I needed to clean-install it from Windows 10 from windows recovery environment. After installing and trying to install Windows 11, there are a few things I needed to do. Note that my motherboard was AMD B450. Enable UEFI boot on BIOS In order to enable to UEFI Boot on BIOS, I needed to do Convert the disk from Master Boot Record, MBR, into GUID Partition Table, GPT, partition style. Disable Compatible Support Module, CSM on BIOS to enable UEFI boot Note that I didn’t have to do at the end, but I tried to enable Secure Boot on BIOS, but it prevented to boot Windows and needed to reset the bios configuration by taking its battery, described in this article.

Read more →

January 14, 2023

Getting Started TiDB on GKE

See another post also to set up a TiDB on minikube. To get the basic concept and architecture of TiDB, there are many articles and videos on the Internet, like following: Set up a TiDB cluster by Kubernetes Operator Follow the official document for GKE and the official document for kubernetes operator for this document. ext4 file system configuration It’s recommended to configure following options for better I/O performance for ext4 file system.

Read more →

January 8, 2023

Getting Started Containerd

Overview containerd is designed to built with a larger system like kubernetes. To see the overview, it’s better to check something like As the above video shows, it depends on plugins or runtime outside of its core by gRPC or the light weight gRPC (ttRPC), like runc for container runtime runc is a tool to manage containers on Linux following the OCI specification Install Following the official document, install a containerd from the official binaries.

Read more →

December 26, 2022

MySQL server configuration

Logs About slow queries slow_query_log = 1 slow_query_log_file = /var/log/mysql/slow_query.log long_query_time = 0 log_queries_not_using_indexes The field long_query_time is the time to output a query as a slow log. The meanings of other fields are obvious.

Read more →

December 23, 2022

SSH client

SSH configuration This is the mapping between config file /.ssh/config and ssh cli options. config file field cli option Description ForwardAgent -A or -a Enable to use locale machine’s keys on remote machines SSH password Store the key and access on remote machine without inputting a password. See stackoverflow for details. How to add password to the private key without a password Use: ssh-keygen -p -f /path/to/key. For example, ssh-keygen -p -f ~/.ssh/id_rsa

Read more →

December 23, 2022

ProxySQL Getting Started

The official document: Docker image and initial configuration Getting Started See this docker-compose.yml and proxysql.cnf for the example of proxysql. With this configuration, you can access a proxysql by docker compose up -d mysql -h 127.0.0.1 -u radmin -P 16032-pradmin --prompt "ProxySQL Admin> " There are multiple ports

Read more →

October 15, 2022

Getting Started with TiDB by Kubernetes Operator

Getting Started Use minikube by following this document Start minikube minikube start alias kubectl="minikube kubectl --" kubectl cluster-info Apply an operator Install its CRDs

Read more →

May 1, 2022

Getting Started with Vitess by Kubernetes Operator

There are fewer lock contentions to worry about, replication is a lot happier, production impact of outages become smaller, backups and restores run faster, and a lot more secondary advantages can be realized Getting Started Docker Follow this tutorial git clone git@github.com:vitessio/vitess.git cd vitess make docker_local ./docker/local/run.sh Kubernetes Operator Prerequisite Follow this tutorial.

Read more →

May 1, 2022

MySQL backup and restore

In this article, explain how to backup MySQL database using Percona Xtrabackup. There are two binaries, innobackupex and xtrabackup. innobackupex is a wrapper for xtrabackup and it was going to be removed. It might have been deleted from version 8.0. Getting Started Installation Follow this tutorial wget https://downloads.percona.com/downloads/Percona-XtraBackup-LATEST/Percona-XtraBackup-8.0.23-16/binary/tarball/percona-xtrabackup-8.0.23-16-Linux-x86_64.glibc2.17.tar.gz tar xvf percona-xtrabackup-8.0.23-16-Linux-x86_64.glibc2.17.tar.gz mv percona-xtrabackup-8.0.23-16-Linux-x86_64.glibc2.17 /usr/lib export PATH=/usr/lib/percona-xtrabackup-8.0.23-16-Linux-x86_64.glibc2.17 /usr/lib:$PATH Run backup Full backup See this page for more information about full backup and a streaming backup examples.

Read more →

March 19, 2022

tmux

Basic configuration There are a few options to use set. set-option: an alias of a set -s: server option -g: global option setw or set-window-option: window option See StackExchange: Difference between global, server, session and window options for more details about these options and how they’re effective. Other references Stack overflow: What are the differences between set -g, set -ga and set-option -g in a .tmux.conf file?. Plugin management TPM is a plugin to install plugins easily for tmux.

Read more →

March 13, 2022

Getting Started with Next.js

Set up TypeScript Next.js with Material UI Follow this article npx create-next-app --typescript mui cd mui nodenv local 17.1.0 npm install @mui/material @mui/icons-material @emotion/react @emotion/styled Then use one of a material component. Dark mode or light mode Follow this official page.

Read more →

February 6, 2022

setup a ubuntu desktop computer

I set up Ubuntu for the 1st time since several years ago. Set up basic configuration Settings Open Show Applications > Settings and set each configuration. Displays Set a resolution I ended up to set 1920x1080. At first, I set 3920x2160 but, there was a performance issue with my graphics card. I reduced the resolution to 2880x1620 (16:9), but there was a garbled issue on many applications. Enable Night light mode Open Night Light tab Enable Night Light toggle Mouse & Touchpad Change the scroll direction on the middle button of a mouse by turning on Mouse > Natural Scrolling.

Read more →

January 23, 2022

Getting Started with MySQL Orchestrator

Orchestrator is a tool for MySQL HA and replication management. Getting started This is a simple set up document to set up an orchestrator. I just followed these documents at first. https://github.com/wagnerjfr/orchestrator-mysql-replication-docker https://github.com/openark/orchestrator/blob/master/docs/install.md Prerequisite In order to promote a read replica to a main DB, it looks GTID based replication needs to be enabled. Build a docker image At first, build a docker image. I couldn’t find which docker image in DockerHub can be used in a docker-compose.

Read more →

November 7, 2021

Getting started to Consul

Consul is developed by Hashicorp to provide a few features like a service discovery. This document is to learn a little bit about setting up Consul to understand it as a first step, but not for production purpose. So far, this includes To set up consul agents To use a consul client to access the agent Look up a web server from the consul datacenter The first step for consul servers In the first step, I refer to next page.

Read more →

November 6, 2021

MySQL Replication

This configuration is for the version 5.7 and it’s minimum configuration in the official document. There are 2 types of replication setup. Using binary log file positions Using Global Transaction Identifiers Binary logging replication There are a couple of important configurations server-id: The unique ID on each server, and must be a positive integer between 1 and 2^32-1. The default value is 0. log-bin: the file name for binary logs. This is required to enable replications using binary loggings. Binary loggings are not required on read replicas, but they can be used for data backups and crash recovery. Besides,

Read more →

November 5, 2021

gh-ost

gh-ost gh-ost is an online migration tool for MySQL developed by GitHub. There is a video to describe what issue gh-ost is used to solve. Getting Started There are documents that are helpful for this article. Cheatsheet Prerequisite When gh-ost connects to a replica and migrates on master If a replication is SBR log_bin and log_slave_updates must be enabled on a read replica server binlog_format=ROW If a replication is RBR When gh-ost connects to a main DB and migrates on master A replication must be RBR Build a binary from source code > wget https://github.com/github/gh-ost/releases/download/v1.1.2/gh-ost-binary-linux-20210617134741.tar.gz --2021-07-28 15:40:14-- https://github.com/github/gh-ost/releases/download/v1.1.2/gh-ost-binary-linux-20210617134741.tar.gz Resolving github.com (github.com)... 192.30.255.112 Connecting to github.com (github.com)|192.30.255.112|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github-releases.githubusercontent.com/54378638/0a93f200-cf85-11eb-8870-035762e21f3a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210728%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210728T063905Z&X-Amz-Expires=300&X-Amz-Signature=993eae9ee5e3b05bc105d62feb28ffe1d76ee2dd3c1ef7c2a77d7e16c72b3ccb&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=54378638&response-content-disposition=attachment%3B%20filename%3Dgh-ost-binary-linux-20210617134741.tar.gz&response-content-type=application%2Foctet-stream [following] --2021-07-28 15:40:14-- https://github-releases.githubusercontent.com/54378638/0a93f200-cf85-11eb-8870-035762e21f3a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210728%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210728T063905Z&X-Amz-Expires=300&X-Amz-Signature=993eae9ee5e3b05bc105d62feb28ffe1d76ee2dd3c1ef7c2a77d7e16c72b3ccb&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=54378638&response-content-disposition=attachment%3B%20filename%3Dgh-ost-binary-linux-20210617134741.tar.gz&response-content-type=application%2Foctet-stream Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.108.154, 185.199.110.154, 185.199.111.154, ... Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.108.154|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 4710185 (4.5M) [application/octet-stream] Saving to: ‘gh-ost-binary-linux-20210617134741.tar.gz’ gh-ost-binary-linux-202106171 100%[=================================================>] 4.49M 4.18MB/s in 1.1s 2021-07-28 15:40:15 (4.18 MB/s) - ‘gh-ost-binary-linux-20210617134741.tar.gz’ saved [4710185/4710185] > tar -xzvf gh-ost-binary-linux-20210617134741.tar.gz gh-ost > ./gh-ost --version 1.1.2 > mv gh-ost /path/to/bin/ Dry run a migration without a real update Without an --execute option, gh-ost runs DB migration for testing. Next CLI runs to add new column email on my_table in my_schema DB.

Read more →

October 31, 2021

jq cheetsheet

jq is used to parse JSON result, format and output on the cli. This document shows brief overview for how to Basics Using variables: exp as $var | exp length as $array_length | add / $array_length Boolean operations: AND: exp and exp OR: exp or exp string functions: contains(substr) returns boolean startswith(substr) returns boolean join(separator) returns string select can be used to filter specific records from_entries can be used to parse Use cases Get the object of any key exp | to_entries | .[].value | exp Output CSV/TSV result from JSON @csv and @tsv can be used to format the array with CSV or TSV

Read more →

October 31, 2021

Overviews for Apache cassandra

Apache Cassandra Column Store Structure Clusters: Container for Keyspaces Keyspace = DB in RDBMS Confiure replication strategies, for example Column Family = Table in RDBMS Column can be added at any given time Architecture explanation Read Anti-Entropy: use latest data from one node Write Append only even for updates Compaction is used not to blow disk out

Read more →

July 30, 2021

IntelliJ plugin development

Getting started Set up a project See this page for the details. Create a new repository from the template repository Update a repository to follow README Update pluginGroup, pluginId, and plugin name Update a repository for your purpose Publish a plugin manually at first It requires a review from JetBrains and need to wait for a few days Development a plugin Run a plugin in an IntelliJ IDE See an official page for more details.

Read more →

July 24, 2021

Go MySQL client

MySQL connections See also this article for further details. MySQL Driver configurations The repository for MySQL driver is https://github.com/go-sql-driver/mysql DSN parameters The DSN parameters for timeout is either application layer and TCP layer and they’re on client sides. timeout: a dial timeout. Actual code readTimeout: Used to set timeout for reading data from I/O. This is used for net.Conn.SetReadDeadline Usages Set ReadDeadline for a buffer Check connection for a first query from a connection pool writeTimeout: Used to set timeout for writing data from I/O. This is used for net.Conn.SetWriteDeadline Usages Code for writting a packet MySQL server configurations Even if the client connection is disconnected, queries on MySQL servers can keep running. On MySQL server side, some configurations like wait_timeout is used to close a non-interactive “idle” connection. See this answer, for example.

Read more →

May 17, 2021

Setup a windows desktop computer

This is written on March 2021. I set up Windows for the 1st time since several years ago and there was a lot of difference between recent version and the version I used. This page collects information for something it would have been helpful for setting up windows for me. Setup for software development Join Windows Insider Program Windows Insider Program provides users to access applications from their dev, beta, or preview releases. This is helpful to use some applications before it becomes stable releases, like WSL, and many documents on the Internet is also written for these pre-stable versions.

Read more →

March 22, 2021

Notes when I updated a WSL version from 1 to 2

I mostly followed this article to update a WSL version, except that I didn’t enable Hyper-V until then and got an error Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS. while I was trying to update the vesrion. These are steps I did to update the WSL version. Ran PowerShell as Administrator. Enabled the Windows Subsystem for Linux by next command. PS C:\Windows\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart Deployment Image Servicing and Management tool Version: 10.0.19041.844 Image Version: 10.0.19042.868 Enabling feature(s) [==========================100.0%==========================] The operation completed successfully. Enabled Virtual Machine Feature by next command. PS C:\Windows\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart Deployment Image Servicing and Management tool Version: 10.0.19041.844 Image Version: 10.0.19042.868 Enabling feature(s) [==========================100.0%==========================] The operation completed successfully. Tried to set the default vesrion of WSL to 2 and got an error. PS C:\Windows\system32> wsl --set-default-version 2 Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS. For information please visit https://aka.ms/wsl2-install Checked if Hypber-V was enabled on my machine. In order to use WSL 2 on Windows 10, a CPU has to support Hyper-V. We can check whether CPU enables it or not on the result of msinfo32, which I found on this article. My result was Hyper-V - VM Monitor Mode Extensions: Yes Hyper-V - Second Level Address Translation Extensions: Yes Hyper-V - Virtualization Enabled in Firmware: No Hyper-V - Data Execution Protection: Yes Enabled Hyper-V on a BIOS setting. Because my CPU was Ryzen 5, I followed this comment. So, I restarted my computer, went to Advanced Frequency Settings > Advanced CPU Settings and enabled on SVM mode. Then restarted my computer again. Set default version of WSL to 2. Now it worked to me. PS C:\Windows\system32> wsl --set-default-version 2 For information on key differences with WSL 2 please visit https://aka.ms/wsl2 Updated existing distribution to 2. I also updated Ubuntu which I installed before. We can check the version of installed distributions by wsl -l -v and can also update them by wsl --set-version [Name] [Version]. PS C:\Windows\system32> wsl -l -v NAME STATE VERSION * Ubuntu Running 1 Ubuntu-20.04 Stopped 1 PS C:\Windows\system32> wsl --set-version Ubuntu 2 Conversion in progress, this may take a few minutes... For information on key differences with WSL 2 please visit https://aka.ms/wsl2 Conversion complete. PS C:\Windows\system32> wsl -l -v NAME STATE VERSION * Ubuntu Stopped 2 Ubuntu-20.04 Stopped 1

Read more →

March 16, 2021

Compare static site generator

There are many web sites to compare static site generator, but they miss some explanations that require to me. For some people, these features are important for static site generator, Their own domain name, i.e., we do not have to buy our own domain Markdown files can be used to publish static site pages without customizing anything GitHub private repository is also supported Price is free Optional: HTTPS is supported Comparison Frameworks Gatsby Markdown: There is a plugin gatsby-plugin-mdx, and it’s added by npm init gatsby, but I couldn’t find how to enable it Next.js Markdown: Customization is required. See this blog There is a downside of routing a file: https://medium.com/frontend-digest/which-to-choose-in-2020-nextjs-vs-gatsby-1aa7ca279d8a Hugo Markdown: Supported and it’s included in a quick start step. price: Platform Gatsby Cloud Domain name: Maybe Price: Free Netlify Domain name: GitHub private repository Price: Reference Techrader: Best static site generators of 2021 SNIPCART: Choosing the Best Static Site Generator for 2021 SCOTCH: Top 11 Static Site Generators in 2020

Read more →

March 8, 2021

PHP Benchmarks

PHPBench framework There is an phpbench for php benchmarks. Set up Install: composer require phpbench/phpbench --dev Add phpbench.json under a project root directory { "bootstrap": "vendor/autoload.php" } Example of benchmark code The example to run a benchmark code. There are a few annotations for methods of phpbench. For example, - Revs: How many times code is executed within a single measurement. - Iterations: How many times measure execute the benchmark

Read more →

September 3, 2020

Getting Started with Kubernetes Cronjob

Configurations Important fields .spec.jobTemplate.spec.template.spec.restartPolicy: How to handle when a container in a pod. Note that this doesn’t mean a job restarts or not (it’s commented on this github issue). onFailure: Restart a container in the same pod when it fails. Never: Restart a container with new pod. .spec.concurrencyPolicy: How to handle concurrent jobs Allow (Default): Allows concurrent runs Forbid: Does not allow concurrent runs Replace: Replace old job with new job if previous job hasn’t finished when it’s time to schedule new job .spec.successfulJobsHistoryLimit, .spec.failedJobsHistoryLimit: How many pods is kept after it succeeded or failed .spec.startingDeadlineSeconds: How long jobs keep trying to start. Also, see a pitfall section. Pitfalls StartingDeadlineSeconds A cronjob stops starting jobs if it “misses” jobs more than 100 times in a specific period related with .spec.startingDeadlineSeconds. The details are explained in here.

Read more →

August 16, 2020

Getting Started with Kubernetes Deployment

The deployment is many use cases and in this page, they’re not described. For the details for those use cases or the concept of deployment, see official page. kubectl commands Revisions and rollbacks How to get revision history of deployments. To see revision history: kubectl rollout history deployment.v1.apps/[deployment name]. For example: kubectl rollout history deployment.v1.apps/test-deployment deployment.apps/test-deployment REVISION CHANGE-CAUSE 135 <none> 137 <none> 138 <none> 139 <none> 140 <none> 141 <none> 142 <none> 143 <none> 144 <none> 145 <none> 146 <none> To see the detail of a revision: kubectl rollout history deployment.v1.apps/[deployment name] --revision [revision number] > kubectl rollout history deployment.apps/test-deployment --revision 145 deployment.apps/test-deployment with revision #145 Pod Template: Labels: app=test-deployment env=prod pod-template-hash=c7d84d6fc Annotations: prometheus.io/port: 9100 prometheus.io/scrape: true Containers: test-deployment: Image: gcr.io/test-project/test-deployment:tag Port: <none> Host Port: <none> Limits: cpu: 1 memory: 256Mi Requests: cpu: 1 memory: 256Mi Environment: DEBUG: false Mounts: <none> Volumes: <none> How to rollback deployment: kubectl rollout undo deployment [deployment name] (--to-revision [revision number]). Examples: Rollback to the previous version. > kubectl rollout undo deployment test-deployment deployment.extensions/test-deployment rolled back Rollback to a specific version. > kubectl rollout undo deployment test-deployment --to-revision 2

Read more →

August 16, 2020

Helm Client

Command list Deployment See revision history: helm history <release name> Rollback: helm rollback <release name> [revision] Rollback to the previous version if revision is 0. (from this github comment) Troubleshootings How to downgrade helm client version using Homebrew If helm versions are incompatible with servers, then helm cli can’t be used. See this issue for the details of issues and solutions. To sum up, following commands should be ran to downgrade the version to 2.11.0 In order to downgrade the helm cli version, we have to use

Read more →

August 16, 2020

MySQL Performance

This document is written for MySQL 5.7, so these contents may be not correct for other versions. In this page, performance_schema is mainly discussed. Latency monitorings There are some tables in performance_schema to check the number of queries for the table. If you are interested in other information, please see other web pages like “What Does I/O Latencies and Bytes Mean in the Performance and sys Schemas?”. table_io_waits_summary_by_table table in performance_schema The details of this table is described in official page. This table stores all I/O wait events, including select, insert, update, and delete DMLs.

Read more →

August 8, 2020

Overview about MySQL Lock

This document is written for MySQL 5.7, so these contents may be not correct for other versions. Lock timeout When you run DDL or DML, in some cases, you may get next error. ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction This is related with lock_wait_timeout variable.

Read more →

August 8, 2020

Git hooks

Configurations Template directory See this article and this for details. Git template is the directory to gets copied everytime when a repository is created or cloned. Set a template directory: git config --global init.templatedir '~/.config/git/templates' Create a directory for hooks: mkdir -p ~/.config/git/templates/hooks Now we can add the hook under ~/.config/git/templates/hooks directory, like post-commit file which is executable. Pre-commit I think pre-commit hook is most useful hook of all git hooks. For example, in order to check the code is good to commit by running lint tools. Due to this, there are some useful tools to configure hooks easily.

Read more →

July 24, 2020

Gitconfig

Configuration The detail for gitconfig is written in official page. Conditional includes includeIf section can be used to include another git configuration under certain conditions. gitdir: If repositories are under a specific directory, glob pattern can be used. Note that the path of this should end with /. gitdir/i: The same as gitdir but case-insensitive matching, onbranch: If current branch matches the glob pattern of onbranch. For example, there are two files ~/.gitconfig and ~/.gitconfig-group.

Read more →

July 24, 2020

Compare performances of gRPC server streaming and pagination of unary RPC

There are some cases that we wanna fetch all records that are matching with a certain condition from an other gRPC server. In these cases, there are at least 2 possible solutions to implement it, by gRPC server streaming or pagination. In this post, in order to check the benefit of the performance of gRPC server streaming over pagination, running benchmarks for the both of pagination and server streaming, and checked the performances.

Read more →

May 17, 2020

Overview of gRPC

Written in March, 2020. gRPC is the protocol using HTTP/2. For the details, please take a look for a official page. This page explains how to use it in go and how it behaves. Types There are some types for RPC. unary RPC server stream RPC client stream RPC bidirectional stream RPC Using stream RPC, multiple messages can be sent on a single TCP connection. Examples Examples include unary RPC(SayHello) and server stream RPC(KeepReplyingHello).

Read more →

May 17, 2020

bigquery usages

Functions String REGEXP_REPLACE Syntax: REGEXP_REPLACE(value, regexp, replacement). Returns a string value of which sub string matches with regexp is replaced with replacement. If value contains more than one substrings matching with regexp, it’s only applied for the first strings. For the syntax of regexp, we can use the syntax of re2. For more details, see official document. Use cases Remove query string from URL SELECT REGEXP_REPLACE('https://console.cloud.google.com/bigquery?project=project', '\\?.*$', ''); Date DATE_TRUNC Syntax: DATE_TRUNC(date_expression, date_part).

Read more →

May 10, 2020

Enable comments on minimal mistake theme of GitHub pages

The configuration to enable comments is described in the official page. Supported providers There are some providers to support comments, and some of them is not free. Disqus: Not free Discourse: Not free Facebook: Free Utterance: Free with GitHub issues. Staticman: Free but needs to setup our own instances like on heroku (which is explain in this issue). Utterance utterance is easy to setup, and users require GitHub authentication to comment, and it can enable you to get notifications for issues. Furthermore, because you can manage messages on GitHub, you can manage comments on GitHub features.

Read more →

April 26, 2020

gitHub pages

Getting Started See Official tutorial for detail steps. Basically, what you have to do is Create .github.io repository Choose theme on settings tab in GitHub Customize pages Before updating your repository, please see each repository here for your theme to check how to customize for your purpose. The examples of customization are Twitter share button: go to publish twitter button page. Choose good theme There are some pages to collect the themes of GitHub pages. These are the pages I checked.

Read more →

April 26, 2020

git cli

Written in March 2020. Tools Rewrite history Note that this is REALLY DANGEROUS operations and please do it with your responsibility. git-filter-repo can be used to rewrite history, and it’s official tool to replace with git-filter-branch. Install on Mac OS > brew install git-filter-repo How to use Replacing name and email with new one. Use --email-callback and --name-callback options. For more details, run git filter-repo --help. > git filter-repo --email-callback 'return email.replace(b"old@gmail.com", b"new@gmail.com")' --name-callback 'return name.replace(b"Old name", b"New name")' Parsed 174 commits New history written in 0.19 seconds; now repacking/cleaning... Repacking your repo and cleaning out old unneeded objects HEAD is now at 973ca76 Merge pull request #48 from at-ishikawa/move-grpc Enumerating objects: 1365, done. Counting objects: 100% (1365/1365), done. Delta compression using up to 16 threads Compressing objects: 100% (717/717), done. Writing objects: 100% (1365/1365), done. Total 1365 (delta 480), reused 1273 (delta 473) Completely finished after 0.67 seconds.

Read more →

March 21, 2020

Getting Started with MySQL DDL

This document is described based on MySQL 5.6. Online DDL On MYSQL 5.6, DDL can be ran online, without maintenance. There are two important types of online DDL. Algorithm COPY: Concurrent DML is not supported. New table is copied from original table and. INPLACE: Concurrent DML may be supported, but sometimes, exclusive lock is taken. Avoid copying tables to update schema. DEFAULT: Use INPLACE if it is supported for running DDL. Otherwise, COPY. LOCK NONE: Permit concurrent reads and writes, or error occurs. SHARED: Permit concurrent reads but block writes, or error occurs. EXCLUSIVE: Block reads and writes. DEFAULT: Choose one way from NONE, SHARED, or EXCLUSIVE by this priority. It’s recommended to read the official document at first to understand the more details for what happens in each operation.

Read more →

March 20, 2020

Enable lunr search for non-posts on minimal mistake theme of GitHub pages

This page explains how to enable searching non-posts pages for Minimal mistakes by Lunr.js for someone who does not know jekyll at all. Lunr.js is the default search engine of the theme, so if turn on search by adding search: true in _config.yml, then you all posts become searchable by lunr.js. However, for non-post pages, you may need a different configuration, so I’ll write this page for it. The entire configuration which requires is following in this page.

Read more →

March 19, 2020

Introduction to GCP Cloud endpoints

The Cloud endpoint is actually the NGINX proxy which offers the following features on GCP. Authentication and validation Logging and monitoring in GCP The overall architecture for this is described in official page. Supported protocol They support OpenAPI. The spec of OpenAPI is described here. gRPC Rest APIs using Cloud Endpoints Framework Supported environments Endpoint on Cloud Run Endpoint on GKE as a sidecar Endpoint on App Engine For Cloud Run or GKE, docker images are available in GCP registry. You can use the image like gcr.io/endpoints-release/endpoints-runtime:1. See released and secure image versions in here.

Read more →

March 19, 2020

kubectl cheetsheet

Collect recent error logs If the logs are outputted by zap, error messages are aggregated by checking level = error. This log does not work very well if the field error contains some unique values like id. $ kubectl logs -l key=value --since=5m | jq -r 'select(.level=="error") | .error' | sort | uniq -c | sort -bgr Instead of error field, msg or errorVerbose could be used.

Read more →

March 19, 2020

MySQL Tuner

MySQL Tuner tool This is a tool to review a configuration for MySQL server. Getting started To run this tool, we should run following commands. wget http://mysqltuner.pl/ -O mysqltuner.pl wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv perl mysqltuner.pl

Read more →

March 19, 2020

Nginx server configurations

Performance proxy_cache The below configuration is the example to cache images. proxy_cache_path /path/to/cache levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m use_temp_path=off; server { # ... location / { proxy_cache my_cache; proxy_pass http://my_upstream; } location ~ .*\.(jpg|JPG|gif|GIF|png|PNG|swf|SWF|css|CSS|js|JS|inc|INC|ico|ICO) { # Server proxy cache proxy_cache my_cache; proxy_ignore_headers Cache-Control; proxy_cache_valid any 30m; # Client cache expires 30d; ... } } proxy_ignore_headers ignores Cache-Control header from a client. In this case, proxy_cache_valid is required. expires sends Cache-Control: max-age=\d+ and Expires header in order to cache on browsers. References

Read more →

March 19, 2020

HTTP/2 for Go

http package in golang supports HTTP/2 protocols. It’s automatically configured. The features of HTTP/2 In order to understand the benefits of HTTP/2, this document, provided by google, is helpful. It supports a lot of features including followings. binary format communications streaming messages multiplexing server push Some examples are written in this page, and I checked it so much. Streaming main.go is an example for server streaming, including a server and a client codes. The important part is calling Flush method, whose interface is http.Flusher and implemented by http.ResponseWriter. When this method is used, the buffered data on the server is sent to the client.

Read more →

March 15, 2020

Introduction to GCP Cloud CDN

Target upstream services Cloud CDN can have only GCP load balancer as the upstream services. And GCP load balancer can configure one of followings for backends. Backend services GCE instance groups GCE Network endpoint groups. These are the groups of VM instances Backend buckets See official document for the architecture using this. Configurations Cache can be controlled by response headers of origin servers, like cache expiration times, like Cache-Control: max-age header. The details are described in here.

Read more →

November 19, 2019

Protocol Buffers for Go with Gadgets

gogo/protobuf is the library to store some extensions from golang/protobuf in this repository. There are some useful packages that golang/protobuf does not provide. For instance, Custom tags Getting Started In this example, protoc-gen-gogo is used but there are other binaries. To install it, you have to run: go get -u github.com/gogo/protobuf/protoc-gen-gogo Use custom tags for protobuf As of Nov. 2019, adding custom tags for generated proto messages are under discussion in golang/protobuf. This comment is the formal proposal for it. Until it’s released, gogo/protobuf can be used for such a purpose. The example is like below, which is stored here

Read more →

November 19, 2019

Terraform for GCP

Troubleshootings GKE To use kubernetes provider Got Error: Post https://[ip_address]/api/v1/namespaces/[namespace]/secrets: x509: certificate signed by unknown authority. This is related GitHub issue. google_container_cluster resource outputs cluster_ca_certificate, client_key, or client_certificate and they are base64 encoded. Secrets cannot be created Got Error: secrets is forbidden: User "system:anonymous" cannot create resource "secrets" in API group "" in the namespace "[namespace]" This is unresolved.

Read more →

November 19, 2019

Terraform overview

Basic concepts There are some basic components for terraform. Resource: one infrastructure element, like a virtual machine. Resource type is defined in a provider. Provider: a collection of resource types. Most provider offer resource types on a platform. The example of a provider is AWS, GCP, or Kubernetes. Module: a set of resources. In order to use modules, following elements may be used. Input variables:, defined as variable. Output variables: defined as output. Local variables: defined in locals. Data Sources: Data defined and used externally from current terraform. This may be a different terraform state. State The current infrastructure configuration is stored in state by terraform. Terraform stores the state in terraform.tfstate localy by default, but using backend, state can be stored remotely like AWS S3. The state can contain sensitive data such as a database password. To avoid this, by some backends, encryption or other features are provided.

Read more →

November 19, 2019

Getting Started with Google closure library

Some JavaScript library depends on Google Closure. If you need to understand the behavior of such a library, you have to know closure. The official document of closure library is here. And using Closure compiler, we can bundle codes with those libraries. There is npm version to use such a compiler. Examples ./index.html Sample to use google closure library hello.js first sample using google cloud compiler myproject/start.js, myproject/klass.js Sample using module TODO Sample to use gooogle closure library and compile Google closure compiler The compiler can be downloaded by npm.

Read more →

October 19, 2019