Skip to content

Instantly share code, notes, and snippets.

View pixeline's full-sized avatar
Heaven, I'm in heaven, And my heart beats so that I can hardly speak !

Alexandre Plennevaux pixeline

Heaven, I'm in heaven, And my heart beats so that I can hardly speak !
View GitHub Profile
pixeline /
Created June 1, 2019 11:52
Deploy a "docker-composed" environment on DigitalOcean

Deploy docker-compose on digitalocean

  1. create Docker droplet via digitalocean one-click-app-docker
  2. log into it
  3. generate SSH key
ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa
  1. Copy it
pixeline / mirror_remote_directory_to_local_directory
Last active September 28, 2023 09:46
Bash script using lftp to mirror remote directory to local directory, thus keeping the local directory synchronized with the remote one.
View mirror_remote_directory_to_local_directory
# @author: Alexandre Plennevaux
pixeline / server-logs-viewer.php
Last active May 1, 2023 18:25
This script presents the latest lines of your LAMP server log files, emulating the tail() function. Layout is nice and responsive. I chose to include inline the CSS and JS to have the ease-of-use of a single, "drop-in", file. If your site is hosted on a Gandi Simplehosting server, it should just work out of the box.
View server-logs-viewer.php
@name Server Logs Viewer
@description Emulates the tail() function. View the latest lines of your LAMP server logs in your browser.
@author Alexandre Plennevaux (
@team Oleg Basov (
@date 16.12.2015
pixeline /
Last active March 16, 2023 16:49
Update Mac Os X's php version to php 7.1 using homebrew. Includes curl and mcrypt
# 1. Install brew -->
# 2. run the following commands in your Terminal
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install --with-openssl curl
brew install --with-homebrew-curl --with-apache php71
brew install php71-mcrypt php71-imagick
# 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the change persist after reboot.
brew info php71
pixeline / Contract Killer
Last active January 2, 2023 18:10 — forked from flopreynat/Contract Killer
Website Design & Development Contract template, heavily modified version of shoogledesigns's French translation of @malarkey's Contract Killer 3.
View Contract Killer

Contrat de création & réalisation de la présence en ligne du projet [Nom du projet]

Date: [4 Septembre 2013], [ville du prestataire], [pays du prestataire]

Entre moi, [Nom du prestataire] et vous [Nom de la société client]


Notre volonté est de toujours donner notre maximum pour répondre à vos besoins et attentes, mais il est important que nous couchions sur papier les modalités de notre relation commerciale afin que chacun de nous partagions le même cadre de référence; qui doit faire quoi et à quel moment, et ce qui se passera si quelque chose ne se passait pas comme prévu. Vous ne trouverez aucun jargon juridique compliqué ou de longs passages de texte incompréhensibles dans ce contrat. Nous n’avons aucune volonté de vous amener à signer quelque chose que vous pourriez regretter par après. Nous souhaitons que le meilleur intérêt des deux parties prévale, dès aujourd’hui et pour la durée de ce contrat.

pixeline / .gitignore
Last active October 25, 2022 01:41 — forked from redoPop/.gitignore
Default Wordpress .gitignore file
View .gitignore
# This is a template .gitignore file for git-managed WordPress projects.
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
# See the comments below for more info on how to add exceptions for your
pixeline / ajax-handler-wp.php
Last active October 5, 2022 13:09
Custom ajax handler for Wordpress. Using admin-ajax.php, as is usually recommended, is very slow and does not allow the use of plugin shortcodes. Using a custom ajax handler like this bypasses that.
View ajax-handler-wp.php
WORDPRESS SPECIFIC AJAX HANDLER (because admin-ajax.php does not render plugin shortcodes).
credits: Raz Ohad
//mimic the actual admin-ajax
define('DOING_AJAX', true);
if (!isset( $_REQUEST['action']))
pixeline / docker-compose.yml
Created June 3, 2022 08:56 — forked from ju2wheels/docker-compose.yml
docker-compose reference YAML file with comments
View docker-compose.yml
# Each service defined in docker-compose.yml must specify exactly one of
# image or build. Other keys are optional, and are analogous to their
# docker run command-line counterparts.
# As with docker run, options specified in the Dockerfile (e.g., CMD,
# EXPOSE, VOLUME, ENV) are respected by default - you don't need to
# specify them again in docker-compose.yml.
pixeline / virtualhost_le_template
Last active May 7, 2022 16:44
virtualhost Template (Nginx)
View virtualhost_le_template
server {
root template.webroot;
server_name template.url;
index index.php index.html index.htm;
# HTTP Caching of static assets
location ~* \.(css|gif|jpg|js|png|ico|otf|sng|xls|doc|exe|jpeg|tgx)$ {
pixeline / curl
Last active May 6, 2022 14:29
Fetch an external page via Curl. Useful to bypass SAMEORIGIN issues.
View curl
Fetch a quote from http url for a https site (avoids the insecure network error).
usage: this-script.php?url=
* Get a web file (HTML, XHTML, XML, image, etc.) from a URL. Return an