Skip to content

Instantly share code, notes, and snippets.

View floptwo's full-sized avatar

Manu Louisor floptwo

View GitHub Profile
@floptwo
floptwo / howto-vagrant-ssh-to-dir.md
Last active March 6, 2024 17:49
How to vagrant ssh into a directory
@floptwo
floptwo / howto.md
Last active November 27, 2020 21:04
How to add SSL to your local development environment using Ruby on Rails with Puma
@floptwo
floptwo / query.sql
Last active May 12, 2020 02:31
Change MySQL 5.7 Password and Server authentication plugin for root user
SELECT user,authentication_string,plugin,host FROM mysql.user;
UPDATE mysql.user SET plugin = 'mysql_native_password', authentication_string = PASSWORD('mypassword') WHERE User = 'root';
FLUSH PRIVILEGES;
@floptwo
floptwo / form-floating-label.scss
Last active May 14, 2020 04:28
A SCSS (Sass) version of the Bootstrap 4 floating-labels.css from https://getbootstrap.com/docs/4.0/examples/floating-labels/
// A SCSS (Sass) version of the floating-labels.css from https://getbootstrap.com/docs/4.0/examples/floating-labels/
.form-label-group {
margin-bottom: 1rem;
position: relative;
& > input,
& > textarea,
& > label {
padding: #{$input-btn-padding-y} #{$input-btn-padding-x};
@floptwo
floptwo / gist:b2fd1010e6a0d0e97c9f3bea3c74c88b
Last active May 6, 2020 03:55
Let's Encrypt (certbot) add new domain to existing configuration
certbot --nginx --expand -d example.com,www.example.com,blog.example.com
@floptwo
floptwo / Envoy.blade.php
Last active October 2, 2017 20:27
envoy run deploy (no downtime)
@setup
$server = 'myserver';
$repository_path = "~/git/myapp.git";
$application_path = "~/webroot/myapp.com/www";
$env = $env ?? 'production';
$branch = $branch ?? 'master';
$branch = ($env == 'production') ? 'production' : $branch;
$shared_dirs = [
@floptwo
floptwo / composer_ovh.md
Last active October 2, 2018 22:24
Install Composer OVH Mutu
curl -sS https://getcomposer.org/installer | /usr/local/php7.0/bin/php
mkdir bin
mv composer.phar bin/composer
/usr/local/php7.0/bin/php ~/bin/composer
<?php
// Code postaux des villes des Antilles-Guyane
// Sources :
// http://fr.wikipedia.org/wiki/Liste_des_communes_de_la_Guadeloupe
// http://fr.wikipedia.org/wiki/Liste_des_communes_de_la_Guyane
// http://fr.wikipedia.org/wiki/Liste_des_communes_de_la_Martinique
$villes = [
// Guadeloupe
@floptwo
floptwo / php-cli_ovh_mutu.md
Last active April 25, 2023 08:40
OVH PHP-CLI

PHP-CLI (PHP en ligne de commande) sur les hébergements mutualisés OVH

More complete info here http://cluster015.ovh.net/infos/ (thanks to @42antoine)

(cli)

/usr/local/php5.3/bin/php => PHP 5.3.29 (cli) (built: Nov 21 2017 08:55:07)
/usr/local/php5.4/bin/php => PHP 5.4.45 (cli) (built: Nov 21 2017 08:35:51)
/usr/local/php5.5/bin/php => PHP 5.5.38 (cli) (built: Nov 21 2017 08:46:45)