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
/** Action identifiers. */ | |
export const WEBHOOKS_EVENTS = [ | |
"user.created", | |
"user.updated", | |
// ... | |
] as const; | |
/** Action types. */ | |
export type WebhookEvent = typeof WEBHOOKS_EVENTS[number]; |
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 { clsx } from "clsx" | |
export function UserFieldset({ disabled, className, ...props } : React.ComponentProps<fieldset>) { | |
// fieldset has built-in disabled management for inputs and buttons inside of it. | |
return ( | |
<fieldset className={clsx("grid grid-cols-1 gap-4", className)} disabled={disabled} {...props}> | |
<div className="col-span-1"> | |
<label htmlFor="name">Name</label/> | |
<input id="name" name="name" className={clsx("input input-4 sm:input-3 input-blue", "w-full mt-1")} /> | |
</div> |
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
{ | |
"recommendations": [ | |
"rome.rome", | |
] | |
} |
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
ALTER TABLE "public"."usage_stats" | |
ALTER COLUMN "resSize" TYPE INT USING CASE WHEN "resSize" ~ '^[-+0-9]+$' THEN "resSize"::integer ELSE NULL END; |
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 React, { useReducer, useContext, Dispatch } from "react"; | |
import "./styles.css"; | |
// Local types, example: box, product, venue, etc | |
type MyItem = { | |
id: number; | |
name: string; | |
}; | |
// Reducer types |
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
## | |
# First stage: prepare image | |
FROM node:12-alpine AS base | |
ARG NPM_TOKEN | |
ARG WORKDIR=/usr/src/app | |
WORKDIR ${WORKDIR} | |
# Install container build dependencies | |
RUN apk --no-cache add g++ ca-certificates lz4-dev musl-dev openssl-dev \ | |
make python gcc zlib-dev libc-dev bsd-compat-headers py-setuptools git bash |
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
image: python:latest | |
stages: | |
- deploy | |
variables: | |
WORKON_HOME: .pipenv/venvs | |
PIP_CACHE_DIR: .pipenv/pipcache | |
cache: |
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
{ | |
"Setup basic flexbox styling": { | |
"prefix": "flex", | |
"body": [ | |
"display: flex;", | |
"flex-direction: ${1:column};", | |
"justify-content: ${2:flex-start};", | |
"align-items: ${3:flex-start};", | |
"$0" | |
], |
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 { ApolloClient } from "apollo-boost"; | |
import { setContext } from "apollo-link-context"; | |
import { InMemoryCache } from "apollo-cache-inmemory"; | |
export default class APIClient { | |
constructor(context = {}, options = {}) { | |
this.context = context; | |
this.options = { fetchPolicy: "no-cache", ...options }; | |
const authLink = setContext((_, context) => { | |
return { |
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
console.log("Hello world!"); |
NewerOlder