Skip to content

Instantly share code, notes, and snippets.

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
pixeline / php_upgrade_to_71.sh
Last active Jul 30, 2022
Update Mac Os X's php version to php 7.1 using homebrew. Includes curl and mcrypt
View php_upgrade_to_71.sh
# 1. Install brew --> http://brew.sh/
# 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
pixeline / docker-compose.yml
Created Jun 3, 2022 — forked from ju2wheels/docker-compose.yml
docker-compose reference YAML file with comments
View docker-compose.yml
# https://docs.docker.com/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.
#
service_name:
@pixeline
pixeline / mirror_remote_directory_to_local_directory
Last active Jun 2, 2022
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
#!/bin/sh
# @author: Alexandre Plennevaux
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'
# DISTANT DIRECTORY
@pixeline
pixeline / virtualhost_le_template
Last active May 7, 2022
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
pixeline / curl
Last active May 6, 2022
Fetch an external page via Curl. Useful to bypass SAMEORIGIN issues.
View curl
<?php
/*
Fetch a quote from http url for a https site (avoids the insecure network error).
usage: this-script.php?url=http://johndoe.com
*/
/**
* Get a web file (HTML, XHTML, XML, image, etc.) from a URL. Return an
View reactjs.md

JS Frameworks : ReactJS

Il y a le backend, il y a le frontend... Et il y a les frameworks Javascript tels que Angular (made in Google), Vue.js (opensource) et React (Made in Facebook).

A priori, ce sont d'abord des outils pour faire du frontend, mais avec la particularité que vous pouvez manipuler des services de données externes (tels que Firebase ou AWS) directement depuis votre code frontend. Des bâtards, quoi.

Quel est leur intérêt ?

Ils sont particulièrement indiqués pour les applications web et les interfaces très réactives, plus que pour les simples sites vitrines (où l'utilisateur va surtout lire).

@pixeline
pixeline / .gitignore
Last active Apr 2, 2022 — 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
pixeline / create-hosting-user.sh
Created Oct 10, 2019
Create hosting user (Nginx).
View create-hosting-user.sh
#!/bin/bash
# Script automating the creation of a hosting account : the user, its folder, its virtualhost
: '
HOW-TO
$ bash /home/pixeline/bin/create-hosting-user username password domain.tld
Arguments:
- username (if not created, create it, otherwise use current) SEE https://gist.github.com/pixeline/9e5ea7d28e52138f0b31
- user password (for existing user, enter anything, it will not be used)
View script.sh
#!/bin/bash
# script automatisant la création d'un compte hébergé: utilisateur + dossier + virtualhost
# Enter dummy password if you wish to attach domain to an existing user.
: '
HOW-TO
$ bash /home/pixeline/bin/create-hosting-user username password domain.tld
Arguments:
@pixeline
pixeline / create-hosting-user (Apache2)
Last active Mar 23, 2022
Create Hosting User script, for easy Apache web hosting administration.
View create-hosting-user (Apache2)
#!/bin/bash
# script useful to create hosting user accounts for Apache.
# It creates the system user, its home folder and the virtualhost
# Enter a dummy password if you wish to attach domain to an existing user.
: '
USAGE
$ bash /home/pixeline/bin/create-hosting-user username password domain.tld
Arguments: