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 / gist:11358420
Created April 27, 2014 23:56
OcraServiceManager Unit Test result
imscp@imscp2:~/test/OcraServiceManager$ ./vendor/bin/phpunit
PHPUnit 3.7.35-12-ga702318 by Sebastian Bergmann.
Configuration read from /home/imscp/test/OcraServiceManager/phpunit.xml.dist
..............................................
Time: 479 ms, Memory: 18.25Mb
OK (46 tests, 188 assertions)
@nuxwin
nuxwin / gist:11358487
Created April 27, 2014 23:59
composer.json
{
"name": "imscp/imscp2",
"description": "i-MSCP - internet Multi Server Control Panel v2.0.0",
"license": "BSD-3-Clause",
"keywords": [
"panel",
"hosting",
"linux",
"zf2"
],
@nuxwin
nuxwin / gist:11358505
Created April 28, 2014 00:00
composer.lock
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
"hash": "28f480a7bac2f2388cf0f01427453707",
"packages": [
{
"name": "doctrine/annotations",
"version": "v1.1.2",
# application.config.php
<?php
return array(
// This should be an array of module namespaces used in the application.
'modules' => array(
'ZendDeveloperTools',
'OcraServiceManager',
'Application',
'DoctrineModule',
'DoctrineORMModule'
In your Module.php file, add the following
public function getServiceConfig()
{
return array(
'factories' => array(
'article_mapper' => function ($sm) {
return new \Article\Modele\ArticleTable(
$sm->get('Doctrine\ORM\EntityManager')
);
vendor
composer.lock
upstream foo_app {
server 127.0.0.1:3000;
}
server {
listen 80;
# listen [::]:80 default_server ipv6only=on;
root /home/user/foo/foo_web/public;
#!/usr/bin/env php
<?php
/*
Copyright 2013 Stuart Carnie and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
@nuxwin
nuxwin / README.md
Created April 12, 2016 22:51 — forked from renchap/README.md
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
# i-MSCP Listener::Named::NotifySecondary listener file
# Copyright (C) 2016 Marc Pujol <kilburn@la3.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of