Skip to content

Instantly share code, notes, and snippets.

View bilalatli's full-sized avatar

Bilal ATLI bilalatli

View GitHub Profile
@bilalatli
bilalatli / build-nginx.sh
Created December 20, 2019 06:50 — forked from risyasin/build-nginx.sh
Ubuntu 18 Nginx compile with ModSecurity + ModPageSpeed + Headers + Cache purge with Threads support
#!/usr/bin/env bash
set -e
# http://nginx.org/download/nginx-1.16.0.tar.gz
SRC_ROOT=/usr/src
NSRC_ROOT=/usr/src/nginx
NPS_VERSION=1.13.35.2
NGINX_VERSION=1.16.0
@bilalatli
bilalatli / build-php.sh
Last active February 16, 2020 20:58 — forked from risyasin/build-php.sh
Ubuntu 18 PHP compile Pear + DB4 + Argon for AWS "A" instances
#!/bin/bash
### Builds PHP from source on Ubuntu 18
set -e
echo "Prepairing build tools"
DEBIAN_FRONTEND=noninteractive apt update -y && apt install -y build-essential \
bison autoconf bison re2c pkg-config libsystemd-dev libxml2-dev \
libssl-dev libsqlite3-dev libcurl4-openssl-dev libcurl4 \
unzip libenchant-dev libffi-dev libpng-dev libgmp-dev libonig-dev \
libpq-dev libedit-dev librecode-dev libargon2-0-dev libzip-dev
@bilalatli
bilalatli / etc-profile
Created July 14, 2019 13:40 — forked from kaanklky/etc-profile
Save terminal sessions
#Record terminal sessions
if [ "x$SESSION_RECORD" = "x" ]
then
TTY_CON=$(tty | cut -d '/' -f3)/$(tty | cut -d '/' -f4)
TTY_IP=$(who | grep "${TTY_CON}" | cut -d ' ' -f16 | tr -d '()')
output=/var/log/session/session_$(date +%F_%H-%M-%S)_$USER.$TTY_IP
SESSION_RECORD=started
export SESSION_RECORD
script -t -f -q 2>${output}.timing $output