Being able to auto type API endpoint according the use. This could be achieveable using TypeScript template literals.
Example:
Having these API endpoints:
/api/users
/api/companies
/** | |
* @Post("/magic_link_signup") | |
*/ | |
function magicLinkSignUp($request) { | |
// get the query parameters from the post request | |
$queryParams = $request->query()->all(); | |
// get the token from queryParams | |
// this $token is the same $randomString that was | |
// generated in Step 1 |
const puppeteer = require('puppeteer-core'); | |
const cheerio = require('cheerio'); | |
const chrome = require('chrome-aws-lambda'); | |
export default async (req, res) => { | |
const slug = req?.query?.slug; | |
if (!slug) { | |
res.statusCode = 200 | |
res.setHeader('Content-Type', 'application/json') | |
res.end(JSON.stringify({ id: null })) |
export const DangerousRawHtml = ({ html = "" }) => ( | |
<script dangerouslySetInnerHTML={{ __html: `</script>${html}<script>` }} /> | |
); |
Being able to auto type API endpoint according the use. This could be achieveable using TypeScript template literals.
Example:
Having these API endpoints:
/api/users
/api/companies
Being able to auto type API endpoint according the use. This could be achieveable using TypeScript template literals.
Example:
Having these API endpoints:
/api/users
/api/companies
# fps=10 | |
ffmpeg -i video.mp4 -f image2 -vf fps=fps=10 img%03d.jpg | |
# vertical sprite | |
files=$(ls img*.jpg | sort -t '-' -n -k 2 | tr '\n' ' ') | |
convert $files -append output.jpg | |
# references: | |
# http://www.imagemagick.org/script/command-line-options.php#append | |
# http://www.imagemagick.org/script/command-line-options.php#resize |