Skip to content

Instantly share code, notes, and snippets.

View zengqingfu1442's full-sized avatar
๐Ÿ 
Working from home

zengqingfu1442 zengqingfu1442

๐Ÿ 
Working from home
View GitHub Profile
@Bill-tran
Bill-tran / how-to-install-openssl-1.1.1-on-centos-7.md
Created September 7, 2021 09:22
How to install openssl 1.1.1 on CentOS 7

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update
@kralicky
kralicky / harvester-gpu.md
Last active March 1, 2025 15:40
Harvester GPU Provisioning

Harvester GPU Provisioning

  1. Install Harvester, then SSH into the server.

  2. Edit /boot/grub/grub.cfg as follows:

 set default=0
 set timeout=10
 
version: '3'
services:
postgres:
container_name: container-postgresdb
image: postgres
hostname: postgres
ports:
- "6543:5432"
environment:
POSTGRES_USER: postgres
@yaocw2020
yaocw2020 / Harvester-SNAT-problem.md
Last active April 28, 2024 15:24
harvester design

Harvester SNAT Problem

Problem Description

Harvester leverages the Kubernetes service to provide the load balancer for the service in the Harvester virtual machines. The backend servers of the load balancer are the <VM IP>:<service port>.

cw-harv:/home/rancher # kubectl get svc
NAME                        TYPE           CLUSTER-IP      EXTERNAL-IP    PORT(S)        AGE
default-nginx-lb-db9bdca5 LoadBalancer 10.43.113.238 80:32586/TCP 4h32m
#!/bin/sh
DateStamp=$(date +%d%m%y)
BackupDirectory="/data/configdb/backup"
mkdir -p $BackupDirectory
sslCAFile="/data/configdb/mongodb-ssl-cert.pem"
DATABASE='database'
USERNAME='user'
@aafaque33
aafaque33 / .gitlab-ci.yml
Created June 21, 2019 21:25
Gitlab anybadge to generate badge
stages:
- build
create_badge_svg:
stage: build
image: python:3.6.6
tags:
- docker
script:
- echo "Python other dependencies installation"
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 30, 2025 08:29
ๅ›ฝๅ†…็š„ Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ๏ผŒ็”ฑๅ›ฝๅ†…ๆ•™่‚ฒๆœบๆž„ไธŽๅ„ๅคงไบ‘ๆœๅŠกๅ•†ๆไพ›็š„้•œๅƒๅŠ ้€ŸๆœๅŠก | Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ

ๅ›ฝๅ†…ไปŽ Docker Hub ๆ‹‰ๅ–้•œๅƒๆœ‰ๆ—ถไผš้‡ๅˆฐๅ›ฐ้šพ๏ผŒๆญคๆ—ถๅฏไปฅ้…็ฝฎ้•œๅƒๅŠ ้€Ÿๅ™จใ€‚

Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

1๏ธโƒฃ Docker daemon ้…็ฝฎไปฃ็†๏ผˆๆŽจ่๏ผ‰

ๅ‚่€ƒ Docker daemon ้…็ฝฎไปฃ็†

@DahlitzFlorian
DahlitzFlorian / Dockerfile
Last active March 31, 2022 10:56
Run Python application as non-root in Docker - requirements.txt
FROM python:3.7.2-alpine
RUN pip install --upgrade pip
RUN adduser -D worker
USER worker
WORKDIR /home/worker
COPY --chown=worker:worker requirements.txt requirements.txt
RUN pip install --user -r requirements.txt
@holmberd
holmberd / linux-kill-pts.md
Last active April 11, 2025 23:29
Kill tty/pts sessions in Linux

Kill user tty/pts sessions in Linux

Commands

  • w: show who is logged on and what they are doing
  • who: show who is logged on
  • tty: show current users pseudo terminal
  • ps -ft pts/1: get process id for the pseudo terminal
  • pkill: signal process based on name and other attributes
@ernoaapa
ernoaapa / list-failing-pods.sh
Last active June 19, 2024 10:50
Script to list all Kubernetes Pods what are NOT ready
#!/bin/sh
#
# Print Pods which are Pending or not Ready for some reaosn
#
kubectl get pods --all-namespaces -o go-template='{{ range $item := .items }}{{ range .status.conditions }}{{ if (or (and (eq .type "PodScheduled") (eq .status "False")) (and (eq .type "Ready") (eq .status "False"))) }}{{ $item.metadata.name}} {{ end }}{{ end }}{{ end }}'