Skip to content

Instantly share code, notes, and snippets.

View codenuke's full-sized avatar

C0deNuke codenuke

View GitHub Profile
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3
@codenuke
codenuke / nginx.conf
Created March 29, 2019 03:32
Config from Domecloud Class
user root;
worker_processes auto;
worker_rlimit_nofile 100000;
pid /run/nginx.pid;
events {
worker_connections 200000;
multi_accept on;
}
version: '3'
services:
phpfpmoracle:
container_name: php_oracle
image: codenuke/phpfpm_oracle:php7.1-oci12.2
ports:
- "8000:8000"
volumes:
- ./php-fpm.conf:/usr/local/etc/php-fpm.conf
- ./php.ini:/usr/local/etc/php/php.ini
@codenuke
codenuke / img2sd.sh
Created October 20, 2019 13:28
Write Image to disk
dd if=/dev/zero of=/dev/null bs=64m count=1000 & while pkill -INFO -x dd; do sleep 1; done
@codenuke
codenuke / web.desktop
Created November 21, 2019 12:34
pi_autostart
[Desktop Entry]
Type=Application
Name=RPi-infoscreen
Comment=Kivy RPI Infoscreen
NoDisplay=false
Exec=/usr/bin/lxterminal -e chromium-browser --kiosk --incognito http://10.0.5.253:18000/pi/#/cfg/news/3 && unclutter
NotShowIn=GNOME;KDE;XFCE;
@codenuke
codenuke / settings.json
Created May 25, 2020 13:34
vscode-setting
{
"terminal.integrated.fontFamily": "Inconsolata for Powerline",
"terminal.integrated.fontSize": 14,
"vim.easymotion": true,
"vim.leader": ",",
"window.zoomLevel": 0,
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [
" "
@codenuke
codenuke / GenerateSSL.sh
Last active September 18, 2022 13:20
Generate Self-Signed For Server & Client
openssl genrsa 2048 > ca-key.pem
openssl req -new -x509 -sha256 -nodes -days 3600 -key ca-key.pem -out ca-cert.pem
# server key
openssl req -newkey rsa:2048 -days 3600 -nodes -keyout server-key.pem -out server-req.pem
openssl rsa -in server-key.pem -out server-key.pem
openssl x509 -sha256 -req -in server-req.pem -days 3600 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out server-cert.pem
# client key
openssl req -newkey rsa:2048 -days 3600 -nodes -keyout client-key.pem -out client-req.pem
package main
import (
"crypto/tls"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
)
The podman and buildah packages conflict with docker-ce. Remove them first:
yum erase podman buildah
https://unix.stackexchange.com/questions/611228/getting-series-of-file-conflicts-like-runc-and-containerd-when-trying-to-install
https://www.linuxtechi.com/install-docker-ce-centos-8-rhel-8/
dnf update -y ; reboot
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf list docker-ce
@codenuke
codenuke / check_docker_container.sh
Created August 25, 2021 10:02 — forked from pjosalgado/check_docker_container.sh
Bash Script to Check the Status of a Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Edited by: Paulo José de Oliveira Salgado
# Email: paulo@technosoftware.com.br