Skip to content

Instantly share code, notes, and snippets.

package com.wildcodeschool.wildmail;
import java.sql.*;
public class JDBCSingleton {
public static final String DATABASE_URL = "jdbc:mysql://localhost:3306/wild_mail?serverTimezone=Europe/Paris";
public static final String MYSQL_USER = "wildadmin";
public static final String MYSQL_PASSWORD = "w1ld$fun";
@bastienapp
bastienapp / application.properties
Last active July 10, 2023 10:07
Up to date Spring Data JPA application.properties (11-2022)
# ===============================
# = DATA SOURCE
# ===============================
# remove this line from application-dev.properties
spring.profiles.active=dev
# Set here configurations for the database connection
# Connection url for the database "dbname"
spring.datasource.url=jdbc:mysql://localhost:3306/dbname
# Username and password
<script type="text/javascript">
document.getElementById('author').addEventListener("click", () => {
fetch('/test2')
.then(function (response) {
return response.text()
}).then(function (content) {
let result = document.getElementById('result');
// Convert the HTML string into a document object
var parser = new DOMParser();
var html = parser.parseFromString(content, 'text/html');
( find . -type d -name ".git" && find . -name ".idea" && find . -name "node_modules" ) | xargs rm -rf
@bastienapp
bastienapp / cloudSettings
Last active August 11, 2020 08:44
Visual Studio Code
{"lastUpload":"2020-08-11T08:44:06.077Z","extensionVersion":"v3.4.3"}

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 / 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,
@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:
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 */;
{
"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,