Skip to content

Instantly share code, notes, and snippets.

View dev-sareno's full-sized avatar
💻

Eladio Jr Sareno dev-sareno

💻
View GitHub Profile
@dev-sareno
dev-sareno / README.md
Created July 3, 2024 09:37
Instaling WordPress+Nginx on CentOS Stream 9
$ sudo -i
$ dnf update
$ dnf install tmux -y

# Fix known issue with CentOS/Redhat. Ref: https://stackoverflow.com/a/68841102/8724367
$ setsebool -P httpd_can_network_connect 1

# Add 4GB Swap. Ref https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7#create-a-swap-file
$ dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
@dev-sareno
dev-sareno / README.md
Created July 3, 2024 09:33
Instaling WordPress+Nginx on Ubuntu 22.04
$ sudo -i
$ whoami
root
$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
@dev-sareno
dev-sareno / openssl_commands.md
Created February 1, 2024 00:47 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@dev-sareno
dev-sareno / README.md
Created January 30, 2024 09:51 — forked from stokito/README.md
Cryptography GUI tools: OpenSSL GUI, keys management, PKI, PGP/GPG GUI

OS tools and user friendly cryptography GUI tools

Windows Certificate Manager Tool (certmgr.msc) Manage storage for x509 keys. No support for PGP/GPG. Can't sign or encode, can't generate a key. You can use IIS webserver managemnt console to generate a cert.Proprietary

certmgr screenshot

GNOME Seahorse GUI for SSH keys, X509 certs, PGP/GPG. Linux only.

@dev-sareno
dev-sareno / README.md
Created October 5, 2023 07:14
Gitlab runner in Docker
$ cat <<EOT > docker-compose.yaml
version: "3"
services:
  runner:
    image: gitlab/gitlab-runner
    restart: unless-stopped
    entrypoint:
    - /bin/sh
 - -c
@dev-sareno
dev-sareno / README.md
Last active September 29, 2023 08:33
Nginx config for Single Page Application (SPA)
$ cat <<EOF > nginx.conf
server {
    listen 80;
    listen [::]:80;
    server_name _;
    
    root /usr/share/nginx/html;

 location / {
@dev-sareno
dev-sareno / k3s-ecr-credentails-auto-renewal.md
Last active October 9, 2023 05:11
ECR credentials auto-renewal with Cron

EC2 Instance Profile (IAM Role)

IAM Role Trust Relationship:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "ec2.amazonaws.com"
@dev-sareno
dev-sareno / bash_strict_mode.md
Created May 28, 2023 11:16 — forked from vncsna/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
@dev-sareno
dev-sareno / nginx.conf
Created November 13, 2022 13:56
Jellyfin NginX configuration
server {
server_name stream.example.com;
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/stream.example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/stream.example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
###### Jellyfin - Reverse Proxy Recommended Config Start (https://jellyfin.org/docs/general/networking/nginx.html) ######
add_header Strict-Transport-Security "max-age=31536000" always;
@dev-sareno
dev-sareno / python_setup_py.md
Last active April 8, 2021 02:05
Python Cheat Sheet

setup.py

package_data

package_data copy the files into Python site-packages level directory.

data_files

data_files copy the files into System-wide level directory.

install_requires

install_requires install the library dependencies.