Skip to content

Instantly share code, notes, and snippets.

@sketchbuch
sketchbuch / renderShallowWithRedux.tsx
Last active January 24, 2020 07:05
TESTING - Shallow render with Redux and genric Typescript
import * as React from 'react'
import configureMockStore from 'redux-mock-store'
import { Provider } from 'react-redux'
import { shallow, ShallowWrapper } from 'enzyme'
export type StringObject = { [key: string]: string }
export type StoreData = { [key: string]: string | StringObject }
export interface RenderShallowWithReduxOptions<T> {
children?: React.ReactNode
@sketchbuch
sketchbuch / renderShallow.tsx
Last active January 24, 2020 07:05
TESTING - Shallow renderer with generic Typescript
import * as React from 'react'
import configureMockStore from 'redux-mock-store'
import { Provider } from 'react-redux'
import { shallow, ShallowWrapper } from 'enzyme'
export type StringObject = { [key: string]: string }
export type StoreData = { [key: string]: string | StringObject }
export interface RenderShallowWithReduxOptions<T> {
children?: React.ReactNode
@sketchbuch
sketchbuch / typescript-http-status-codes.ts
Last active April 27, 2021 08:32
TS - Typescript HTTP Status Code Enums and Types
export enum HttpStatusCodes100 {
CONTINUE = 100,
SWITCHING_PROTOCOLS = 101,
PROCESSING = 102,
EARLY_HINTS = 103,
}
export enum HttpStatusCodes200 {
OK = 200,
CREATED = 201,
@sketchbuch
sketchbuch / gist:92e8d607d2b3a1563880
Created December 26, 2015 23:00
NEOS - Neos CMS vhost
NameVirtualHost *:80
<VirtualHost *:80>
ServerName neos.t3local
SetEnv FLOW_CONTEXT Development
ServerAlias www.neos.t3local
DocumentRoot /var/www/neos/Neos-2.1/Web
<Directory ~ "/var/www/neos/Neos-2.1/">