This file contains 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
ALB to/from Lambda (not sure it handles QS params very well yet). | |
```typescript | |
// LARGELY DERIVED FROM: | |
// https://github.com/vendia/serverless-express/blob/b4e21350e26b94013ad15ec780e26375664c4583/src/event-sources/utils.js | |
import { Stream } from 'stream'; | |
// eslint-disable-next-line import/no-unresolved | |
import { ALBEvent, ALBResult } from 'aws-lambda/trigger/alb'; | |
import { Request } from 'express'; |
This file contains 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
resource "aws_cloudformation_stack" "app_cloudfront" { | |
name = "app_cloudfront" | |
# This is rendered to the template_body with the quotes removed: | |
# ${template_file.web_app_cloudfront.rendered} | |
template_body = "${template_file.web_app_cloudfront.rendered}" | |
} | |
resource "template_file" "web_app_cloudfront" { | |
template = "${file("./templates/web_apps_cloudfront.template")}" |
This file contains 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/sh -x | |
modprobe ifb | |
modprobe sch_fq_codel | |
modprobe act_mirred | |
modprobe sch_netem | |
## Paths and definitions | |
tc=/sbin/tc | |
ext=eth5 # Change for your device! |
This file contains 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
# the usual settings.py above here | |
import urlparse | |
# Register database schemes in URLs. | |
urlparse.uses_netloc.append('postgres') | |
# Heroku overrides | |
try: | |
# Check to make sure DATABASES is set in settings.py file. | |
# If not default to {} |
This file contains 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
mkdir .heroku | |
touch .heroku/injection_disabled | |
git add .heroku/injection_disabled | |
git commit -m "grrrr...." | |
git push |
This file contains 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
# END MY SETTINGS.PY | |
import os | |
import sys | |
import urlparse | |
# Register database schemes in URLs. | |
urlparse.uses_netloc.append('postgres') | |
urlparse.uses_netloc.append('mysql') |
This file contains 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
# standard constructor | |
Test1: constructor => | |
this.test = "test" | |
Test1.prototype.testFunction: => | |
print("It works!") | |
return null | |
t = new Test1() | |
t.testFunction() |