2025-12-31 11:22:42
Obsidian's plugin ecosystem is one of its greatest strengths. Here's my curated list of essential plugins that transform Obsidian into a powerful productivity system.
Purpose: Automatic version control and synchronization via Git
Purpose: Compare and merge conflicting files
Purpose: Advanced task management within notes
Purpose: Time-block planning within notes
Purpose: Visual calendar navigation
Purpose: Advanced templating system
Purpose: Query and display data from notes
Purpose: Syntax highlighting for code blocks
Purpose: Run code snippets directly in notes
Purpose: Quick access to recently opened files
Purpose: Maintain cursor position across sessions
Purpose: Manage and refactor tags
Purpose: Advanced tag browsing
Purpose: Customize the Minimal theme
Originally published at https://dss99911.github.io
2025-12-31 11:21:54
This guide will walk you through the process of setting up Jekyll on an Amazon Linux2 EC2 instance and using it to publish your post to your personal server.
First, we need to install the necessary packages and set up Jekyll. Here are the steps:
# Define the port Jekyll will run on
PORT=4000
# Install Ruby 3.0
sudo amazon-linux-extras install -y ruby3.0
# Install Ruby development tools
sudo yum install -y ruby-devel
# Install development tools
sudo yum groupinstall "Development Tools" -y
# Install Bundler and Jekyll
sudo gem install bundler
sudo gem update --system
sudo gem install jekyll
# Create a new Jekyll site
jekyll new my-site
cd my-site
# Install the necessary gems for your site
sudo bundle install
To test your Jekyll site, you can run the following command:
bundle exec jekyll serve --host=0.0.0.0 --port=$PORT
You can then access your site at {your-address}:4000. Don’t forget to open the port in your security group.
To ensure that Jekyll starts on reboot, we can set it up as a service:
# Define the path to your Jekyll site
JEKYLL_PATH="/home/ec2-user/my-site"
PORT=4000
# Create a service file
echo "[Unit]
Description=Jekyll
After=network.target
[Service]
ExecStart=/usr/local/bin/bundle exec jekyll serve --host=0.0.0.0 --port=$PORT
WorkingDirectory=$JEKYLL_PATH
Restart=always
User=ec2-user
Group=ec2-user
Environment='PATH=/usr/local/bin:$PATH'
[Install]
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/jekyll.service
# Set permissions for the service file
sudo chmod 644 /etc/systemd/system/jekyll.service
# Reload the systemd daemon
sudo systemctl daemon-reload
# Enable the Jekyll service
sudo systemctl enable jekyll.service
# Start the Jekyll service
sudo systemctl start jekyll.service
To make your post compatible with Jekyll, you need to add the following header to each note:
---
layout: post
title: " \"{your post title}\""
date: 2023-12-03 10:24:45 +0000
categories: some_category
---
Also, you need to change the post file name format to {date format of yyyy-MM-dd}-{title}.md.
The script below adds the title with the file name, sets the categories with the directory name, and sets the file modified date. Before running the script, don’t forget to backup your files. It may not work properly if the file name contains " or in some unknown cases.
PUBLISH_DIRECTORY={your-note-directory-to-publish}
find $PUBLISH_DIRECTORY -type f -name "*.md" | while read file; do
# Remove the extension from the file name
title=$(basename "$file" .md)
# Get the name of the directory the file is in
directory=$(basename $(dirname "$file"))
# Get the current date and time
modified_date=$(date -r "$file" +"%Y-%m-%d %T %z")
temp="$file-temp"
# Add a header to each file
echo "---" > "$temp"
echo "layout: post" >> "$temp"
echo "title: "'"'"$title"'"' >> "$temp"
echo "date: $modified_date" >> "$temp"
echo "categories: $directory" >> "$temp"
echo "---" >> "$temp"
cat "$file" >> "$temp"
# Replace the original file with the temporary file
mv "$temp" "$file"
# Add the current date as a prefix to the file name
mv "$file" "$(dirname "$file")/$(date -r "$file" +"%Y-%m-%d")-$title.md"
done
Finally, you can upload your post to your EC2 server:
#!/bin/bash
PUBLISH_DIRECTORY={your-note-directory-to-publish}
JEKYLL_PATH="/home/ec2-user/my-site"
KEY_PATH={your-key.pem}
EC2_IP={your-ec2-ip}
rsync -av --delete -e "ssh -i $KEY_PATH" "$PUBLISH_DIRECTORY" ec2-user@"$EC2_IP":"$JEKYLL_PATH/_posts"
The --delete option allows for the deletion of files on the server if they have been deleted locally. If you do not want files to be deleted, please execute the command without the --delete option.
And that’s it! You’ve successfully published your post to your personal server using Jekyll on Amazon Linux2 on EC2. Happy blogging!
Originally published at https://dss99911.github.io
2025-12-31 11:21:38
In this blog post, we will walk through the process of installing Jekyll on your desktop and publishing it on Github Pages. This is a great way to create and manage your own website or blog.
Jekyll is a simple, blog-aware, static site generator that's ideal for personal, project, or organization sites. To get started, you need to install Jekyll on your desktop. Follow the instructions provided on the official Jekyll installation guide.
If you're using a Mac, you'll need to install Ruby first before you can install Jekyll.
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. Here's how you can install Ruby on your Mac:
brew install chruby ruby-install xz
ruby-install ruby 3.1.3
echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc echo "chruby ruby-3.1.3" >> ~/.zshrc # run 'chruby' to see actual version
ruby -v
Once you have Ruby installed, you can proceed with installing Jekyll. Here's how:
gem install bundler jekyll
jekyll new site
cd site
Now that you have Jekyll installed and a new site created, it's time to deploy your site on Github Pages.
First, you need to create a new repository on Github. The repository name should be in the format {user-name}.github.io.
Next, commit your Jekyll site code to the repository and push the changes. Github Pages will automatically deploy your site upon each commit.
It's well described on Pages Quickstart
Finally, you can check your website by navigating to {user-name}.github.io in your web browser. Your Jekyll site should now be live!
For more information, you can refer to the official Github Pages documentation on creating a Github Pages site with Jekyll.
Originally published at https://dss99911.github.io
2025-12-31 11:21:07
Docker Compose는 여러 컨테이너로 구성된 애플리케이션을 하나의 네트워크 안에서 실행하고 관리할 수 있도록 돕는 도구입니다. 이 글에서는 Docker Compose를 활용해 효율적으로 서비스를 구성하고 운영하는 방법에 대해 설명합니다.
Docker Compose는 여러 서비스를 독립적인 컨테이너로 실행시키고, 이들 간의 연결과 설정을 단순화해줍니다. 주요 사용 사례는 다음과 같습니다:
예를 들어, nginx를 통해 Jupyter Notebook으로 요청을 전달(bypass)하는 구성을 간단히 설정할 수 있습니다.
Docker Compose 설치 방법은 Install Docker Compose 페이지를 참고하세요.
docker-compose.yml 작성하기
version: "3.8"
services:
app:
image: node:12-alpine
command: sh -c "yarn install && yarn run dev"
ports:
- 3000:3000
working_dir: /app
volumes:
- ./:/app
environment:
MYSQL_HOST: mysql
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_DB: todos
mysql:
image: mysql:5.7
volumes:
- todo-mysql-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: todos
volumes:
todo-mysql-data:
docker-compose.yml 파일에는 Compose 버전을 지정해야 합니다. 버전별 상세 내용은 Compose file reference를 참고하세요.
서비스는 각 컨테이너의 설정과 네트워크 구성을 포함합니다. 각 서비스는 고유한 이름을 가지며, 네트워크 내 별칭(network-alias)을 동일하게 설정할 수 있습니다.
볼륨을 정의하지 않으면 기본 옵션이 사용됩니다. 필요에 따라 마운트 지점을 명시적으로 설정하세요.
volumes:
app-data:
driver: local
Compose 파일을 기반으로 컨테이너를 빌드합니다.
docker-compose build
다른 파일명을 사용하는 경우:
docker-compose -f docker-compose-deploy.yml up --build
Detached 모드로 Compose를 실행합니다:
docker-compose up -d
Compose로 실행된 컨테이너와 네트워크를 삭제합니다:
docker-compose down
데이터 볼륨 및 다운로드된 이미지를 함께 삭제하려면:
docker-compose down --volumes --rmi all
web 컨테이너에서 명령을 실행하려면 다음과 같이 합니다:
docker-compose run web django-admin startproject composeexample .
실시간으로 로그를 확인합니다:
docker-compose logs -f
특정 서비스의 로그만 확인하려면:
docker-compose logs -f app
Docker Compose는 컨테이너가 완전히 준비되기 전에 다른 컨테이너를 실행하는 것을 방지하지 않습니다. 이를 해결하려면 wait-port와 같은 도구를 사용하여 특정 포트가 활성화될 때까지 대기할 수 있습니다.
Wait-port 프로젝트를 참고하세요.
Docker Compose를 통해 애플리케이션 배포와 관리를 단순화하고, 보다 효율적인 개발 환경을 구축해보세요!
Originally published at https://dss99911.github.io
2025-12-31 11:17:04
Problem:
An input component is defined in the HTML file. The value attribute of the component is bound to a value. However, when the input content changes, the value obtained from the JS does not change.
Cause:
The data in the HarmonyOS project is unidirectionally bound. If the data is modified in the JS, the data is modified in the HTML file. If the data is modified in the reverse direction, the data cannot be synchronized.
Solution:
Define the change event in the input component. When the input content changes, the change event is triggered. In this case, obtain the current input value from the callback function of the change event and assign the value to the variable.
hml:
<input class="flex" id="input3" type="date" value="{{ inputVal }}" @change="changeInput" />Copy codeCopy code
JS:
data: {
inputVal:'InputValText'
},
changeInput(obj){
this.inputVal = obj.value
}