You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux: Difference Between Single Quotes, Double Quotes, and Backquotes
1. Introduction
In Linux, single quotes ('), double quotes ("), and backquotes (`) serve different purposes. The easiest way to understand their differences is by using the DATE variable, the "date" string, and the date command.
[Difference in Quotation Marks]
Important:
' ... Single quotes
Everything within single quotes is interpreted as a string (ignoring any variables).
Enable Touch ID Authentication for sudo on MacOS Sonoma
Enable Touch ID Authentication for sudo on macOS Sonoma 14.x
Operating Environment:
OS: MacOS Sonoma 14.5
Device: M1 MacBook Pro
Explanation
In macOS Sonoma, a new method has been introduced to enable Touch ID when running sudo commands, making it more persistent across system updates. Previously, editing the /etc/pam.d/sudo file was necessary, but these changes would often revert after an update, requiring reconfiguration. With Sonoma, the settings can be added to a separate file /etc/pam.d/sudo_local, which isn't overwritten during updates, allowing Touch ID to remain enabled for sudo commands consistently.
In YAML, the | and > characters are used to denote different styles of multi-line strings. Here's a brief explanation of each:
| (Literal Block Scalar)
The | character is used to preserve the exact formatting of the multi-line string, including line breaks and leading spaces. It's useful when you want to maintain the formatting of the text exactly as it is.
Example:
example_literal: | This is a literal block scalar. It preserves line breaks and
This Gist demonstrates how to use the aws-sdk-go package to upload and download objects from AWS S3 using Go. It utilizes the s3manager package to simplify these operations.
Prerequisites
Before running the code, install the AWS SDK for Go using the following command:
This guide introduces how to use AWS Lambda to retrieve data from DynamoDB. The data acquisition flow is as follows: API Gateway → Lambda → DynamoDB. This example focuses on the Lambda to DynamoDB part, omitting the details of invoking Lambda from the screen.
Source Code
Here is an example of retrieving data using userId as a condition.
How to Count the Number of Items in DynamoDB Using the AWS CLI
How to Count the Number of Items in DynamoDB Using the AWS CLI
Retrieving the approximate number of items
You can use the describe-table command to easily get an approximation of the number of items from the metadata of a DynamoDB table. This saves time and money because you don't have to scan the entire table.
Short notes: Parallel Execution Techniques in Shell Scripts
Implementing Concurrency in Shell Scripts
In this short note, we'll explore various techniques to achieve concurrency in shell scripts. Concurrency allows for executing multiple operations in parallel, which can dramatically reduce the processing time by handling tasks simultaneously. We'll cover several methods, from basic background execution to more sophisticated tools like GNU Parallel.
Basics of Concurrency in Shell Scripts
Concurrency in shell scripting is facilitated by executing multiple processes simultaneously. This parallel processing allows a script to initiate subsequent tasks without waiting for the previous tasks to complete.
TIL (05/08/2024): DynamoDB Query Evaluation Order Differs from SQL
DynamoDB Query Evaluation Order Differs from SQL
Summary:
When using LIMIT in DynamoDB queries, the order of evaluation can differ from SQL queries, potentially leading to unexpected results depending on the search criteria used.
SQL Query Evaluation Order:
SQL queries follow a specific order of evaluation:
FROM -> ON -> JOIN -> WHERE -> GROUP BY -> HAVING -> SELECT -> DISTINCT -> ORDER BY -> LIMIT