curl https://www.keycdn.com
curl -I https://www.keycdn.com
import { NextApiRequest, NextApiResponse } from "next"; | |
export default async function handler( | |
req: NextApiRequest, | |
res: NextApiResponse | |
) { | |
if ( | |
!req.query.revalidate_token || | |
!process.env.REVALIDATE_TOKEN || | |
req.query.revalidate_token !== process.env.REVALIDATE_TOKEN |
// Naive recursion. | |
function fib1(n) { | |
if (n <= 1) { | |
return n | |
} | |
return fib1(n - 1) + fib1(n - 2) | |
} | |
{ | |
console.log('fib1') |
$ redis-cli --rdb dump-before.rdb save
$ redis-cli --rdb dump-after.rdb save
$ pip install rdbtools python-lzf
$ rdb --command diff dump-before.rdb | sort > sorted-dump-before.out
$ rdb --command diff dump-after.rdb | sort > sorted-dump-after.out
$ diff sorted-dump-before.out sorted-dump-after.out
type PartiallyRequired<T, K extends keyof T> = Pick<T, K> & Partial<T>; | |
type Test = { | |
foo: string; | |
bar: string; | |
baz: string; | |
}; | |
type Test1 = PartiallyRequired<Test, "foo">; |
Matchers | |
^ | |
Match starting position | |
. | |
Match any single character, enclose in bracket for literal dot | |
a.c -> "abc", etc. | |
[a.c] -> "a", ".", "c" | |
[ ] | |
Match single character, or character within range | |
[abc], [a-c] -> "a", "b", "c" |
AWSTemplateFormatVersion: "version date" | |
" String | |
Description: | |
" template metadata | |
" arbitrary yaml | |
" CloudFormation helper scripts | |
" cfn-init, cfn-signal, cfn-get-metadata, cfn-hup | |
" Resources can have Metadata (install scripts, etc.) |
"word" motions (no special chars) | |
w | |
forward by word | |
b | |
backward by word | |
e | |
end of word | |
ge | |
end of word (backward) |
$ brew tap nodesource/nsolid
$ brew install nsolid-console
$ nsolid-console
$ NSOLID_APPNAME="my-app" NSOLID_COMMAND="localhost:9001" nsolid my-app/index.js