Skip to content

Instantly share code, notes, and snippets.

View duboiss's full-sized avatar
🌐
Just saving the world

Steven DUBOIS duboiss

🌐
Just saving the world
View GitHub Profile
ansible-galaxy install geerlingguy.mysql -p roles
---
- hosts: all
become: true
vars:
timezone: Europe/Paris
created_username: server
ssh_port: 49999
mysql_port: 50123
txadmin_port: 48888

Update packages

sudo apt update && sudo apt upgrade -y

Update to latest Ubuntu version

sudo nano /etc/update-manager/release-upgrades

Change lts to normal.

@duboiss
duboiss / install.sh
Last active June 19, 2024 20:26
WSL auto install
#!/bin/bash
updatePackages () {
echo "Updating packages"
sudo add-apt-repository ppa:parkmino/nano -y
sudo add-apt-repository ppa:git-core/ppa -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
@duboiss
duboiss / Profile.ps1
Created March 11, 2021 11:51
WSL2 map port to host
```ps
function mapport {
Param(
[parameter(Mandatory=$true)][int]$windowsPort,
[parameter(Mandatory=$true)][int]$wslPort
)
$ip = wsl hostname -I
netsh interface portproxy add v4tov4 listenport=$windowsPort listenaddress=0.0.0.0 connectport=$wslPort connectaddress=$ip
}
@duboiss
duboiss / instructions.md
Created March 5, 2021 10:24
Webpack Encore / Add fetch polyfill for IE11
yarn add whatwg-fetch

// In first entry
.addEntry('app', ['whatwg-fetch', './assets/app.js'])
@duboiss
duboiss / DateExtension.php
Created November 2, 2020 16:51
Twig DateInterval format filter
<?php
declare(strict_types=1);
namespace App\Twig;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
class DateExtension extends AbstractExtension
@duboiss
duboiss / ZSH.md
Last active February 16, 2022 13:59

.zshrc

cd $ZSH_CUSTOM/plugins &&
git clone https://github.com/djui/alias-tips.git &&
git clone https://github.com/zsh-users/zsh-autosuggestions &&
git clone https://github.com/zsh-users/zsh-syntax-highlighting &&
cd -
@duboiss
duboiss / WSL2.md
Last active March 12, 2021 14:17
A clean install with WSL2 / Ubuntu 20.10 for developers : PHP / Node.js / Rust / Others
@duboiss
duboiss / liste.md
Last active April 21, 2021 17:52
PHP Opérateurs de comparaison