This file has been truncated, but you can view the full file.
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
{ | |
"APIGatewayServiceRolePolicy": { | |
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy", | |
"AttachmentCount": 0, | |
"CreateDate": "2019-10-22T18:22:01+00:00", | |
"DefaultVersionId": "v6", | |
"Document": { | |
"Statement": [ | |
{ |
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 | |
apt-get -y install git bc | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
mkdir /etc/letsencrypt |
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
var fs = require('fs'); | |
// Lambda knows what region it's in but a local execution doesn't, so preload the SDK and set the region | |
// This will only work if the same variable name is used in the Lambda function file | |
var AWS = require('aws-sdk'); | |
AWS.config.update({region: 'us-east-1'}); | |
// validate arguments | |
if(process.argv.length < 4) { |
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
def unpatch_models(): | |
"""unpatch""" | |
if __backup == {}: | |
return | |
for module_to_unpatch in model_mods: | |
name = module_to_unpatch.__name__ | |
for cls_name in vars(module_to_unpatch).get('__patchable__', []): | |
setattr(module_to_unpatch, | |
cls_name, | |
__backup[name][cls_name]) |
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
*.pyc | |
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
SMS_GATEWAYS = ( | |
(u'{number}@digitextdm.com', u'Digicel (Dominica)(Dominica)'), | |
(u'{number}@message.alltel.com', 'Alltel'), | |
(u'0{number}@smsmail.eplus.de', u'E-Plus(Germany)'), | |
(u'{number}@sms.edgewireless.com', u'Edge Wireless(USA)'), | |
(u'{number}@SMS.elementmobile.net', u'Element Mobile(USA)'), | |
(u'{number}@emtelworld.net', u'Emtel(Mauritius)'), | |
(u'{number}@echoemail.net', u'Esendex(UK)'), | |
(u'{number}@echoemail.net', u'Esendex(USA)'), | |
(u'{number}@esendex.net', u'Esendex(Spain)'), |
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
{% for file in mixed_files %} | |
<a href="" | |
{% if "image" in file|mimetype %}class="fancybox"{% endif %} | |
{% if "pdf" in file|mimetype %}rel="external"{% endif %} | |
>foo</a> | |
{% endfor %} |
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
def human_time(td): | |
""" | |
Return a more human readable version of a timedelta instance | |
""" | |
ret_str = "" | |
translate_tuple = [ | |
"day", | |
"hour", | |
"minute", | |
"second"] |
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
def reverse_dict_lookup(d, val): | |
""" | |
Performs a reverse lookup on a dictionary object, raising ValueError on | |
failure. | |
>>> reverse_dict_lookup({'a': 1, 'b': 2, 'c': 3}, 2) | |
'b' | |
>>> reverse_dict_lookup({}, 'a') | |
Traceback (most recent call last): | |
... |
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
""" | |
# Bookstore | |
- Book => Images | |
- Book <=> Author | |
- Book <=> Genre | |
- Book -> Genre (Primary) |
NewerOlder