Skip to content

Instantly share code, notes, and snippets.

View femyeda's full-sized avatar
🐢
Slow and steady wins the race

Femi Odugbesan femyeda

🐢
Slow and steady wins the race
  • Chicago, IL
View GitHub Profile
@femyeda
femyeda / gist:6c0a30afc237110ccd98144e92f02a47
Created January 22, 2023 21:23
Autogenerated Prisma API
const getHandler = async (
req: AuthenticatedApiRequest,
res: NextApiResponse
) => {
const query = qp(req.query.query)
? JSON.parse(qp(req.query.query))
: undefined;
const selectInput = coalesceUndefined(query?.select);
const whereInput = coalesceUndefined(query?.where);
//TODO: Includ path to get extension
export default function stripExtenstion(filename, extension) {
const regex = new RegExp(`.${extension}$`, 'g')
return filename.replace(regex, '')
}
export const stripExtenstion = stripExtenstion;
@femyeda
femyeda / images.sh
Last active August 29, 2015 14:07 — forked from jeffbcross/images.sh
#!/bin/bash
# Usage ./images.sh optional-start-sha optional-end-sha
# ./images.sh eaa1d00b24008f590b95ad099241b4003688cdda HEAD
if [ $1 ]; then
start="$1.."
else
start=""
fi
if [ $2 ]; then