Skip to content

Instantly share code, notes, and snippets.

View Gwash3189's full-sized avatar

Adam Beck Gwash3189

View GitHub Profile
@Gwash3189
Gwash3189 / index.ts
Created August 25, 2022 06:31
src/pages/api/accounts/index.ts
import {PrismaClientKnownRequestError} from '@prisma/client/runtime'
import {NextApiRequest, NextApiResponse} from 'next'
import {install, Repositorys, Logger} from 'nextjs-backend-helpers'
import {
createAccountArgumentsSchema,
} from '../../../domains/accounts/schemas'
import {
AppController,
} from '../../../domains/controllers/application-controller'
import {rateLimit} from '../../../middleware/ratelimit'
@Gwash3189
Gwash3189 / package.json
Created May 24, 2022 05:33
minimal xo configuration
{
"xo": {
"space": true,
"rules": {
"@typescript-eslint/semi": 0,
"semicolon": 0,
"import/extensions": 0,
"unicorn/no-array-callback-reference": 0,
"@typescript-eslint/member-delimiter-style": 0
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
body {
font-family: 'Inter', sans-serif;
}
// LoadingButton.tsx
import React from 'react'
import { Button } from 'Button'
const LoadingButton = (props) => {
return <Button {...props} isLoading> loading... </Button>
}
// Button.tsx
import React from 'react'
const request = require('request')
module.exports.get = (url, options) => {
return new Promise((resolve, reject) => {
request.get(url, options, (err, response) => {
if (err) {
reject(err)
} else {
resolve(response)
}
defmodule ZshRc do
def read do
"./.zshrc" |> File.read |> handle_result
end
def handle_result({:ok, value}) do
value
end
def handle_result({:error, reason}) do
function handleChange({ preventDefault }) {
preventDefault();
}
function handleChange({ target: { value }}) {
console.log(value);
}
function handleChange({ target }) {
console.log(target.value);
}

Keybase proof

I hereby claim:

  • I am gwash3189 on github.
  • I am gwash3189 (https://keybase.io/gwash3189) on keybase.
  • I have a public key ASDQ0BVT6W-Tnsv74Q_eqZN9aVLg5t-2Aj9jcm34SLSpUgo

To claim this, I am signing this object: