Skip to content

Instantly share code, notes, and snippets.

@arx76
arx76 / install_php55_ubuntu.sh
Created October 14, 2017 17:41 — forked from jniltinho/ install_php55_ubuntu.sh
Install PHP 5.5.38 on Ubuntu 16.04 64Bits
#!/bin/bash
### Install PHP 5.5.38 on Ubuntu 16.04 64Bits
### https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/
apt-get -y install build-essential libxml2-dev libxslt1-dev
apt-get -y install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libxml2-dev
apt-get -y install libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev
apt-get -y install libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev
apt-get -y install libfreetype6-dev libkrb5-dev libpq-dev libicu-dev
@arx76
arx76 / install-phpmyadmin-ispconfig.sh
Created October 14, 2017 17:41 — forked from jniltinho/install-phpmyadmin-ispconfig.sh
Install phpMyAdmin on ISPConfig
#!/bin/bash
## Install phpMyAdmin on ISPConfig
## Debian 8.7/9 or Ubuntu 16.04
## phpMyAdmin 4.7.4
cd /tmp/
get_file=https://files.phpmyadmin.net/phpMyAdmin/4.7.4/phpMyAdmin-4.7.4-all-languages.tar.gz
wget ${get_file}
tar -xzvf $(basename ${get_file})
rm -f $(basename ${get_file}) && mv phpMyAdmin-*-all-languages myadmin
@arx76
arx76 / django_index_html
Created October 14, 2017 17:40 — forked from jniltinho/django_index_html
django_index_html
<!DOCTYPE html>
<html>
<head>
<title>Django Project</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAACSVBMVEURMijx8/L///+ImZTV29mPn5ri5uWXpqFSamNccms7Vk4gPzU9WFBacWp0h4GElZCJmpWeq6eZp6OQn5t+kItofXZJYlslQzoePTRXbme7xMHs7+7m6eiyvLn5+vorSUAvTEMqSD91iIK/yMUTNCpTa2S2wL39/f0VNStrf3nc4eBVbWba392uubbp7OuAkowUNCuhrqqrt7Ojr6z+/v4nRTzr7u2zvrtYb2jc4N/4+fiKm5Zhd3FEXlYwTUQtSkExTUVFX1dgdnC+x8TK0c9kenMcPDIYOC/z9fTf5OJWbWaWpKASMykhQDb6+/uqtrLd4uEaOjBOZl/j5+YsSUBZcGmHl5Kms69sgXvHz8w/WVHg5OMdPDPu8fD09fX29/fn6un7/Pzo6+rY3dy5w8CImJObqaXN1NF8jolQaWGTop33+PcoRj3S2NeyvbqYp6JPZ2Dq7eyFlpHL0tBDXVb4+fnBysfJ0M5bcmtNZV5LZFxme3WaqKT8/fwWNiwzT0aVo58iQDfh5eRKY1t/kYt6jYd6jIZtgntnfHaWpaFwhH7Z3tyvurYyTkbv8fG4wr9QaGDk6OcfPjWfrKjb4N5jeXI5VUzGzszM09Hw8vLCy8iksa1pfnfAycens7AuS0J5i4ZIYVo2UkoZOTBfdm80UEeRoJzDzMkjQTicqqZBW1M8V0+Lm5YpRz7FzctedG28xcK3wb41UUmMnJd4ioXt8O+9xsOCk45ieHE4VEuksKySoZzy9PPQ19U6VU0XNy1sgHp2iYM0UUj
@arx76
arx76 / create_django_skeleton.sh
Created October 14, 2017 17:40 — forked from jniltinho/create_django_skeleton.sh
Create Django Skeleton
#!/bin/bash
### Create Django Skeleton APP on Debian|Ubuntu
## First install:
## apt-get -y install python-django
## Default folder
mkdir /var/www
cd /var/www
@arx76
arx76 / create_app_django.sh
Created October 14, 2017 17:39 — forked from jniltinho/create_app_django.sh
Create App Django
#!/bin/bash
### Create Django Skeleton APP on Debian|Ubuntu
## First install:
## apt-get -y install python-django
## Usando uWSGI na app Django
## apt-get -y install python-dev python-pip
## pip install uwsgi
## chown -R www-data:www-data /var/www/projeto
@arx76
arx76 / install_jboss.sh
Created October 14, 2017 17:39 — forked from jniltinho/install_jboss.sh
Install Jboss 7 + JRE 8 on Debian
#!/bin/bash
### Install Jboss 7 + JRE8 on Debian 64Bits
### Link: http://alexander.holbreich.org/jboss-7-setup-linux/
## First install wget
## Primeiro instale o wget
# Check if user has root privileges
if [[ $EUID -ne 0 ]]; then
@arx76
arx76 / compile_hhvm.sh
Created October 14, 2017 17:39 — forked from jniltinho/compile_hhvm.sh
Compile HHVM on Debian 9.1 64Bits
#!/bin/bash
## Compile HHVM on Debian 9.1 64Bits
## https://docs.hhvm.com/hhvm/installation/building-from-source#debian-8-jessie
## Run as root (sudo su)
apt-get update && apt-get upgrade
apt-get install git-core cmake gawk default-libmysqlclient-dev \
@arx76
arx76 / install_pagespeed_nginx.sh
Created October 14, 2017 17:38 — forked from jniltinho/install_pagespeed_nginx.sh
How to Install Nginx and Google PageSpeed on Debian/Ubuntu
#!/bin/bash
## Install PageSpeed on Debian 8/9 and Ubuntu 16.04 64Bits
## https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-16-04/
## http://nginx.org/en/linux_packages.html
## https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
## https://developers.google.com/speed/pagespeed/module/
## Debian ISO: https://cdimage.debian.org/cdimage/archive/8.9.0/amd64/iso-cd/
## No Link abaixo tem o pacote do Nginx para o Debian 8 64Bits
## https://github.com/jniltinho/ispconfig/tree/master/packages/debian/jessie
## Run as root (sudo su)
@arx76
arx76 / 00README.md
Created September 27, 2017 20:19 — forked from mwpastore/00README.md
Lightning Fast WordPress: Caddy+Varnish+PHP-FPM

README

This gist assumes you are migrating an existing site for www.example.com — ideally WordPress — to a new server — ideally Ubuntu Server 16.04 LTS — and wish to enable HTTP/2 (backwards compatibile with HTTP/1.1) with always-on HTTPS, caching, compression, and more. Although these instructions are geared towards WordPress, they should be trivially extensible to other PHP frameworks, other FastCGI backends, and even non-FastCGI backends (using proxy in lieu of fastcgi in the terminal Caddyfile stanza).

Quickstart: Use your own naked and canonical domain names instead of example.com and www.example.com and customize the Caddyfile and VCL provided in this gist to your preferences!

These instructions target Varnish Cache 4.1, PHP-FPM 7.0, and Caddy 0.10. (I'm using MariaDB 10.1 as well, but that's not relevant to this guide.)

@arx76
arx76 / nginx-tuning.md
Created September 25, 2017 17:42 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.