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 / 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 / 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: