Skip to content

Instantly share code, notes, and snippets.

View vdelacou's full-sized avatar

Vincent DELACOURT vdelacou

View GitHub Profile
@vdelacou
vdelacou / ApplicationProperties.java
Created June 14, 2018 09:26
Add Auth0 Properties with Management API to JHipster spring boot application
package com.seelix.api.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Properties specific to Seelix.
* <p>
* Properties are configured in the application.yml file. See
* {@link io.github.jhipster.config.JHipsterProperties} for a good example.
*/
@vdelacou
vdelacou / Auth0ApiConfiguration.java
Created June 14, 2018 09:28
Create Configuration file in spring boot for Auth0 API
package com.seelix.api.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.auth0.client.auth.AuthAPI;
import com.auth0.client.mgmt.ManagementAPI;
import com.auth0.exception.Auth0Exception;
import com.auth0.json.auth.TokenHolder;
@vdelacou
vdelacou / UserDTO.java
Created June 14, 2018 09:32
UserDTO adapt for Auth0 User in JHipster
package com.seelix.api.service.dto;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Set;
import java.util.stream.Collectors;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
@vdelacou
vdelacou / Auth0ManagementApiService.java
Last active August 30, 2018 07:14
Auth0ManagementApiService
package com.seelix.api.service;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.commons.lang3.RandomStringUtils;
@vdelacou
vdelacou / tslint.json5
Last active May 15, 2019 04:54
TSLint config file for React or React-native project
{
"extends": [
"tslint:recommended",
"tslint-config-standard",
"tslint-etc",
"tslint-react",
"tslint-react-hooks",
"tslint-config-prettier"
],
"rules": {
@vdelacou
vdelacou / extensions.json5
Last active February 14, 2019 10:15
VsCode recommend extension for React or React-Native Project
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
"ms-vscode.vscode-typescript-tslint-plugin",
"esbenp.prettier-vscode",
"codezombiech.gitignore"
]
}
@vdelacou
vdelacou / settings.json5
Last active February 18, 2019 03:43
VSCode settings for React and React Native Project
// Place your settings in this file to overwrite default and user settings.
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"typescript.format.enable": false,
"javascript.format.enable": false,
"typescript.implementationsCodeLens.enabled": true,
"editor.trimAutoWhitespace": true,
@vdelacou
vdelacou / detail_screen.tsx
Last active January 16, 2019 03:14
React navigation Detail Screen example
import React, { PureComponent } from "react";
import { StyleSheet, Text, View } from "react-native";
import { NavigationScreenProps } from "react-navigation";
/**
* The Details screen
*/
export class DetailScreen extends PureComponent<NavigationScreenProps> {
render() {
return (
@vdelacou
vdelacou / modal_screen.tsx
Last active January 16, 2019 03:14
React navigation Modal Screen example
import React, { PureComponent } from "react";
import { GestureResponderEvent, StyleSheet, Text, View } from "react-native";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import {
NavigationScreenProps,
NavigationStackScreenOptions
} from "react-navigation";
import { ROUTES } from "../../routes";
/**
@vdelacou
vdelacou / home_screen.tsx
Last active January 16, 2019 03:14
React navigation Home Screen example
import React, { PureComponent } from "react";
import { GestureResponderEvent, StyleSheet, Text, View } from "react-native";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import {
NavigationScreenProps,
NavigationStackScreenOptions
} from "react-navigation";
import { ROUTES } from "../../routes";
/**