Skip to content

Instantly share code, notes, and snippets.

@bastienapp
bastienapp / wsl-mongodb.sh
Created January 24, 2021 15:51
WSL MongoDB Script
#!/bin/bash
sudo mkdir -p /data/db
sudo chown -R `id -un` /data/db
mongod > /dev/null &
@bastienapp
bastienapp / wsl-mysql.sh
Created January 24, 2021 15:51
WSL MySQL Script
#!/bin/bash
sudo mkdir -p /var/run/mysqld
sudo chown mysql:mysql /var/run/mysqld
sudo service mysql restart
require("dotenv").config();
const mysql = require("mysql");
const config = {
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
timezone: 'Europe/Paris'
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.eol": "\n",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"prettier.jsxSingleQuote": true,
"prettier.singleQuote": true,
CREATE DATABASE IF NOT EXISTS `movies` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `movies`;
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: movies
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@bastienapp
bastienapp / react-app-eslint-prettier.md
Last active July 31, 2022 15:59
Create an new React project with EsLint & Prettier

1 - Install ESLint

  1. In Visual Studio Code go to View -> Extensions
  2. Search for eslint: EsLint
  3. Click Install
  4. Open your terminal and install the following packages:

npm install eslint --save-dev

  1. Initialize ESLint coriguration:
@bastienapp
bastienapp / fire_emblem-en.md
Last active October 6, 2020 12:38
Fire Emblem Heroes

Fire Emblem Heroes

Part 1 : Hero

The Hero class allows you to create objects on this model :

{
    name: string,
    power: number,

Before this kata begins, you need to:

  • Install Visual Studio Code
  • Install the plugin Live Share
  • Log to Live Share with your GitHub account
  • Open the shared project supplied by your trainer

Hello World

  • Create an empty file index.html
@bastienapp
bastienapp / cloudSettings
Last active August 11, 2020 08:44
Visual Studio Code
{"lastUpload":"2020-08-11T08:44:06.077Z","extensionVersion":"v3.4.3"}
( find . -type d -name ".git" && find . -name ".idea" && find . -name "node_modules" ) | xargs rm -rf