MoreRSS

site iconThe Practical DeveloperModify

A constructive and inclusive social network for software developers.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of The Practical Developer

Essential Obsidian Plugins - My Recommended Setup

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.

Synchronization & Version Control

Obsidian Git

Purpose: Automatic version control and synchronization via Git

  • Automatically commits and pushes changes at set intervals
  • Syncs notes between laptop and Git repository
  • Maintains full version history of all notes
  • For syncing between laptop and Android, see this post

File Diff

Purpose: Compare and merge conflicting files

  • Essential when using Syncthing for synchronization
  • Handles file collision conflicts that create duplicate files
  • Visual diff comparison between file versions

Task & Time Management

Tasks

Purpose: Advanced task management within notes

  • Create and track tasks with due dates, priorities, and recurrence
  • Query tasks across your entire vault
  • Filter by date, status, tags, and more
  • Reference: Tasks due today based on daily note

Day Planner

Purpose: Time-block planning within notes

  • Schedule tasks by specific time slots
  • Visual timeline of your day
  • Integrates with your daily notes

Calendar

Purpose: Visual calendar navigation

  • Navigate to daily notes by date
  • Overview of notes with tasks or events
  • Simple and clean interface

Templates & Automation

Templater

Purpose: Advanced templating system

  • Create dynamic templates for daily notes, meeting notes, etc.
  • Use JavaScript for complex template logic
  • Auto-insert dates, file names, and custom content

Dataview

Purpose: Query and display data from notes

  • Create dynamic tables and lists from your notes
  • Show statistics and summaries
  • SQL-like query language for notes

Code & Development

Editor Syntax Highlight

Purpose: Syntax highlighting for code blocks

  • Supports multiple programming languages
  • Makes code more readable in notes

Execute Code

Purpose: Run code snippets directly in notes

  • Execute Python, JavaScript, and other languages
  • Great for documentation with live examples

Navigation & Organization

Recent Files

Purpose: Quick access to recently opened files

  • Shows list of recently accessed notes
  • Faster navigation than file explorer

Remember Cursor Position

Purpose: Maintain cursor position across sessions

  • Returns to exact position when reopening a note
  • Helpful for long documents

Tag Wrangler

Purpose: Manage and refactor tags

  • Rename tags across entire vault
  • Merge similar tags
  • Organize tag hierarchy

Tag Navigator

Purpose: Advanced tag browsing

  • Navigate using nested tag hierarchies
  • Visual tag exploration

Theme & Appearance

Minimal Theme Settings

Purpose: Customize the Minimal theme

  • Fine-tune colors, fonts, and spacing
  • Create a clean, distraction-free writing environment

Installation Tips

  1. Go to Settings > Community plugins
  2. Disable Safe Mode to allow community plugins
  3. Click Browse to find and install plugins
  4. Enable each plugin after installation
  5. Configure plugin settings as needed

Recommended Setup Order

  1. Obsidian Git - Set up sync first
  2. Templater - Create your templates
  3. Tasks - Configure task management
  4. Dataview - Set up dashboards
  5. Other plugins - Add as needed

Originally published at https://dss99911.github.io

Publish Jekyll on Amazon Linux2 on EC2

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.

Setting Up Jekyll

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.

Running Jekyll as a Service

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

Formatting post for Jekyll

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

Uploading Files to the EC2 Server

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

Publish Jekyll on GitHub Pages

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.

Install Jekyll on your desktop

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.

On Mac

If you're using a Mac, you'll need to install Ruby first before you can install Jekyll.

Install Ruby

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

Install Jekyll

Once you have Ruby installed, you can proceed with installing Jekyll. Here's how:

gem install bundler jekyll
jekyll new site
cd site

Deploy

Now that you have Jekyll installed and a new site created, it's time to deploy your site on Github Pages.

Create repository named {user-name}.github.io

First, you need to create a new repository on Github. The repository name should be in the format {user-name}.github.io.

Commit and push Jekyll code

Next, commit your Jekyll site code to the repository and push the changes. Github Pages will automatically deploy your site upon each commit.

Configure deployment setting

It's well described on Pages Quickstart

Check website

Finally, you can check your website by navigating to {user-name}.github.io in your web browser. Your Jekyll site should now be live!

Reference

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

Docker Compose Tutorial

2025-12-31 11:21:07

Docker Compose Tutorial

Docker Compose는 여러 컨테이너로 구성된 애플리케이션을 하나의 네트워크 안에서 실행하고 관리할 수 있도록 돕는 도구입니다. 이 글에서는 Docker Compose를 활용해 효율적으로 서비스를 구성하고 운영하는 방법에 대해 설명합니다.

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:

Compose 버전 설정

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

[Smart Watch] [API 6] The input component of the JS is bound to a variable. After content is entered, the obtained...

2025-12-31 11:17:04

Read the original article:[Smart Watch] [API 6] The input component of the JS is bound to a variable. After content is entered, the obtained variable value does not change.

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
    }

Written by Erman Derici

Rating on Hover

2025-12-31 11:09:57

Check out this Pen I made!