This file contains 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 { AsyncContainerModule, Container as ContainerImpl, ContainerModule } from 'inversify'; | |
import { Provider as IocProvider } from 'inversify-react'; | |
import _ from 'lodash'; | |
import { PropsWithChildren, useEffect, useState } from 'react'; | |
const context = require.context('src', true, /\.config\.ts$|\.config\.tsx$|\.saga\.ts|\.events\.ts$/, 'lazy-once'); | |
const keys = context.keys(); | |
const getApplicationContext = _.once(async () => { | |
const container = new ContainerImpl({ defaultScope: 'Request' }); |
This file contains 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.teletapper.actuator; | |
import com.teletapper.util.SecurityUtils; | |
import lombok.Data; | |
import lombok.Setter; | |
import lombok.extern.slf4j.Slf4j; | |
import lombok.val; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; | |
import org.springframework.boot.actuate.endpoint.jmx.annotation.JmxEndpoint; |
This file contains 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 { Channel, NotUndefined } from '@redux-saga/types'; | |
import { Buffer, channel, EventChannel, Saga } from 'redux-saga'; | |
import * as effects from 'redux-saga/effects'; | |
import _ from 'lodash'; | |
import { cast, isInteger } from 'src/util/invariant'; | |
export type THandleRequest<T extends NotUndefined> = Saga<[Channel<T>]>; | |
export type TCreatePipe<T extends NotUndefined> = Saga<[EventChannel<T>, Saga<[Channel<T>]>]>; | |
export interface CreatePipeOptions { |
This file contains 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 _ from 'lodash'; | |
export namespace uuidUtil { | |
const regexExp = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi; | |
export function isValidUuid(s: string) { | |
if (!_.isString(s)) { | |
return false; | |
} | |
if (_.isEmpty(s)) { |
This file contains 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
const { exec, getCurrentUrl } = require('preact-router'); | |
export namespace urlUtil { | |
export const getUrlParameter = (name: string, location: Pick<Location, 'pathname' | 'search'>): string | null => { | |
if (typeof window === 'undefined') { | |
return null; // shim | |
} | |
const a = 'http://localhost' /* <-- dummy string for parsing */ + location.pathname + location.search; | |
const url = new URL(a); | |
return url.searchParams.has(name) ? url.searchParams.get(name) : null; |
This file contains 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 org.aopalliance.intercept.MethodInterceptor; | |
import org.aopalliance.intercept.MethodInvocation; | |
import org.springframework.aop.framework.ProxyFactory; | |
import org.springframework.lang.NonNull; | |
import org.springframework.lang.Nullable; | |
import org.springframework.web.socket.WebSocketSession; | |
import org.springframework.web.socket.handler.WebSocketSessionDecorator; | |
import java.util.Map; | |
import java.util.Objects; |
This file contains 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
// @ts-nocheck | |
// ¯\_(ツ)_/¯ | |
import { ComponentChildren, ComponentType, Context, h, toChildArray } from 'preact'; | |
function getChildren(node) { | |
return ((node || {}).props || {}).children; | |
} | |
function getComponentType(node) { | |
return (node || {}).type; |
This file contains 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 { Component, ReactNode } from 'react'; | |
interface Props { | |
loading: ReactNode; | |
ready: PromiseLike<any>; | |
beforeMount?: () => any; | |
afterLift?: () => any; | |
} | |
interface State { |
This file contains 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 { CSSProperties, PropsWithChildren } from 'react'; | |
import * as colors from 'tailwindcss/colors'; | |
export interface ContentProps { | |
header?: string; | |
message?: string; | |
} | |
export enum Variant { | |
SPINNING, |
This file contains 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 { validate } from 'validate.js'; | |
import _ from 'lodash'; | |
interface AnyObject { | |
[key: string]: any; | |
} | |
type ValidationErrors = AnyObject | undefined; | |
export interface ApiError { |
NewerOlder