Skip to content

Instantly share code, notes, and snippets.

View kosciolek's full-sized avatar

kosciolek

  • Poland - Małopolskie
View GitHub Profile
import React, { FC } from "react";
import dynamic from "next/dynamic";
import config from "../cms/config";
import { useEffect, useState } from "react";
import { Map } from "immutable";
const wrapInClass = (Component: FC) =>
class WrapperClass extends React.Component {
render() {
return <Component {...this.props} />;
import {css} from "styled-components";
export function variant<R extends { variant?: keyof T },
T extends {
[variantName: string]: ReturnType<typeof css>;
}>(variantMap: T) {
return function ({variant: variantProp}: R) {
return variantMap[variantProp];
};
}
import Document, { Html, Head, Main, NextScript } from "next/document";
import { ServerStyleSheet } from "styled-components";
class MyDocument extends Document {
static async getInitialProps(ctx) {
const sheet = new ServerStyleSheet();
const originalRenderPage = ctx.renderPage;
ctx.renderPage = () =>
originalRenderPage({
{
"title": "JSON schema for the TypeScript compiler's configuration file",
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"filesDefinition": {
"properties": {
"files": {
"description": "If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included.",
"type": "array",
@kosciolek
kosciolek / .gitignore
Created February 15, 2019 13:44
.gitignore for Unity projects
/hex/[Ll]ibrary/
/hex/[Tt]emp/
/hex/[Oo]bj/
/hex/[Bb]uild/
/hex/[Bb]uilds/
/hex/[Ll]ogs/
/hex/[Aa]ssets/AssetStoreTools*
![Aa]ssets/**/*.meta