First, the Auth
construct adds an /auth
route to the API.
const auth = new Auth(stack, 'auth', {
authenticator: {
handler: 'auth.handler',
},
});
const api = new Api(stack, 'api', {
set fstate "$HOME/.local/state/tmp-stack.json" | |
function fee | |
if test (count $argv) -eq 0 | |
__fee_push | |
return 0 | |
end | |
if string match -qr '^[-+]?[0-9]+$' -- $argv[1] | |
__fee_at $argv[1] |
#!/usr/bin/env bash | |
set -e | |
export DEBUG=0 | |
export AWS_REGION="us-east-1" | |
function debug() { | |
if [ $DEBUG -eq 1 ]; then | |
echo "ERROR: $@" >&2 |
First, the Auth
construct adds an /auth
route to the API.
const auth = new Auth(stack, 'auth', {
authenticator: {
handler: 'auth.handler',
},
});
const api = new Api(stack, 'api', {
local wk_ok, wk = pcall(require, "which-key") | |
if not wk_ok then | |
return | |
end | |
local vopts = lvim.builtin.which_key.vopts | |
local opts = lvim.builtin.which_key.opts | |
local mappings = { | |
["z"] = { |
#!/usr/bin/env bash | |
# Get the <token> through the GitHub website: | |
# 1. Go to Settings->Developer Settings->Personal access tokens | |
# 2. Create a token with the 'repo' scope selected. | |
# https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token | |
# The value for "event_type" should match "on.repository_dispatch.type" in workflow.yaml. | |
curl -X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ |
{"lastUpload":"2020-06-04T20:13:28.728Z","extensionVersion":"v3.4.3"} |
# /etc/nginx/nginx.conf | |
http { | |
... | |
include /etc/nginx/sites-available/*.conf # Include all config files that end in .conf | |
... | |
} | |
# /etc/nginx/sites-available/example.com.conf | |
server { | |
listen 80 default_server; |
import RPi.GPIO as GPIO | |
import os | |
import time | |
import math | |
usleep = lambda x: time.sleep(x / 1000000.0) | |
GPIO.setwarnings(False) | |