Skip to content

Instantly share code, notes, and snippets.

View JhoLee's full-sized avatar
🕹️
Focusing

Jooho Lee JhoLee

🕹️
Focusing
View GitHub Profile
@nijkah
nijkah / show_containers_using_gpu.py
Created September 7, 2022 01:00
List docker containers using GPU
import os
def shell(command):
stream = os.popen(command)
out = stream.read().split("\n")[:-1]
return out
def find_docker(pid: int):
if pid == -1:
return -1, "No Docker!"
@shipilev
shipilev / gist:cfbe09a31ac32f0cc51078db7898c797
Last active December 20, 2021 18:23
Log4J, JNDI, LDAP: JDK Changes Archeology

Log4J, JNDI, LDAP: JDK Changes Archeology

DISCLAIMER #1: THIS GIST IS INFORMATIONAL ONLY AND NOT A COMPLETE SECURITY GUIDANCE. Use this data with care, and please recheck the commits if you want to cite them as the source.

DISCLAIMER #2: JDK MITIGATIONS ARE NOT THE WHOLE STORY. THE REAL FIX IS IN LOG4J, UPGRADE TO AT LEAST 2.15.0 OR SET log4j2.formatMsgNoLookups=true. There might be more vectors than these mitigations cover. JDK mitigations shrink the attack surface, but they are not guaranteed to solve everything. I only checked this mitigates a few simple proof-of-concepts.

*TL;DR: Use JDK update releases that are less than 3 years old, and all known mitigations are there.

@alexellis
alexellis / job.yaml
Last active January 26, 2024 07:10
Use a Kubernetes Job and Kaniko to build an OpenFaaS function from Git
# Alex Ellis 2018
# Example from: https://blog.alexellis.io/quick-look-at-google-kaniko/
# Pre-steps:
# kubectl create secret generic docker-config --from-file $HOME/.docker/config.json
# Other potential optimizations (suggested by @errordeveloper)
# - Store "templates" in a permanent volume
# - Download source via "tar" instead of git clone
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 25, 2024 17:07
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@trandaison
trandaison / starUML.md
Last active June 19, 2024 21:48
Get full version of StarUML