Welcome to new things

[Technical] [Electronic work] [Gadget] [Game] memo writing

AWS CLI configuration notes

It's been a while since I installed the AWS CLI. I see that it is now at version 2. Once you set it up, you don't have a chance to touch it and forget about it, so here is a memo on how to set it up for yourself. Basic Structure Set profil…

How to automatically change environment variables for each directory in Linux

The Docker Compose project name is the name of the directory where the docker-compose.yaml file is located. However, there are many cases where you may want to give a directory a different name. In such cases, you can specify the project n…

How to use local packages in Go language (Go Moludes)

I was writing a program in Golang and the program was getting long, so I decided to break it up into packages. configuration The directory structure is as follows. . |-- a | `-- a.go |-- b | `-- b.go `-- main.go procedure Square Needle Use…

Notes on what I got into with Go language (interface)

I started Golang. Golang, like C, has a simple syntax and data structure, but it also incorporates advanced concepts to increase productivity. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, I ma…

Notes on things I got stuck on in Go language (value passing and pointer passing)

I started Golang. Golang uses pointers. Since Golang is historically a new language, I thought that I could just write code without being aware of pointers and it would work fine, but I was naive... The pointer itself is common, and if you…

Notes on things I got stuck on in Go language (slice, map, string)

I started Golang. Golang, like C, has a simple syntax and data structure, but it also incorporates advanced concepts to increase productivity. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, I ma…

A note on something I got stuck on in Go language (putting a struct in a map causes a "cannot assign to struct field ..." error). error when you put a struct in the map)

I started Golang. When I started, I found that Golang is designed to be as simple as possible in its syntax and as simple in its code as possible. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, …

Notes on things I got stuck on in Go language (classes and inheritance)

I started Golang. When I started, I found that Golang is designed to be as simple as possible in its syntax and as simple in its code as possible. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, …

Note on things I got stuck on in Go language (no arrow operator in pointer)

I started Golang. When I started, I found that Golang is designed to be as simple as possible in its syntax and as simple in its code as possible. And for that reason, Golang has some slightly tricky syntax. However, without knowing them, …

How to split logs into tabs for each container in Docker Compose

When I want to link multiple containers together, I use Docker Compose. When you run Docker Compose, you will see the logs for each container, but you will see the logs for all containers on one screen. I want to follow the log for each co…

Are there two docker images for Jenkins, the official Docker and the official Jenkins...

I wanted to use Jenkins with Docker, so I got a Jenkins image and used it. FROM jenkins:alpine Occurrence of a problem Every time I tried to install a plugin in the Jenkins setup, I got an error. Is there two docker images for ? The reason…

How to switch between multiple clusters in kubectl

We have added a new Kubernetes cluster and configured it to be switched with the kubectl command. Once you set it up, you don't have to tweak it, and if you don't, you'll forget how to do it, so I'll write down how to set it up for myself.…

How to switch between multiple accounts and projects in Google Cloud SDK (gcloud)

We added a new project to Google Cloud Platform and set up the Google Cloud SDK (gcloud CLI) to switch projects. Once you set it up, you don't have to tweak it, and if you don't, you'll forget how to do it, so I'll write down how to set it…

How to obtain and use an administrator-accessible, user-less token for the Microsoft Graph (Office365) API

A note on the Microsoft Graph (Office365) API for obtaining and using an admin token. impetus I tried to add and remove users and groups in Azure Active Directory using the API. The Azure Active Directory API has been integrated with the M…

What to do when you can't log in to an app with Azure Active Directory single sign-on (SSO)

I was interested in single sign-on (SSO) services and tried various services for a while. www.ekwbtblog.com I wanted to log in with my Office365 user as a key, so I ended up using Azure Active Directory SSO. As for the usage, I mainly use …

I thought I shouldn't use "latest" in Dockerfile tags.

Periodically, AWS S3 files are copied to Google Cloud Storage. There are many ways to copy, but here we use the gsutil command for the Google Cloud SDK, The Google Cloud SDK uses a Docker image of Alpine Linux. However, at some point, I st…

How to load multiple Cloud Storage files together with Google BigQuery's Node.js SDK

When loading Google Cloud Storage files into Google BigQuery, multiple files can be loaded at once. However, I got stuck trying to do that with Google BigQuery's Node.js SDK, so here are my notes on that. Overview and Issues Load using tab…

How to distinguish between files and directories in Google Cloud Storage

In Google Cloud Storage, I tried to get a list of files in a subdirectory and process those files. However, when I looked at the error message that the file was wrong, I found that the list of files retrieved included a subdirectory. Reaso…

How to get a subdirectory listing of Google Cloud Storage with Node.js

We previously used the GCP Pyhton library to get a list of Google Cloud Storage subdirectories, and this is the Node.js version of that. Python version is here www.ekwbtblog.com procedure The GCP Node.js SDK documentation is kind enough to…

I'm confused about how to use Twitter's Search API, so I'll try to summarize.

We had the opportunity to collect data using the Twitter API. The Twitter API has a Search API for searching tweets, just like Google search, which I used this time. I usually use Twitter mainly as a reader, so I was not really aware of it…

I can no longer type underbar in Linux.

PS I received an update notification for Chrome, and when I updated it, hoping for the best, it was cured so that I could type in the underscore! We will keep the original article. Below is the original article. I use Linux (Ubuntu) and Wi…

How to read CSV files with newlines and commas output by Excel in JavaScript

CSV files have been loaded using SheetJS. However, there was a CSV file that I just couldn't get to read properly because of garbled characters, so I decided to try another library. There was a library called "csv" that came up at the top …

Collecting data with Twitter API

I tried to get data from Twitter using the Twitter API to see if I could use it to learn about trends in the world. As it turns out, I had heard rumors that the Twitter API was too restrictive, but it was really too tight to be useful... S…

Organize Tableau formatting to the extent that Excel-like graphs and tables can be drawn.

Tableau's default graphs are quite beautiful. For practical use, it is sufficient to slightly modify the defaults, but for graphs used for documentation purposes, you may want to change the appearance of the graphs in various ways to match…

Using the cloud means constant maintenance costs

I received an email from Google Cloud Platform. The Node.js version of the function I originally created for Gooble Cloud Functions was version 6, and this time the version 6 service was ending, so the email was a request for an upgrade. I…

How to get and update your Microsoft Graph (Office365) API token

One way to manipulate the Web version of Office365 is through the Microsoft Graph (Office365) API. For example, with the Microsoft Graph (Office365) API, you can use the Send email from OutLook Excel Online file editing SharePoint file ret…

How to add a read-only user to SQL Server (Azure SQL Database)

SQL Server data is read by BI tools to create graphs. In that case, we did not want to use a user with write permission because the data would only be read and various people would create graphs, so we created a read-only user for sharing.…

You should not write queries across databases in Azure SQL Database.

I did not know that SQL Server was the first time to use Azure SQL Database, but in SQL Server, queries across databases can be easily written by specifying the database, as shown below. SELECT * FROM [<db_name>].dbo.test_table However, when I try </db_name>…

Memo on how to use Moment.js, a JavaScript date calculation library

When performing date operations in JavaScript, the built-in Date function is difficult to handle, so some kind of library is generally used. The library uses the commonly seen "Moment.js". I forget how to use it no matter how many times I …

Try different SSO (single sign-on) services

I am interested in SSO (Single Sign On) and have tried various SSO services. I am completely new to SSO, so here is a brief summary of what SSO is and how it works, and how easy it is to use. motive I use various web services, each of whic…