Skip to content

Instantly share code, notes, and snippets.

@Kerryliu
Kerryliu / ugreen_truenas_led.md
Last active April 18, 2025 20:55
TrueNAS UGREEN DXP4800 Plus Status LED Guide

UGREEN DXP4800 Plus TrueNAS Status LED Guide

20240609_035951642_iOS

The following is a quick guide on getting basic status LED functionality working with TrueNAS running on the UGREEN DXP4800 Plus. Theoretically, it should work on all models (with some small revisions to the script), but I only have a DXP4800 Plus. :)

This guide is for cron job that runs a script to update the LEDs every couple minutes, but I'm sure the following can be modified for blinky LEDs as well.

Steps:

@stevedodson
stevedodson / README.md
Last active October 20, 2021 21:33
ElasticON 2020 - Using machine learning to detect DGA with >99.9% accuracy
@stevedodson
stevedodson / README.md
Last active July 18, 2022 14:24
Introduction to supervised machine learning in Elastic webinar - Tuesday, February 25, 2020

Introduction to supervised machine learning in Elastic webinar

Tuesday, February 25, 2020

Wednesday, May 27, 2020 - updated customer_churn.ipynb for version 7.7.0

Monday, November 16, 2020 - updated for version 7.10 and eland 7.10b

Monday, September 20, 2021 - updated customer_churn.ipynb for version 7.14

Monday, February 8, 2022 - updated customer_churn.ipynb for version 8.0

@max-rocket-internet
max-rocket-internet / prom-k8s-request-limits.md
Last active March 30, 2025 02:08
How to display Kubernetes request and limit in Grafana / Prometheus properly

CPU: percentage of limit

A lot of people land when trying to find out how to calculate CPU usage metric correctly in prometheus, myself included! So I'll post what I eventually ended up using as I think it's still a little difficult trying to tie together all the snippets of info here and elsewhere.

This is specific to k8s and containers that have CPU limits set.

To show CPU usage as a percentage of the limit given to the container, this is the Prometheus query we used to create nice graphs in Grafana:

sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", image!="", container_name!="POD"}[5m])) by (pod_name, container_name) /
@prudhvigodithi
prudhvigodithi / .txt
Last active March 10, 2022 08:17
Kubectl cheat sheet.
kubectl run nginx image=nginx  --port=80  --record
kubectl set image deployment nginx nginx=nginx:1.2
kubectl rollout history deployment nginx
kubectl rollout status deployment nginx
kubectl rollout undo deployment nginx  --to-revision=2
kubectl autoscale deployment nginx  --cpu-percent=50  -- min=1  -- max 2
kubectl run nginx3  --image=nginx  --requests=cpu=200m  --limits=cpu=300m  --requests=memory=1Gi  --limits=memory=2Gi
kubectl run hello  --schedule=”*/1 * * * *”  --restart=OnFailure  -- image=busybox  -- /bin/sh -c “date; echo Hello from the kubernetes cluster”
kubectl port-forward redis-master-765d459796–258hz 6379:6379
kubectl get pods redis-master-765d459796–258hz -o yaml
@ekreutz
ekreutz / ansible_variable_precedence.md
Last active February 3, 2025 10:55
Ansible variable precedence (order, hierarchy)
@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active January 23, 2025 16:11
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@asukakenji
asukakenji / 0-go-os-arch.md
Last active April 5, 2025 21:07
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@BretFisher
BretFisher / docker-for-mac.md
Last active March 31, 2025 10:12
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@arirusso
arirusso / nord_modular_osx.md
Last active March 10, 2023 21:22
Use the original Nord Modular Editor with OSX

Use the original Nord Modular Editor with OSX

Required

  • Homebrew

Compatibility

Confirmed working with