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
# In .ebextensions/01_celery.config | |
files: | |
"/etc/systemd/system/celery.service": | |
mode: "000644" | |
owner: celery | |
group: celery | |
content: | | |
[Unit] | |
Description=Celery Service |
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
#!/usr/bin/env bash | |
# Create the celery systemd service file | |
echo "[Unit] | |
Name=Celery | |
Description=Celery service for __ | |
After=network.target | |
StartLimitInterval=0 | |
[Service] |
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/bash | |
sudo add-apt-repository ppa:git-core/ppa -y | |
sudo apt update && sudo apt-get install git -y |
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
/** | |
* Create a web friendly URL slug from a string. | |
* | |
* Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support. | |
* | |
* Although supported, transliteration is discouraged because | |
* 1) most web browsers support UTF-8 characters in URLs | |
* 2) transliteration causes a loss of information | |
* | |
* @author Sean Murphy <sean@iamseanmurphy.com> |
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 allow_cors_get(http_response): | |
http_response['Access-Control-Allow-Origin'] = "*" | |
http_response['Access-Control-Expose-Headers'] = "Content-Type" | |
http_response['Access-Control-Allow-Methods'] = "GET" | |
http_response['Access-Control-Allow-Headers'] = "Content-Type" | |
http_response['Access-Control-Allow-Credentials'] = "false" | |
return http_response |