Skip to content

Instantly share code, notes, and snippets.

@fgbreel
fgbreel / build-php-zts.sh
Last active July 3, 2022 22:34
Build PHP7 with ZTS on Debian Stretch
#!/usr/bin/env bash
apt-get build-dep php7.0
mkdir ~/php7-amd64 && cd ~/php7-amd64
apt-get source php7.0
cd php7.0-7.0.19
# rename packages to *-zts
@moneytoo
moneytoo / gist:ab3f34e4fddc2110675952f8280f49c5
Last active March 22, 2020 16:05
nginx with OpenSSL 1.0.2 (ALPN) on CentOS 7, also available from https://brouken.com/brouken-centos-7-repo/
### No longer needed as of nginx-1.13.6-1.el7_4.ngx.x86_64.rpm from nginx.org
### it was compiled against OpenSSL 1.0.2 from CentoOS 7.4 so it supports ALPN (HTTP2 works)
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools
OPENSSL="openssl-1.0.2l"
NGINX_VERSION="1.13.5-1"
NJS_VERSION="1.13.5.0.1.13-1"
@bftanase
bftanase / secure_link.php
Last active July 20, 2025 16:26
generate URL for nginx secure_link
@mietek
mietek / set-up-l2tp-ipsec-vpn-on-debian.md
Last active September 30, 2024 18:02
Set up L2TP/IPsec VPN on Debian

Set up L2TP/IPsec VPN on Debian

Set up IPsec

Set up networking

map $http_user_agent $url {
~BPC.[4] /eset_upd/v4/update.ver;
~BPC.[5] /eset_upd/v5/update.ver;
~BPC.[6] /eset_upd/v6/update.ver;
~BPC.[7] /eset_upd/v7/update.ver;
}
server {
server_name site.ru www.site.ru;
@julionc
julionc / 00.howto_install_phantomjs.md
Last active January 5, 2026 04:44
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@iimos
iimos / optimize-images.sh
Last active August 21, 2023 08:50
Script for JPEG images optimization
#! /bin/sh
# Usage 1:
# optimize-images.sh /images/dir
#
# Usage 2:
# cd /images/dir
# optimize-images.sh
EXTENSIONS="jpe?g"