Skip to content

Instantly share code, notes, and snippets.

View kamalgill's full-sized avatar

Kamal Gill kamalgill

View GitHub Profile
@kamalgill
kamalgill / index.js
Created October 10, 2022 04:35 — forked from allenheltondev/index.js
Parameterize Step Function Workflow Definition
const fs = require('fs');
const YAML = require('json-to-pretty-yaml');
const definition = JSON.parse(fs.readFileSync('definition.asl.json'));
const substitutions = [];
parameterizeStates(definition.States, substitutions);
console.log(substitutions)
@kamalgill
kamalgill / cors.py
Created March 18, 2016 22:30 — forked from mmerickel/cors.py
cors in pyramid
from pyramid.security import NO_PERMISSION_REQUIRED
def includeme(config):
config.add_directive(
'add_cors_preflight_handler', add_cors_preflight_handler)
config.add_route_predicate('cors_preflight', CorsPreflightPredicate)
config.add_subscriber(add_cors_to_response, 'pyramid.events.NewResponse')
class CorsPreflightPredicate(object):