Skip to content

Instantly share code, notes, and snippets.

@lohazo
lohazo / https-localhost.macos.sh
Created September 27, 2022 09:38
https-localhost.macos.sh
brew install caddy mkcert nss dnsmasq
mkcert -install
# test could be anything
mkcert '*.app.test' '*.cdn.test'
# rename the certs and move them under /usr/local/etc/caddy/certs
cat <<EOF > /usr/local/etc/caddy/Caddyfile
*.app.test:443, *.cdn.test:443 {
@lohazo
lohazo / docker-compose.yml
Created August 17, 2022 02:34 — forked from rts-rob/docker-compose.yml
Local development of Cloudflare Workers and Fauna with Fauna Dev and Miniflare
# Copyright Fauna, Inc.
# SPDX-License-Identifier: MIT-0
version: "3.9"
services:
fauna:
image: fauna/faunadb:latest
ports:
- "8443:8443"
- "8444:8444"
@lohazo
lohazo / AdbCommands
Created August 16, 2022 08:30 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@lohazo
lohazo / docker-default-directory.md
Last active November 24, 2021 06:50
Change docker's default /var/lib/docker to different directory on ubuntu

1. Take a backup of docker.service file.

cp /lib/systemd/system/docker.service /lib/systemd/system/docker.service.orig

2. Modify /lib/systemd/system/docker.service to tell docker to use our own directory instead of default /var/lib/docker. In this example, I am using /p/var/lib/docker

Apply below patch.

@lohazo
lohazo / create-cert-and-key-with-certbot.sh
Created June 2, 2020 02:13
Install harbor registry with letsencrypt
sudo certbot certonly --standalone -d registry.example.com