Skip to content

Instantly share code, notes, and snippets.

View pangyuteng's full-sized avatar

pangyuteng

View GitHub Profile
@pangyuteng
pangyuteng / README.md
Last active February 5, 2025 02:13
prevent docker containers running as root

prevent docker containers running as root

OPTION A. [WIP] use apparmor

  • install
sudo apt install apparmor-profiles
@pangyuteng
pangyuteng / README.md
Last active January 23, 2025 16:17
gitlab cicd via kube
@pangyuteng
pangyuteng / README.md
Last active September 18, 2024 00:49
docker swarm vs kubernetes commands

my kubernetes cheatsheet/notes

incomplete* list of docker swarm command mapping to kubectl commands.

docker swarm kubernetes
docker node ls kubectl get nodes
docker stack deploy -c $YAMLFILE kubectl apply -f $YAMLFILE
docker service create ... kubectl create deploy -n $NAMESPACE $PODNAME ...
docker service inspect $SERVICENAME kubectl describe pod -n $NAMESPACE $PODNAME
@pangyuteng
pangyuteng / .dockerignore
Last active August 6, 2024 19:37
just for fun
log
@pangyuteng
pangyuteng / Dockerfile
Last active June 21, 2024 02:17
non-root docker
FROM pytorch/pytorch:2.2.2-cuda11.8-cudnn8-runtime
ARG GROUPID
ARG USERID
ARG USERNAME
RUN groupadd -g $GROUPID developer
RUN useradd --no-log-init -u $USERID -g $GROUPID -s /bin/bash $USERNAME
@pangyuteng
pangyuteng / README.md
Last active February 13, 2025 15:50
sample affine registration with SimpleITK
@pangyuteng
pangyuteng / README.md
Last active February 13, 2024 18:46
how to access local port with an active ufw from within a container
how to access local port with an active ufw from within a container

main solution

TLDR: specify network subnet in compose file, then allow in ufw.

  • in docker-compose setup network with specified subnet.
  • in docker-compose add below to access localhost via host.docker.internal.
```
link https://www.reddit.com/r/Swimming/comments/1afzr77/personal_recipe_to_enhance_feel_of_water/
As a recreational swimmer (swimming on and off for 20+ years), here is my recipe to enhance/regain the feel of water.
+ (optional) 40 min prior swimming, drink 16oz warm 50% diluted (sugar free) gatorade.
+ pick pool with water temp (77 to 82F, opt for an indoor pool if outdoor temp is > 80F).
+ 20-30 min aerobic - freestyle.
+ 5-10 min freestyle with pedals.
+ 5-10 min norma/side dolphin kicks with fins.
@pangyuteng
pangyuteng / README.md
Last active January 29, 2024 22:50
super simple workflow rendering with css and bootstrap

sample view of demo.html

demo

@pangyuteng
pangyuteng / README.md
Last active January 6, 2024 01:52
notes on native javascript