Skip to content

Instantly share code, notes, and snippets.

View jackyscript's full-sized avatar

dejafu jackyscript

  • Berlin
View GitHub Profile

kubectl utilities

Get all pods plain names

kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'

Get the node port

@jackyscript
jackyscript / linux_cheatsheet.md
Created June 28, 2024 22:12
Linux Cheatsheet

OS, kernel version info

hostnamectl uname -srm lsb_release -a

@jackyscript
jackyscript / README.md
Created June 18, 2024 14:37 — forked from Harry-Chen/README.md
NetBox Docker deployment under sub-directory

Assume your deployment is under /netbox:

Add to configuration/configuration.py

BASE_PATH = environ.get('BASE_PATH', '')

Add to env/netbox.env

@jackyscript
jackyscript / docker_credential_pass.md
Last active June 18, 2024 09:11
How to initialize docker-credentials-pass

How to initialize docker-credentials-pass

All thanks and credits to Ayrat-Kh, see also the original thread:

  1. Download "docker-credential-pass"

wget https://github.com/docker/docker-credential-helpers/releases/download/v0.8.2/docker-credential-pass-v0.8.2-amd64

  1. Copy file to /usr/bin directory.
@jackyscript
jackyscript / docker_notes.md
Last active June 7, 2024 10:00
Docker Cheatsheet

Docker Cheatsheet

Basics

Show all containers:

docker ps -a

Restart all containers (quietly):

docker restart $(docker ps -a -q)

Uppercase only:

(?-i)[A-Z]+(?![a-z])

To lower case:

\L$0

@jackyscript
jackyscript / index.html
Created December 29, 2023 19:00
HTML blank template
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Important title</title>
<meta name="description" content="Some content">
<meta name="author" content="dejafu">
@jackyscript
jackyscript / Monad.js
Created November 14, 2022 07:49 — forked from MeetMartin/Monad.js
JavaScript Monad in under 60 seconds.
// JavaScript functional programming
// Monad under 60 seconds
const Functor = {
of: value => ({
value: value,
inspect: () => console.log(`Functor(${value})`),
map: fn => Functor.of(fn(value))
})
};s