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
files: | |
"/opt/elasticbeanstalk/hooks/configdeploy/pre/99patchwsgi.py": &file | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env python | |
import os | |
import sys | |
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) |
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
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
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
#! /usr/bin/env python3 | |
import xml.etree.ElementTree as ET | |
import sys | |
import base64 | |
import os | |
PREFIX="data:image/png;base64," | |
ATTR="{http://www.w3.org/1999/xlink}href" | |
DEFAULT_NS="http://www.w3.org/2000/svg" | |
with open(sys.argv[1]) as f: |