I hereby claim:
- I am bartdorsey on github.
- I am bartdorsey (https://keybase.io/bartdorsey) on keybase.
- I have a public key ASCEQoTmhwrzLjydn4UXu76n0dmQDT3j5-K_6B8fgwx_Awo
To claim this, I am signing this object:
AWSTemplateFormatVersion: 2010-09-09 | |
Description: EC2 based SSH dev environment for VSCode Remote SSH | |
Parameters: | |
Key: | |
Type: String | |
Description: The name of your amazon EC2 security key | |
Resources: | |
DevEnvironmentSubnet: | |
Type: 'AWS::EC2::Subnet' | |
Properties: |
Write-Host @' | |
============================= | |
< Windows Subsystem for Linux > | |
< (Ubuntu >= 20.04) installer > | |
============================= | |
\ | |
\ | |
.--. | |
|o_o | | |
|:_/ | |
import { useEffect } from 'react'; | |
export default function useAsyncEffect(callback, dependencies) { | |
useEffect(() => { | |
(async() => { | |
return await callback(); | |
})(); | |
}, dependencies); | |
} |
I hereby claim:
To claim this, I am signing this object:
version: '3' | |
services: | |
nginx-proxy: | |
image: 'jc21/nginx-proxy-manager:latest' | |
restart: unless-stopped | |
ports: | |
- '80:80' | |
- '81:81' | |
- '443:443' | |
volumes: |
upstream app_servers { | |
server app:4000; | |
} | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://app:4000/; | |
} |
// This is a higher order function that takes in an express handler function callback | |
// and returns a new one that does a try catch on your handler so you don't have | |
// to put a try catch in every route. | |
function asyncErrorHandler(callback) { | |
return async function (req, res, next) { | |
try { | |
return callback(req, res, next) | |
} catch (error) { | |
next(error) | |
} |
#!/usr/bin/env node | |
const http = require('http'); | |
const options = { | |
hostname: "programming-quotes-api.herokuapp.com", | |
path: "/quotes/random", | |
method: 'GET' | |
} | |
const req = http.request(options, (res) => { |