Skip to content

Instantly share code, notes, and snippets.

View Jakiboy's full-sized avatar
🖥️
Keyboarding from 127.0.0.1

Jakiboy Jakiboy

🖥️
Keyboarding from 127.0.0.1
View GitHub Profile
@Jakiboy
Jakiboy / SingletonWithConstructor.php
Last active November 9, 2022 00:32
PHP Singleton Design Pattern with __construct()
<?php
/**
* @author : JIHAD SINNAOUR
* @package : VanillePlugin
* @version : 0.9.2
* @copyright : (c) 2018 - 2022 Jihad Sinnaour <mail@jihadsinnaour.com>
* @link : https://jakiboy.github.io/VanillePlugin/
* @license : MIT
*/
@Jakiboy
Jakiboy / my.cnf
Last active March 16, 2023 19:31 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@Jakiboy
Jakiboy / Apache.md
Created April 4, 2023 20:42
Apache (Optimisation)

Apache (Optimisation)

⚡ Installation

Global

apt-get install apache2-utils
@Jakiboy
Jakiboy / Git.md
Created April 4, 2023 20:44
GIT (Documentation)

GIT (Documentation)

Configuration

git config --global user.name "{username}"
git config --global user.email "{email}"
git config --global core.ignorecase false
git config --global core.editor {subl}
git config --global merge.tool {filemerge}
@Jakiboy
Jakiboy / MySQL.md
Created April 4, 2023 20:44
MySQL (Optimisation)

MySQL (Optimisation)

⚡ Setup

Commands

SHOW VARIABLES LIKE "[name]";
@Jakiboy
Jakiboy / Nginx.md
Created April 4, 2023 20:45
Nginx (Load balancing / Reverse Proxy)

Nginx (Load balancing / Reverse Proxy)

Load balancing / Reverse Proxy for Apache & PHP-FPM.

⚡ Installation

apt-get install apache2
apt-get install php7.4-fpm
apt-get install nginx
@Jakiboy
Jakiboy / PHP.md
Created April 4, 2023 20:46
PHP (Optimisation)

PHP (Optimisation)

⚡ Configuration

@ /etc/php/7.4/apache2/php.ini
@ /etc/php/7.4/fpm/php.ini

Global

@Jakiboy
Jakiboy / Vhost.md
Created April 4, 2023 20:47
Vhost (Example)

Vhost (Example)

⚡ Configuration

<VirtualHost *:80>
  ServerAdmin webmaster@{domain}
  ServerName {domain}
  ServerAlias {sub}.{domain}
 DocumentRoot "/var/www/html/{domain}"
@Jakiboy
Jakiboy / VPS.md
Created April 4, 2023 20:48
LAMP (Debian 11)

LAMP (Debian 11)

⚡ Update / Upgrade

Update source:

@ /etc/apt/sources.list

deb http://deb.debian.org/debian/ {dist} main
@Jakiboy
Jakiboy / Vagrant.md
Created April 4, 2023 20:51
Vagrant (Virtualbox)

Vagrant (Virtualbox)

⚡ Init

vagrant init debian/bullseye64