Skip to content

Instantly share code, notes, and snippets.

View wijourdil's full-sized avatar
🦊

Wilfried Jourdil wijourdil

🦊
View GitHub Profile
@wijourdil
wijourdil / app.php
Created January 7, 2022 18:22
Handle multiple `.env.*` files for Lumen (written for Lumen 8)
<?php
require_once __DIR__ . '/../vendor/autoload.php';
// COPY-PASTE THE FOLLOWING PART INTO YOUR bootstrap/app.php FILE
/*
|--------------------------------------------------------------------------
| Load Custom .env.* files
|--------------------------------------------------------------------------
@wijourdil
wijourdil / test_mail.php
Last active January 12, 2024 11:11
Send a test mail / notification in Laravel from Tinker
<?php
/**
* Mail
*/
Mail::raw('hello world', function($message) { $message->to('myawesomeemail@domain.com')->subject('Testing mails'); });
/**
* Notification
*/

adb and fastboot must know

Install android SDK (bottom of the page) or full android studio if you need to develop on android.

fastboot looks like adb but it is used when device is in bootloader (or fastboot).

Check connected devices

adb:

@wijourdil
wijourdil / Makefile
Last active January 28, 2021 18:35
Makefile
#!Make
include .env
export $(shell sed 's/=.*//' .env)
# Install database
install_db:
echo 'CREATE DATABASE IF NOT EXISTS `$(DB_DATABASE)`' | mysql -u$(DB_USERNAME) -p$(DB_PASSWORD) -h$(DB_HOST)
make fresh
@wijourdil
wijourdil / .bash_profile
Created September 1, 2020 13:38
Command alias to search by name and checkout on another existing branch
function b() {
# Couleurs
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
magenta=`tput setaf 5`
blue=`tput setaf 6`
reset=`tput sgr0`
branch_to_use=''