Skip to content

Instantly share code, notes, and snippets.

@isnusun
isnusun / kill-all-php-fpm.sh
Created March 19, 2024 04:56 — forked from bmichalski/kill-all-php-fpm.sh
Kill all php-fpm processes
sudo kill -9 `sudo ps -ef | grep php-fpm | grep -v grep | awk '{print $2}'`
@isnusun
isnusun / nginx.conf
Created December 19, 2021 08:10 — forked from seanogdev/nginx.conf
Server : 4 Core. 8GB RAM, 80GB SSD, with 20GB free :: Traffic ~1.2m pv per month. php 5.5.18
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
worker_rlimit_nofile 1024;
events {
worker_connections 4096;
#multi_accept on;
}
@isnusun
isnusun / ImageTools.js
Created July 9, 2021 01:10 — forked from SagiMedina/ImageTools.js
Resize and crop images in the Browser with orientation fix using exif
import EXIF from 'exif-js';
const hasBlobConstructor = typeof (Blob) !== 'undefined' && (function checkBlobConstructor() {
try {
return Boolean(new Blob());
} catch (error) {
return false;
}
}());
@isnusun
isnusun / ufw.md
Created April 1, 2019 08:41 — forked from kimus/ufw.md
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@isnusun
isnusun / installphp7.sh
Created March 22, 2016 23:23 — forked from tronsha/installphp7.sh
Install PHP7 to Ubuntu
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
apt-get update
apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev make
mkdir -p /etc/php7/conf.d
mkdir -p /etc/php7/cli/conf.d
mkdir /usr/local/php7