Skip to content

Instantly share code, notes, and snippets.

View stevenalexander's full-sized avatar

Steven Alexander stevenalexander

  • Belfast, UK
View GitHub Profile

Scratch pad of useful tricks and traps I've found from investigating serverless options.

Tricks

General

  • serverless framework is brilliant, it will create template projects and assist in deployment/updates of your serverless solution.

  • Lambda test event for HTTP POST request with body for form parameters (couldn't find this anywhere)

@stevenalexander
stevenalexander / geojson.js
Created August 14, 2018 08:31
test geojson file for loading into openlayers
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Test"
},
"geometry": {
"type": "Point",
@stevenalexander
stevenalexander / get-word-count.sh
Created May 4, 2017 14:17
Getting word count for site from nunjucks/jinja2 template HTML files
# from views directory
# create .out files with HTML tags stripped
find . -name '*.html' -exec sh -c 'sed -e "s/<[^>]*>//g" $1 > $1.out' -- {} \;
# create .out.bout files with nunjucks/jinja2 tags stripped
find . -name '*.html.out' -exec sh -c 'sed -e "s/{[^}]*}//g" $1 > $1.bout' -- {} \;
# word count
find . -name '*.html.out.bout' | xargs wc -w
@stevenalexander
stevenalexander / _.md
Created November 13, 2012 16:43
Another Inlet