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 / 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 / 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 / good-reads.md
Created January 16, 2025 09:38
Links to Dev Resources and Notes
  • How To Ask Questions The Smart Way [link]
@weaponsforge
weaponsforge / debugging_with_vscode.md
Last active March 13, 2025 00:44
Debugging with VSCode

Debugging with VSCode

These notes are compatible with VSCode/Cursor having the following specs. Steps for other versions may vary.

Version: 0.42.3
VSCode Version: 1.93.1
Commit: 949de58bd3d85d530972cac2dffc4feb9eee1e40
Date: 2024-10-16T17:56:07.754Z
Electron: 30.4.0
@weaponsforge
weaponsforge / version.sh
Created August 29, 2024 16:36
NodeJS Package Version
#!/bin/bash
# Prints the version of a nodejs package.json file
VERSION=`node -e "console.log(require('../app/package.json').version)"`
echo Synchronizing all modules to version $VERSION
@weaponsforge
weaponsforge / libraries-frameworks.md
Last active December 23, 2023 14:26
Interesting Libraries and Frameworks

Websockets

  • List of tools for playing with Websockets [link]

TotalJS Platform

  • unique JavaScript solution targeted at creating rich real-time web applications
  • has an intuitive (nocode-like) drag and drop UI
  • Website [link]
  • GitHub [link]
@weaponsforge
weaponsforge / react-optimization.md
Last active November 21, 2023 03:12
React Optimization Techniques

React Optimizations

A list of interesting React optimization techniques.

[1] Do less work during rendering

@weaponsforge
weaponsforge / delete_git_tags.sh
Last active May 30, 2023 11:04
Delete all remote and local git tags
# Delete all remote tags
git tag | xargs -L 1 | xargs git push origin --delete
# Delete all local tags
git tag | xargs -L 1 | xargs git tag --delete
@weaponsforge
weaponsforge / compact.bat
Last active March 10, 2023 06:27
Compact/compress the size of an Ubuntu VDI file on VirtualBox running in a Windows host
:: Compact/compress the size of an Ubuntu VDI file on VirtualBox (v7.0) running in a Windows host
:: The VDI file should should have previously run "compact.sh" in the VM before running this script
:: Add VBoxManage.exe to the PATH variable to make it globally available. Usually it's in
:: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe
VBoxManage.exe modifymedium --compact c:\path\to\thedisk.vdi