Skip to content

Instantly share code, notes, and snippets.

View Hiweus's full-sized avatar
🏠
Working from home

Andre Alves Leocadio Hiweus

🏠
Working from home
View GitHub Profile
ar3H/5RlnmGqQWUVlSfH5M2PcL0+bY9jw5rnuKEn9hdXZrqlD5U5AUpNp7Pmp2Zi3SRGLAZfJ+tDkYq2u/b/brtT26rLx5fy5bwTa/6OV/md6dfiBYy2u5lbkZ7KqOLNNIDjomC0E8GIiwYTIGoOQLN1KeZvUca1NyvrFNp32X7Z+ylxXlFQF0YYBRG08XBHtPnEiMwnEXG5GCtAzwl4gNEyZC6XE7MLQYfrkouE3TR/nbhoRVq8nl9K79K4/zNS3c0w3mkvYMFQz8nSfaT5qTYXZ2LdhiToVi1CQlA1nJeAmyT6JBWihjyXNRGWykLvaTiM4GvJx7X81RW37N4rBa58NCuUCdn3/uihkM5pLaCXLldNNoKcDZ9cQs4jup0pICp2UruY1Gw7eJki3MKaKc+MVr/Zu3peaNhVhXJuhDfEc73Tu/LmMUQSnQMtT5gWRac5pvqZXmMw9depXs1Ej8TAgM3lsKsbxlhuIbprU5fp2mcR2bLY3tTs2/XW5FHIH9CmtvIQtB3vJyBxwMS58+M9XtP4YtVFiXwNedxmwXQrGqHmwsPlLSIxNXTHi11fVIUPIGs4iSchW0Uk0pjtd/CDO/tB+oy9NTRvooHbPu7b6BPTHvcpS0qIWuC6BybAykeWbV+sxmcojq9eB1wCTh2N2B6NsyXBsu9Vg9K4R0272AWLNpFWhhGs0Y7h91klHVFyg5qgL/6dEwoIcqX8arZXI39TeBaeYUfoeH4+mKbDBzhLu25tuztrhnx6CuPT7WRIIerbyvSiKO9iag3tLoJUuFD3Z9+sf27vlwsxf3/TwxF24YiIl4ssROaHoSkPy4AMuOEslQTtNjASSSK3fK5zHT6IU84CTAT7NG3bGOzK8MFsFyi1wu1nQ1rOQao9idkzqEbFeKKp+2yHWFzt/dwJgNYvl0Drm+EQtfdLgLx6raaxzvjq79I+gEp2vQpF9qPD00fPVAhmvOLN5clyoRAAEbaex4brd0f5/X0CqN4KoKz5/MIzesVjYTTjP2Rf
@Hiweus
Hiweus / README.md
Created February 7, 2025 23:24
Hosting a docker register

Docker register

This command will host a docker register

docker run -d -p 5000:5000 -v ./register/images:/var/lib/registry -v ./certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/fullchain.pem -e REGISTRY_HTTP_TLS_KEY=/certs/privkey.pem --restart on-failure --name myregistry registry

Build and push

@Hiweus
Hiweus / README.md
Created February 7, 2025 20:22
Lightweight api gateway

Api gateway

Create a api gateway and serve ssl

Configuring localhost ssl

mkcert -install
mkcert "*.local.gd" local.gd
@Hiweus
Hiweus / README.md
Created February 4, 2025 02:26
Issue lets encrypt certificate using dns challenge

Installing dependencies

sudo apt install certbot -y

# Download and install dns plugin for certbot
# Run as root
mkdir -p /tmp/certificate && cd /tmp/certificate
wget https://github.com/joohoi/acme-dns-certbot-joohoi/raw/master/acme-dns-auth.py
# Replace python to python3 executable
@Hiweus
Hiweus / Dockerfile
Created January 24, 2025 01:30
busybox react host
FROM busybox
WORKDIR /app
# Copy React build files
COPY dist/ /app
# Set up the httpd configuration
# Http request will result in 404
# But the response content will be the site, so will render anyway
@Hiweus
Hiweus / README.md
Created December 9, 2024 02:47
bash autocompletion

Autocomplete

bash shell generally handle autocomplete using a specific function, example:

My function

function aa() {
  echo "$@";
 }
@Hiweus
Hiweus / App.css
Last active May 22, 2024 16:57
Example of composite component in react
.card {
background: red;
color: white;
font-weight: 500;
display: flex;
justify-content: space-between;
align-items: center;
width: 900px;
}
@Hiweus
Hiweus / gist:e4f60dfd9de7ec4f99a82c4ff3e3baa1
Created May 4, 2024 13:29 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@Hiweus
Hiweus / README.md
Last active April 17, 2025 05:34
Activate windows

Activate windows

Reference

Keys

Pro: W269N-WFGWX-YVC9B-4J6C9-T83GX
Pro N: MH37W-N47XK-V7XM9-C7227-GCQG9
Home: TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home N: 3KHY7-WNT83-DGQKR-F7HPR-844BM
@Hiweus
Hiweus / grokking_to_leetcode.md
Created February 18, 2024 22:13 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window