This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import middy, { MiddlewareObj } from '@middy/core' | |
import httpErrorHandler from '@middy/http-error-handler' | |
import httpHeaderNormalizer from '@middy/http-header-normalizer' | |
import httpJsonBodyParser from '@middy/http-json-body-parser' | |
import { APIGatewayProxyEventV2, APIGatewayProxyStructuredResultV2, Handler } from 'aws-lambda' | |
import { zodValidator } from 'middy-zod-validator' | |
import { ZodSchema, z, infer as ZInfer } from 'zod' | |
import { isHttpError } from 'http-errors' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Restart Bluetooth Module on Mac OS X | |
# | |
# Requires Blueutil to be installed: http://brewformulas.org/blueutil | |
BT="/usr/local/bin/blueutil" | |
log() { | |
echo "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To begin with, the wikipedia left recursion algorithm is much eaiser to read: http://en.wikipedia.org/wiki/Left_recursion#Removing_indirect_left_recursion | |
So, we have the non-terminals A_1, and A_2: | |
A_1 -> A_2a | b | |
A_2 -> A_1c | ab | |
let's step through the algorithm: | |
i = 1 | |
j = 1 |