This file contains hidden or 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 { Prisma } from "@prisma/client"; | |
type PrismaError = | |
| Prisma.PrismaClientKnownRequestError | |
| Prisma.PrismaClientUnknownRequestError | |
| Prisma.PrismaClientRustPanicError | |
| Prisma.PrismaClientInitializationError | |
| Prisma.PrismaClientValidationError; | |
export const catchPromiseErrors = async <E, T>(promise: Promise<T>): Promise<[T, null] | [null, E]> => { |
This file contains hidden or 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
#!/bin/sh | |
mkdir -p __searchable__ | |
y="`pwd`/$1" | |
echo Will create a searchable PDF for $y | |
x=`basename "$y"` | |
name=${x%.*} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 fs = require('fs') | |
const path = require('path') | |
const colors = require('colors/safe') | |
const webpack = require('webpack') | |
const WebpackBuildNotifierPlugin = require('webpack-build-notifier') | |
const HtmlWebpackPlugin = require('html-webpack-plugin') | |
const compact = require('lodash.compact') | |
const without = require('lodash.without') | |
// This webpack config does not only support two different entry points |
This file contains hidden or 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
/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "^_$" }]*/ | |
import React, { Component } from 'react' | |
import Child from '../components/Child' | |
class ParentContainer extends Component { | |
componentDidMount () { | |
this.fetchData() | |
} | |
fetchData () { | |
// this.props.receiveData is a Redux prebound action creator |
This file contains hidden or 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 { createStore } from 'redux' | |
let increment = (state = 0, x) => { return state + x } | |
let decrement = (state = 0, x) => { return state - x} | |
let store = createStore([increment, decrement]) | |
store.subscribe(() => | |
console.log(store.getState()) | |
) |
NewerOlder