Skip to content

Instantly share code, notes, and snippets.

View hx-natthawat's full-sized avatar
🏠
Working from home

Natthawat hx-natthawat

🏠
Working from home
View GitHub Profile
@hx-natthawat
hx-natthawat / zsh-setup-guide.md
Last active January 17, 2026 19:25
Ultimate Zsh Dev Setup with Pastel Colors + AI - nvm (lazy), Git, Oh My Zsh, Nerd Fonts, bat, fzf, eza, difftastic, GitHub Copilot CLI | 100+ shortcuts

Ultimate Zsh Development Environment Setup

A complete guide to set up a modern, powerful terminal environment for developers on macOS.

🎯 What You'll Get

  • Dual Theme System - Cyberpunk (neon) & Pastel (soft) themes with instant switching
  • nvm - Node Version Manager with lazy-loading (50-60% faster startup)
  • Git - Fully configured with delta, difftastic, and 40+ aliases
  • Oh My Zsh - 8 powerful plugins
@hx-natthawat
hx-natthawat / code-editor-rules.md
Created February 3, 2025 15:27 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@hx-natthawat
hx-natthawat / synapse-postgres-docker-compose.md
Created August 11, 2024 16:37 — forked from faaaaabi/synapse-postgres-docker-compose.md
A basic setup for synapse with postgres behind a nginx reverse proxy

Synapse Docker Compose Setup

This proposed setup assumes that you want to use synapse with a Postgres database behind a separate nginx reverse proxy for TLS.

Setup

DNS setup

A detailed explanation of a basic and extended dns setup can be found here

Generate synapse config

@hx-natthawat
hx-natthawat / .gitignore
Created October 20, 2023 16:48 — forked from tatsuyasusukida/.gitignore
Node.js Docker Image that can uses FFmpeg
/out.mp4
@hx-natthawat
hx-natthawat / lightsail-docker.sh
Created August 27, 2023 06:56 — forked from Jeiwan/lightsail-docker.sh
Auto-Install Docker and Docker Compose on AWS Lightsail
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y docker-engine
sudo curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo groupadd docker
@hx-natthawat
hx-natthawat / migrate.js
Last active July 12, 2023 08:08
Directus - Schema Migration
const fetch = require("cross-fetch");
const BASE_DIRECTUS_URL = "http://localhost:8055";
const BASE_ACCESS_TOKEN = "rnIg69xxxxxxxxxxxxxxxxxxxP3F";
const TARGET_DIRECTUS_URL = "http://123.123.123.123:8055";
const TARGET_ACCESS_TOKEN = "UTrcUvyyyyyyyyyyyyyyyyyyyyyk_2";
async function main() {
const snapshot = await getSnapshot();
@hx-natthawat
hx-natthawat / README.md
Last active January 15, 2023 03:31
Script for every 5 mins check and auto restart Bitnami Apache when down.

Don't forget permission to bitnami with permission 755.

@hx-natthawat
hx-natthawat / Heroku SSL with Certbot.md
Created August 9, 2020 15:12 — forked from Jlevyd15/Heroku SSL with Certbot.md
Creating a SSL certificate locally using Certbot on Mac OS and deploying to an existing Heroku App

Creating a SSL certificate locally using Certbot on Mac OS and deploying to an existing Heroku App

Caveats

  • You must have a heroku app deployed on the hobby tier. This is NOT the free tier and costs ~7/month
  • i'm assuming you have homebrew installed. It will be need to install the Certbot client
  • i'm also assuming you have the heroku CLI tools installed

first up, run this to install the certbot client

brew install certbot

Stop all containers:

  • docker ps -aq | xargs docker stop

Remove all containers:

  • docker ps -aq | xargs docker rm

Remove all images:

  • docker images -aq | xargs docker rmi

Remove all networks: