Skip to content

Instantly share code, notes, and snippets.

@scyto
scyto / .migrate-docker-swarmVMs.md
Last active January 17, 2025 23:49
Migrate Docker Swarm VMs from Hyper-V to Proxmox

Introduction

This one is the one that has to work, even more so the domain controllers. This is what my swarm looks like

you may want to read from the bottom up as later migrations are where i had the process more locked and less experimentation

The plan

So the plan is as follows (and is based on my experience with home assistant oddlye enough)

  1. Backup node 1 VM with synology hyper-v backup
@jstnlvns
jstnlvns / git: gitignore.md
Created November 16, 2018 19:42
a gitignore cheatsheet

Git sees every file in your working copy as one of three things:

  1. tracked - a file which has been previously staged or committed;
  2. untracked - a file which has not been staged or committed; or
  3. ignored - a file which Git has been explicitly told to ignore.

Ignored files are usually build artifacts and machine generated files that can be derived from your repository source or should otherwise not be committed. Some common examples are:

  • dependency caches, such as the contents of /node_modules or /packages
  • compiled code, such as .o, .pyc, and .class files

Docker Swarm in LXC Containers

Part of collection: Hyper-converged Homelab with Proxmox

After struggling for some days, and since I really needed this to work (ignoring the it can't be done vibe everywhere), I managed to get Docker to work reliable in privileged Debian 12 LXC Containers on Proxmox 8

(Unfortunately, I couldn't get anything to work in unprivileged LXC Containers)

There are NO modifications required on the Proxmox host or the /etc/pve/lxc/xxx.conf file; everything is done on the Docker Swarm host. So the only obvious candidate who could break this setup, are future Docker Engine updates!

@scyto
scyto / swarm-updating-shepherd.md
Created May 15, 2022 02:05
use shepherd to update images

Update Swarm Images

i wanted to update swarm images whenever there is a new image available (even at the risk of breaking something)

it seems watchtower can't do this for swarm stacks/services - only one off containers.

I found this great container from https://github.com/djmaze/shepherd

placement considerations

Must be placed on a manager node.

@scyto
scyto / docker-swarm-architecture.md
Last active January 17, 2025 23:44
My Docker Swarm Architecture
@straker
straker / README.md
Last active January 17, 2025 23:43
Basic Snake HTML and JavaScript Game

Basic Snake HTML and JavaScript Game

Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When the snake eats an apple, the score should increase by one. Use context.fillText() to display the score to the screen
@stueccles
stueccles / array.verse
Last active January 17, 2025 23:40
A Verse module that adds useful functions to Verse Arrays including Map, Reduce etc.
using { /Verse.org/Random }
Array<public> := module:
# Makes an `array` with only unique elements
(Input:[]t where t:subtype(comparable)).Unique<public>()<transacts>:[]t =
var UniqueArray : []t = array{}
for (Value : Input):
if (UniqueArray.Find[Value] > -1) {}
else:
@cx-recruiting
cx-recruiting / products.sql
Last active January 17, 2025 23:39
Sample PostgreSQL Query
SELECT
p.product_name,
COUNT(o.order_id) as total_orders
FROM products p
JOIN orders o ON p.product_id = o.product_id
GROUP BY p.product_name
HAVING COUNT(o.order_id) >= 50
ORDER BY total_orders DESC;
@yifanzz
yifanzz / git-usage-prompt.md
Created November 16, 2024 19:49
EP9 Notes

Git Usage

  • use the following prefixes for commit messages followed by a colon and a space:
    • "fix" for bug fixes
    • "feat" for new features
    • "perf" for performance improvements
    • "docs" for documentation changes
    • "style" for formatting changes
    • "refactor" for code refactoring
    • "test" for adding missing tests
  • "chore" for chore tasks