Welcome to new things

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

Entries from 2019-01-01 to 1 year

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…

Memo on how to read Excel files in JavaScript using SheetJS (xlsx)

I use SheetJS (xlsx) to load Excel files in JavaScript (TypeScript). The usage is a bit peculiar and I forget how to use it easily, so this is a memo for my own use. manual https://www.npmjs.com/package/xlsx install npm install xlsx File r…

How to easily arrange graphs in a grid on a Tableau dashboard

It is difficult to arrange graphs in a Tableau dashboard because it is hard to get the layout to look the way I want. The reason is that when you drop or move an object with the mouse, it does not enter the intended hierarchy, Because chan…

How to do monthly/weekly aggregation in SQL Server

To aggregate data by month/week, first find the beginning date of the month/week of the date and GROUP by that beginning date. If the DATE_TRUNC() function can be used to get the head date, such as Google BigQuery, you can aggregate the da…

Memo for building Nginx+PHP+MySQL environment with Docker Compose

I had a need to use phpLDAPadmin, so I set up Nginx and PHP with Docker Compose and ran it there. This is a template memo for myself to prepare Nginx with PHP running on Docker Compose for the next time I want to use PHP on the web again. …

How to upload files from Microsoft (Office365) Flow to Slack

When I received an email, I wanted to upload the email attachment to Slack and tried to use Microsoft (Office365) Flow to perform that task. Microsoft (Office365) Flow has a Slack connector, so I thought it would be easy to create one, Unf…

How to use LDAP & note how to install on Ubuntu 18

I wanted to create and manage users for local use in the project and set up an LDAP server. Since this was my first time touching LDAP, I wrote down a rough explanation of LDAP, its usage, and the procedure for installing LDAP on Ubuntu 18…

How to get the last record of a group in SQL

For example, "In a user's event log, I want to extract the last event the user performed." Sometimes you want to retrieve the last record of data divided by groups. The window function can be used to obtain the following WITH tbl AS ( SELE…

I'm going to try to make the Linux shell switch in tabs like Chrome.

When I usually work with Linux, I have multiple terminals up and running. I'm not particularly inconvenienced by that, but I was looking into the possibility of launching multiple shells in a single CUI terminal and switching between them …

How to decrypt data encrypted with PHP's mcrypt using Node.js

I got into trouble when I tried to decrypt data encrypted with PHP's mcrypt using Node.js, so here is a note on the cause and solution. situation I received data that I was told was encrypted with AES256-CBC in PHP, but when I tried to dec…

Good story about forced real name registration in Slack, but it would have been better if it had been provisioned from the beginning.

It's not much, but I wrote about Slack in a rambling way. Slack or Microsoft Teams? We use Office365, so we have access to Microsoft Teams, but we use Slack as our chat tool. Teams also tried using the tool, but at a glance, it was difficu…

Spark's frequently used code notes

Since Spark is a Python program, it can be written quite freely. However, since I always have a general idea of what I need to do, and knowing various ways of writing Spark makes it harder to remember, I will summarize my personal frequent…

Thoughts on using AWS Glue

I have tried AWS Glue before and here are my thoughts on it. AWS Glue is made of Apache Spark, and it was interesting for me to touch Spark for the first time at that time, I was thinking that I would put together a usage guide for Glue wh…

How to access AWS S3 from Spark (Google Dataproc)

How to access AWS S3 from Spark (Google Dataproc). procedure Spark Configuration The following Spark and Haddop settings will allow you to read and write AWS S3 files from Spark. Load the following AWS-related jar files into Spark aws-java…

How to access Microsoft SQL Server (Azure SQL Database) from Spark (Google Dataproc)

How to access Microsoft SQL Server (Azure Database) from Spark (Google Dataproc). procedure Spark Configuration The following Spark settings will allow you to read and write SQL Server data from Spark. Download the MS SQL Server JDBC jar f…

How to access MySQL from Spark (Google Dataproc)

How to access MySQL from Spark (Google Dataproc). Since it is accessed using JDBC, it can be applied to other RDBs such as PostgreSQL. procedure Spark Configuration The following Spark settings will allow you to read and write MySQL data f…

Load a MySQL database into BigQuery with schema-less partitioning

BigQuery can handle huge amounts of data, but you don't have to worry about the infrastructure at all (really, at all), and it's fast and cheap, It is tempting to put all your data into BigQuery and process it all with BigQuery. That's why…

AES encryption and decryption in Node.js

I had a chance to do AES encryption/decryption in Node.js, so here are my notes. The encryption algorithm "AES-256-CBC" was used. About AES CBC encryption in a nutshell AES CBC is an encryption algorithm that encrypts binary data of arbitr…

How to get a subdirectory listing of Google Cloud Storage using Python

I wanted to get a list of Google Cloud Storage subdirectories using the GCP Python library, I got stuck, so here's a note on how and why. Libraries in other languages are API wrappers as well as Python libraries, so I think they can be app…

Enabling the Raspberry Pi to be used only with a PC without mouse, keyboard, and monitor.

When I saw the news of the Raspberry Pi4 announcement, I pulled out my Raspberry Pi and touched it for the first time in a while. I had touched the Raspberry Pi a little before, but gradually stopped using it because I was too lazy to move…

How to create a calendar table in SQL Server

I wanted a calendar table in SQL Server (Azure SQL Database), so here is a memo on how to create one. I googled, and it seems to be created by creating a table with "WITH" and then making a recursive call from "UNION ALL" in the table defi…

Learning in theory and making it easy. memo on how to use Git

Git is difficult.... I thought I could do it by making a coping cheat sheet, but no luck.... Whenever there is a problem, we don't know what to do. There are multiple ways to write the same thing across commands, but this can be confusing …

Microsoft (Office365) How to pass map data and receive array data from PowerApps to Flow

Postscript (08/06/2019) Since only String type data can be passed from PowerApps to Flow, I had to manually convert map data to String, but you added a function to convert JSON data to String! qiita.com Now you can easily pass data! Data s…