Skip to content

Instantly share code, notes, and snippets.

View nuxwin's full-sized avatar
🏠
Working from home

Laurent Declercq nuxwin

🏠
Working from home
View GitHub Profile
@nuxwin
nuxwin / README.md
Last active September 16, 2019 03:50
Documentation for the next PhpSwitcher plugin version (5.0.0) - Review needed.

i-MSCP PhpSwitcher plugin v5.0.0

Provides additional PHP versions for customers.

Requirements

  • One of the supported distributions
  • i-MSCP Serie ≥ 1.5.3
  • The Fcgid or the FPM i-MSCP httpd server implementation
@nuxwin
nuxwin / SamplePlugin.php
Last active June 19, 2019 11:13
i-MSCP SamplePlugin entry point class
<?php
/**
* i-MSCP SamplePlugin plugin
*
* @author Laurent Declercq <l.declercq@nuxwin.com>
* @copyright (C) 2019 Laurent Declercq <l.declercq@nuxwin.com>
* @license i-MSCP License <https://www.i-mscp.net/license-agreement.html>
*/
/** @noinspection PhpUnhandledExceptionInspection PhpDocMissingThrowsInspection */
@nuxwin
nuxwin / changelog
Last active January 24, 2019 06:11
i-MSCP (next version) CHANGELOG - Lot of enhancement, fixes... (finalization stage...)
i-MSCP ChangeLog
------------------------------------------------------------------------------------------------------------------------
Git 1.5.x
------------------------------------------------------------------------------------------------------------------------
BACKEND
Added: Support for PHP 7.2 , 7.3
Enhancement: Make it possible to change backup time for the control panel (control panel backup cron task)
Enhancement: Make it possible to enable/disable the CGI and PHP features on a per site basis
@nuxwin
nuxwin / config.php
Last active November 24, 2018 19:08
SpamAssassin - Make possible to add plugin configuration definitions
<?php
/**
* i-MSCP SpamAssassin plugin
* Copyright (C) 2015-2018 Laurent Declercq <l.declercq@nuxwin.com>
* Copyright (C) 2013-2016 Rene Schuster <mail@reneschuster.de>
* Copyright (C) 2013-2018 Sascha Bay <info@space2place.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
@nuxwin
nuxwin / howto_build_php_builtin_ext_without_full_php_dist.md
Last active November 21, 2018 11:09
Howto build a PHP builtin extension without having to rebuild full PHP distribution

Howto build a PHP builtin extension without having to rebuild full PHP distribution

Sometime, we need to dig into PHP extension code to make some adjustements. For instance that is currently our case with the PHP openssl extension as provided by older PHP versions (5.3, 5.4, 5.5) which is not compatible with openssl >= 1.1... We need patch the code to add openssl 1.1 support...

To do so, it would be tedious for us to have to recompile full PHP distribution each time we want try a build of the openssl extension with our changes. A build of the openssl extension take ~3 seconds while a build of the full PHP distribution

=pod
Here is a list of CPAN distributions which B<may> have external Makefiles.
I have not built or used any of these, so your mileage may vary.
=cut
my %distros = {
"$CPAN/authors/id/A/AG/AGENT/Lemplate-0.15.tar.gz" => { "doc/Makefile" => 1, "src/Makefile" => 1 },
@nuxwin
nuxwin / README.md
Last active May 27, 2018 06:28
i-MSCP Let's Encrypt plugin

i-MSCP LetsEncrypt plugin v3.4.0

Introduction

Provides free SSL certificates through the Let's Encrypt CA.

Requirements

  • i-MSCP Serie 1.4.x, 1.5.x
@nuxwin
nuxwin / Application\Service\MemcachedStorageFactory.php
Created April 23, 2018 22:46 — forked from dkemper/Application\Service\MemcachedStorageFactory.php
Zend Framework 2 - Session Memcached Configuration with Failover
<?php
namespace Application\Service;
use Zend\Cache\Storage\Adapter\MemcachedOptions;
use Zend\Cache\Storage\Adapter\MemcachedResourceManager;
use Zend\Cache\StorageFactory;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Session\SaveHandler\Cache;
@nuxwin
nuxwin / gnome-tracker-disable.md
Created April 5, 2018 14:32 — forked from vancluever/gnome-tracker-disable.md
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

#!/usr/bin/perl
# Make it possible to test the i-MSCP iMSCP::Listener::Postfix::Rspamd listener
# file by triggering the afterMtaBuildConf event manually.
#
# How to process:
# - Install the listener file that you can find at https://gist.github.com/nuxwin/3a855ecbaae7d2482b68126e8206c534
# under the /etc/imscp/listeners.d directory, e.g: /etc/imscp/listeners.d/10_postfix_rspamd.pl
# - Download that script under the /usr/local/src directory with name imscp_test_rspamd_listener.pl
# - Run the script as follows: perl /usr/local/src/imscp_test_rspamd_listener.pl