This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.robsonkades.platform.authorization.cache; | |
import java.nio.charset.StandardCharsets; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Optional; | |
import java.util.Set; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ConcurrentSkipListSet; | |
import java.util.concurrent.ExecutorService; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AppProps } from 'next/app'; | |
import { RecoilRoot } from 'recoil'; | |
export function withRecoil<T extends AppProps = AppProps>( | |
WrappedComponent: React.ComponentType<T> | |
) { | |
const displayName = | |
WrappedComponent.displayName || WrappedComponent.name || 'Component'; | |
const Component = (props: Omit<T, keyof AppProps>) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.kades.robson.configuration; | |
import static org.apache.commons.collections4.CollectionUtils.emptyIfNull; | |
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; | |
import java.util.Arrays; | |
import javax.annotation.PostConstruct; | |
import javax.inject.Inject; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.kades.robson.configuration; | |
import java.util.HashSet; | |
import java.util.Set; | |
import org.modelmapper.ModelMapper; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import lombok.AccessLevel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ws from '@adonisjs/websocket-client'; | |
import { toast } from 'react-toastify'; | |
import { eventChannel } from 'redux-saga'; | |
import { all, takeLatest, call, take, put, select } from 'redux-saga/effects'; | |
import { history } from '../../../services'; | |
import { | |
subscribeUserRequest, | |
subscribeChatRequest, | |
subscribeChatSuccess, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source address: | |
</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map)$)([^.]+$)/> | |
Target address: | |
/index.html | |
Type: | |
200 (Rewrite) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import firebase from 'firebase'; | |
import produce from 'immer'; | |
import { useEffect, useReducer, useRef, useCallback } from 'react'; | |
type IAction<K, V = void> = V extends void ? { type: K } : { type: K } & V; | |
export type IActionType = | |
| IAction<'LOAD_REQUEST'> | |
| IAction< | |
'LOAD_SUCCESS', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"terminal.integrated.fontSize": 14, | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.tabSize": 2, | |
"editor.fontSize": 18, | |
"editor.lineHeight": 26, | |
"editor.fontFamily": "Fira Code", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const crypto = require('crypto'); | |
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters) | |
const IV_LENGTH = 16; // For AES, this is always 16 | |
function encrypt(text) { | |
let iv = crypto.randomBytes(IV_LENGTH); | |
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv); |