Posts

Error 403 when accessing AWS IoT device shadow with Cognito authenticated user Identity

Error 403 when accessing AWS IoT device shadow with Cognito authenticated user Identity

AWS IoT is useful. You can manage and control the status of devices even remotely. On the other hand, mastering AWS IoT requires an understanding of the entire AWS IoT service, a familiarity with the not-so-friendly service console, and some tricky configuration. In this article, I will introduce some small AWS IoT tips. Goals Getting AWS IoT Device Shadows in Mobile Apps Only authenticated users can access device shadows Use
Enabling keyboard shortcuts for buttons with buttonStyle applied in SwiftUI

Enabling keyboard shortcuts for buttons with buttonStyle applied in SwiftUI

When you try to create a cool UI with SwiftUI, you will often face a problem. In this article, I’ll show you how to use keyboardShortcut to assign keyboard shortcuts to buttons that have been customized with buttonStyle. Environment mac OSX 11.0 XCode 12.0 Goal in this article Using SwiftUI In a macOS app You can use the Enter key to submit a Button. Button design can be customized with
Building a Prometheus, Grafana and pushgateway cluster with Kubernates

Building a Prometheus, Grafana and pushgateway cluster with Kubernates

This article is my notes on practicing building a cluster of Prometheus, Grafana and pushgateway in Kubernates environment. The repository is located at soudegesu/prometheus-pushgw-practice . Goals Building a Prometheus, Grafana and pushgateway cluster with Kubernates Grafana references Prometheus as a datasource. Prometheus pull metrics from pushgateway. For now, I will aim to build a cluster on a local machine. These goals outline is as shown in the following figure. Environment
React child component can't get the atom value in Recoil

React child component can't get the atom value in Recoil

I’ve been using Recoil, a state management library for React, for a while now, so I’ll write some tips. Environment react 16.14.x recoil 0.1.2 Cannot get atom value from child component in Recoil While implementing a medium-sized application using Recoil, I encountered an issue where I could not get the value of atom from certain child component. Of course, I called <RecoilRoot> close to the top level components of the
Provisioning a edge device in a private network with Ansible via AWS Session Manager

Provisioning a edge device in a private network with Ansible via AWS Session Manager

In this article, I will show you how to access devices in a private network in a remote location to manage the device configuration by AWS System Manager Session Manager and Ansible. Device provisioning in a private network I would like to run a configuration management script from my development machine at home on a remotely located device. The image is as follows. In most cases, the remotely located devices
Selecting a specific element in Selenium

Selecting a specific element in Selenium

In previous article Waiting for an element to be displayed using the WebDriverWait in Selenium, WebDriverWait is used to prevent the browser from performing the following actions until the condition is satisfied. This time, I will introduce you how to select HTML elements that can also be used in WebDriverWait. Selection with id attribute First of all, I introduce the most common way to specify the id attribute. The id
Use Range function in Python

Use Range function in Python

Python has more utility function implementations than other programming languages. This time, I will introduce the for statement processing using the Python range() function. Environment I have confirmed the operation in the following environment. Python 3.8 range() function is A range () is a Python built-in function used to create a sequence of numbers and mainly used in combination with the for statement. Takes several arguments to control the rules
Autocomplete your code in Jupyter Notebook

Autocomplete your code in Jupyter Notebook

Jupyter Notebook is often used as a Python development environment, but code completion is not enabled by default. That’s why it’s a bit of a problem when importing packages. This time, I introduce some tips for code completion in Jupyter Notebook. Autocomplete the code Code completion in the IDE is an important feature for smooth implementation of the program. Some people call it autocomplete , and others call it intelli
Waiting for an element to be displayed using the WebDriverWait in Selenium

Waiting for an element to be displayed using the WebDriverWait in Selenium

In a previous article Avoiding pop-up blocking when opening multiple Firefox tabs simultaneously in Selenium, I presented tips on running Selenium in Firefox. In this article, I will show you some tips for writing Selenium code. Selenium works faster than people. Selenium is fast, but it’s easy to overlook waitting when writing code that works with Selenium. The browser communicates and draws the screen when some event is triggered, such