Skip to content

Instantly share code, notes, and snippets.

View JoseLion's full-sized avatar
🦁
Eat, Sleep, Code, Workout, Repeat.

Jose Luis Leon JoseLion

🦁
Eat, Sleep, Code, Workout, Repeat.
View GitHub Profile
@JoseLion
JoseLion / build.gradle
Created March 23, 2024 04:20
Spring Boot | WebFlux + WebSocket
dependencies {
implementation(libs.spring.webflux)
implementation(libs.spring.websocket) {
exclude(group: 'org.springframework.boot', module: 'spring-boot-starter-web')
}
}
@JoseLion
JoseLion / .eslintignore
Last active December 22, 2023 20:28
Strict ESLint with TypeScript configuration
# Dependencies
.yarn/
node_modules/
# Auto-generated
build/
dist/
@JoseLion
JoseLion / asyncStorageMock.ts
Created March 31, 2020 15:06
Basic mock for "@react-native-community/async-storage-backend-legacy"
import { EmptyStorageModel, IStorageBackend, StorageOptions } from "@react-native-community/async-storage";
export default class MockAsyncStorage<T = EmptyStorageModel> implements IStorageBackend<T> {
private MOCK_STORAGE: T = {} as T;
public async getSingle<K extends keyof T>(key: K, opts?: StorageOptions): Promise<T[K] | null> {
const obj = await this.getMany<K>([key], opts);
return obj[key] ?? null;
}