Skip to content

Instantly share code, notes, and snippets.

View deanet's full-sized avatar
:octocat:
talk is cheap, show me the code

deanetdavid deanet

:octocat:
talk is cheap, show me the code
View GitHub Profile
@deanet
deanet / run.sh
Created September 29, 2024 16:56
Rocky8
#!/bin/bash
#install node exporter
cd /usr/src/
wget -c "https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz"
tar -xvf node_exporter-1.8.2.linux-amd64.tar.gz
cd node_exporter-1.8.2.linux-amd64/;
mv node_exporter /usr/local/bin/
echo '
@deanet
deanet / run.sh
Last active September 14, 2024 05:40
centos7 exporter
#!/bin/bash
##reconfig yum
mkdir /etc/yum.repos.d/old
mv /etc/yum.repos.d/CentOS*.repo /etc/yum.repos.d/old/
mv /etc/yum.repos.d/epel*.repo /etc/yum.repos.d/old/
echo '[base]
name=CentOS-7.9.2009 - Base
@deanet
deanet / prdsnhlife.conf
Created September 5, 2023 06:55
prdsnhlife
[prodm]
listen = /dev/shm/php-cgi-prodm.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = prodm
listen.group = prodm
listen.mode = 0666
user = prodm
group = prodm
@deanet
deanet / Unix benchmark Game-2
Last active March 24, 2023 08:18
Unix benchmark Game-2
System: hostname: GNU/Linux
OS: GNU/Linux -- 5.15.102-1-pve -- #1 SMP PVE 5.15.102-1 (2023-03-14T13:48Z)
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
CPU 0: AMD Ryzen 7 5800X 8-Core Processor (7599.7 bogomips)
Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
CPU 1: AMD Ryzen 7 5800X 8-Core Processor (7599.7 bogomips)
Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
CPU 2: AMD Ryzen 7 5800X 8-Core Processor (7599.7 bogomips)
Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
@deanet
deanet / unix-benchmark-aliyun-simple-as
Created November 27, 2021 08:01
simple-as-2vcore-1GB-ram
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: iZk1a9fyrlzo1y8y8565ofZ: GNU/Linux
OS: GNU/Linux -- 3.10.0-957.21.3.el7.x86_64 -- #1 SMP Tue Jun 18 16:35:19 UTC 2019
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz (5000.0 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 1: Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz (5000.0 bogomips)
@deanet
deanet / acme-v01-to-v02.sh
Last active July 22, 2021 12:16
acme-upgrade-v01-to-v02-api
#!/bin/bash
## upgrade automatically /root/.acme.sh/ domain config on Le_API from https://acme-v01.api.letsencrypt.org/directory to https://acme-v02.api.letsencrypt.org/directory
## blog.dgprasetya.com
##upgrade acme.sh first
"/root/.acme.sh"/acme.sh --upgrade
cd /root/.acme.sh
@deanet
deanet / dp190200-b.vm.conf
Created April 21, 2021 13:36
Docker Exam SPE ACADEMY 2021
upstream app_backend {
server app-spe-a:80;
server app-spe-b:80;
server app-spe-c:80;
}
server {
listen 80;
server_name dp190200-b.vm;
location / {
@deanet
deanet / resize-lv.bash
Created April 20, 2021 15:33
Resizing a logical volume in an LVM filesystem
[root@ecoll-v2-mysql-master-01 ~]# umount /home/
[root@ecoll-v2-mysql-master-01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 12G 0 12G 0% /dev
tmpfs 12G 0 12G 0% /dev/shm
tmpfs 12G 20M 12G 1% /run
tmpfs 12G 0 12G 0% /sys/fs/cgroup
/dev/mapper/centos-root 50G 45G 5.6G 89% /
/dev/sda1 1014M 181M 834M 18% /boot
tmpfs 2.3G 0 2.3G 0% /run/user/0
version: "3.5"
## SpeAc2021
services:
dbmongo-dian-config:
image: mongo:latest
container_name: dbmongo-dian
ports:
- "27017:27017"
volumes:
- dbmongo-vol-config:/data/db
FROM php:7.2-apache-stretch
LABEL maintener="dian prasetya <[email protected]>"
ENV APP_ENV=dev
ENV DB_MYSQL_HOST=localhost
ENV DB_MYSQL_PORT=3306
ENV DB_MYSQL_DATABASE=spe_acc
ENV DB_MYSQL_USERNAME=user
ENV DB_MYSQL_PASSWORD=password