Skip to content

Instantly share code, notes, and snippets.

View weaponsforge's full-sized avatar
🌴
On vacation

Weapons Forge weaponsforge

🌴
On vacation
View GitHub Profile
@weaponsforge
weaponsforge / Dockerfile
Last active January 22, 2025 17:34
Comon Dockerfile for Node Scripts
FROM node:20.15.3-alpine AS base
RUN mkdir -p /opt/app
WORKDIR /opt/app
RUN adduser -S user
RUN chown -R user /opt/app
COPY package*.json ./
FROM base AS development
RUN npm install
COPY . ./
@weaponsforge
weaponsforge / docker-cleanup.sh
Created April 20, 2025 04:28
Stops and deletes ALL Docker resources
#!/bin/bash
# Stops and deletes ALL Docker resources
docker image prune
docker rmi $(docker images -a -q)
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker system prune -f
docker system prune -a
docker volume prune -f
@weaponsforge
weaponsforge / clean_code.md
Created July 22, 2026 03:39 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules