Skip to content

Instantly share code, notes, and snippets.

View Remiii's full-sized avatar
👨‍💻
remibarbe.fr

Rémi Barbe Remiii

👨‍💻
remibarbe.fr
View GitHub Profile
@Remiii
Remiii / README.md
Last active March 6, 2024 19:52
How to delete Vault (AWS Glacier) 🗻

How to delete Vault (AWS Glacier)

This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).

Step 1 / Retrive inventory

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
@Remiii
Remiii / README.md
Created October 17, 2017 08:43
VPN (OpenVPN) server and clients setup 🚂🚇😀

VPN (OpenVPN) server and clients setup 🚂🚇😀

This gist give all the steps in order to build a VPN (OpenVPN) network with server and clients (automatic generation for clients certificates). 😀

  1. Server configuration
  2. Clients configuration
  3. Security
  4. Generate automatic certificates for clients

Server configuration

@Remiii
Remiii / README.md
Last active February 26, 2021 08:36
Doctrine (Symfony) DB mapping - Relation Mapping

Doctrine (Symfony) DB mapping

OneToOne (1=>1)

Sample: Category and Product

// src/Acme/StoreBundle/Entity/Category.php

// ...
@Remiii
Remiii / finding.md
Created January 10, 2014 18:00
Finding... Finding all files containing a text string in linux...

Finding

$ grep -rnw 'directory' -e "pattern"

-r is recursive, -n is line number and -w stands match the whole word. Along with these, --exclude or --include parameter could be used for efficient searching. Something like below:

$ grep --include={*.c,*.h} -rnw 'directory' -e "pattern"

This will only search through the files which have .c or .h extensions. Similarly a sample use of --exclude:

@Remiii
Remiii / .htaccess
Created August 22, 2015 09:40
Symfony 2 redirect www to non-www with Apache .htaccess
# Use the front controller as index file. It serves as a fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# start page (path "/") because otherwise Apache will apply the rewriting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex app.php
# Disabling MultiViews prevents unwanted negotiation, e.g. "/app" should not resolve
# to the front controller "/app.php" but be rewritten to "/app.php/app".
<IfModule mod_negotiation.c>
@Remiii
Remiii / README.md
Created June 13, 2019 13:20
List of countries - Alphabetical list of countries 🏳️

Afghanistan Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina

@Remiii
Remiii / README.md
Created February 26, 2019 12:57
Force your site to load securely with an .htaccess file

Force your site to load securely with an .htaccess file

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
@Remiii
Remiii / README.md
Last active February 17, 2019 09:31
AWS RDS password expired 👹

AWS RDS password expired

If you use MySQL and especially AWS Relational Database Service (RDS) you have certainly a bomb in your App without any consciousness of this!

Since MySQL 5.7.4 a nice password expiring feature was introduced with 360 days default value. But this feature was enabled by default since 5.7.10. If you use AWS RDS you have set up your DB with the fancy setup pages with no warning or information about the ephemeral duration of your password. So if your database on AWS RDS is setup from 359 days go to your AWS console page and update your password quickly.

Mark : your root login is also set during the setup of your database…

Useful link :

@Remiii
Remiii / README.md
Created January 23, 2019 17:05
Install Python, Python3 and PIP on Mac OSX

Install Python

  • Install Xcode
  • Install Homebrew (i.e. https://brew.sh)
  • brew update & brew upgrade
  • brew install python3
  • brew postinstall python3
@Remiii
Remiii / README.md
Last active November 13, 2018 14:20
Activation de la notification par email des messages reçu sur la boîte vocale Sosh / Orange ☎️🔌✉️