Skip to content

Instantly share code, notes, and snippets.

View akhilome's full-sized avatar
🌚
poupon

Kizito Akhilome akhilome

🌚
poupon
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Place in ~/Library/LaunchAgents/ -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.akhilome.CapslockLShift</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
@akhilome
akhilome / so.md
Last active April 13, 2020 14:54
Handy S/O links
@akhilome
akhilome / express-vercel.md
Last active January 16, 2024 11:49
express-vercel

Setting Up Vercel for APIs with Express

This gist would offer a step-by-step guide of some sort for quickly setting up a "serverless" API using expressjs, and Vercel's Now platform for local development with now dev and eventual prod deployment now --prod

Install Now CLI

If you haven't already, install now's cli tool globally on your development environment:

{
"version": 2,
"routes": [
{
"src": "/v1/logs/(.*)",
"dest": "src/routes/logger.route.ts?slug=$1",
"methods": ["OPTIONS", "POST", "PUT"]
},
{
"src": "/(?<slug>[^/]*)/?",
// ABC...Z
const alphaUpper = Array(26)
.fill('')
.map((_, i) => String.fromCharCode(65 + i))
.join('');
// abc...z
const alphaUpper = Array(26)
.fill('')
.map((_, i) => String.fromCharCode(65 + i))