Skip to content

Instantly share code, notes, and snippets.

View xissy's full-sized avatar

Taeho Kim xissy

View GitHub Profile
@xissy
xissy / swiftui-jamo-bug.md
Last active December 28, 2025 16:27
Fixing Korean Text Composition (Jamo Separation) Bug in SwiftUI

Fixing Korean Text Composition (Jamo Separation) Bug in SwiftUI

The Problem

When using SwiftUI's TextField with axis: .vertical or TextEditor, you may encounter a bug where Korean characters are separated into their constituent Jamos (e.g., typing '김밥' results in 'ㄱㅣㅁ밥').

This occurs because SwiftUI's state updates during text entry can interrupt the IME (Input Method Editor) composition process, committing the intermediate Jamo characters prematurely before they can be combined into a full syllable block.

The Solution

@xissy
xissy / ios-build-and-launch.sh
Created November 18, 2025 10:57
Universal iOS Build and Launch Script
#!/bin/bash
# Universal iOS Build and Launch Script
# Automatically detects project settings or accepts command-line options
#
# Usage: ./ios-build-and-launch.sh [OPTIONS] [device-name]
#
# Options:
# --project PATH Path to .xcodeproj or .xcworkspace (auto-detected if not provided)
# --scheme NAME Scheme name (auto-detected if not provided)
# Uncomment the next line to define a global platform for your project
#platform :ios, '11.0'
target 'Family' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Family
pod 'Alamofire', '~> 4.5'
pod 'SwiftyJSON', '~> 4.0'
@xissy
xissy / json_formatter.go
Created March 30, 2018 10:15
Logrus JSON formatter for Apex Up
package main
import (
"encoding/json"
"fmt"
"time"
"github.com/sirupsen/logrus"
)
@xissy
xissy / binarysearch.go
Last active October 15, 2017 07:42
Binary search in Go
package binarysearch
import (
"errors"
)
func BinarySearch(a []int, target int) (int, error) {
startPos := 0
endPos := len(a)
@xissy
xissy / cache.go
Last active October 15, 2017 16:15
LRU Cache in Go
package cache
type Cache interface {
Get(key string) interface{}
Set(key string, value interface{})
}
type CacheNode struct {
Key string
Value interface{}
@xissy
xissy / etcd-1.sh
Created August 20, 2017 04:34
Bootstrap etcd v3 cluster
# For each machine
ETCD_VERSION=v3.2.5
TOKEN=taipei101-etcd-token
CLUSTER_STATE=new
NAME_1=core-1
NAME_2=core-2
NAME_3=core-3
HOST_1=10.0.1.1
HOST_2=10.0.1.2
HOST_3=10.0.1.3
@xissy
xissy / gogs.sh
Last active August 20, 2017 05:31
Traefik with Docker Swarm and TLS
docker service create \
--network traefik-net \
--name gogs \
--mount src=gogs,dst=/data \
--constraint node.hostname=="hostname-1" \
--label traefik.port=3000 \
--label traefik.frontend.rule=Host:git.xxx.com \
gogs/gogs
@xissy
xissy / cockroach-1.sh
Created August 16, 2017 06:45
Bootstrap a cockroachdb cluster
./cockroach start --background --certs-dir=certs --advertise-host=10.140.1.1
@xissy
xissy / consul-agent-1.sh
Created August 16, 2017 05:03
Bootstrap a consul cluster
docker run -d --restart always --net host --name consul \
consul agent -server -bootstrap-expect=3 -retry-join=10.140.1.2 -retry-join=10.140.1.3 -bind=10.140.1.1 -ui -client=10.140.1.1