Skip to content

Instantly share code, notes, and snippets.

View Stanislas-Poisson's full-sized avatar
🏠
Working from home

Stanislas Poisson Stanislas-Poisson

🏠
Working from home
View GitHub Profile
@Stanislas-Poisson
Stanislas-Poisson / Common.php
Created December 4, 2023 14:46
ActivityLog (Detach, Sync, SyncWithoutDetaching)
<?php
namespace App\Support;
trait Common
{
/**
* Detach the data
* Used also for log the activity ;).
*
<?php
namespace Database\Seeders\Calls;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class BuyingOrderLinesTableSeeder extends Seeder
{
/**
@Stanislas-Poisson
Stanislas-Poisson / composer.json.md
Last active August 8, 2022 14:04
For Laravel lower of 5.6, add a custom logger

Add those keys to the composer.json to autoload those function

  "autoload": {
    "files": [
      "Support/helpers.php"
    ]
  },
  "autoload-dev": {
 "files": [
@Stanislas-Poisson
Stanislas-Poisson / Récupératio- de-la-liste-des-lycées.md
Created May 7, 2021 08:01
Récupération de la liste des lycées

La liste officiel est disponible sur cette page le site education.gouv.fr

Ouvrir l'inspecteur, se mettre en console et copier-coller le code suivant :

function sleep(milliseconds) {
    var start = new Date().getTime();
    for (var i = 0; i < 1e7; i++) {
        if ((new Date().getTime() - start) > milliseconds) {
            break;

Git commmit rules

The reasons for these conventions:

  • automatic generating of the changelog
  • simple navigation through git history (e.g. ignoring style changes)

Format of the commit message:

<type>(<scope>): <subject>
@Stanislas-Poisson
Stanislas-Poisson / .gitlab-ci.yml
Created November 11, 2020 15:30 — forked from mackensen/.gitlab-ci.yml
Mocked up gitlab config for running selenium in a linked container
# Custom docker image which exposes 8080
image: lafayette/hoth:5.5
services:
- selenium/standalone-chrome:latest
before_script:
# Use 0.0.0.0 instead of localhost to allow external connections
- php -S 0.0.0.0:8080 -t ../ &> /dev/null &
@Stanislas-Poisson
Stanislas-Poisson / prepare-server.sh
Created January 14, 2018 08:33
This script will prepare a web server with Apache, Php7.0, MySQL, NodeJs and let'sencrypt
#!/bin/bash
# title : prepare-server.sh
# description : This script will prepare a web server with Apache, Php7.0, MySQL, NodeJs and let'sencrypt
# author : StanislasP
# date : 2018-01-14
# version : 0.1
# usage : bash prepare-server.sh
# notes : Change the contents of variables to correspond to your configuration.
# Upload this script on your server and make a chmod +x prepare-server.sh.
# Then run the script.
### Keybase proof
I hereby claim:
* I am Stanislas-Poisson on github.
* I am stanislaspoisson (https://keybase.io/stanislaspoisson) on keybase.
* I have a public key whose fingerprint is 2FD6 B145 7295 FE8F 2CC0 B1E6 2D1E 9D72 0EA9 7018
To claim this, I am signing this object: