- Put certs in
/etc/ssl/
:maps.company.com.pem
andmaps.company.com.key
. - Put nginx.conf in the root of the project.
- Apply the diff for
docker-compose.yml
. - Add your
.env
file. - Run project with
docker-compose up -d
.
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
import urllib.parse | |
url = "http://stackoverflow.com/search?q=question" | |
params = {'lang':'en','tag':'python'} | |
url_parts = list(urllib.parse.urlparse(url)) | |
query = dict(urllib.parse.parse_qsl(url_parts[4])) | |
query.update(params) | |
url_parts[4] = urllib.parse.urlencode(query) |
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
CRON_TEXT=" | |
0 1 * * * cmd1 2>&1 | |
0 */4 * * * cmd2 2>&1 | |
" | |
printf "${CRON_TEXT}" | crontab -u zengrc - | |
cron |
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
echo "Type the PR number, e.g. 358." | |
read PR_NO | |
git fetch upstream pull/$PR/head:pr-$PR; | |
git checkout pr-$PR; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
from __future__ import print_function | |
from functools import wraps | |
class Fish(object): | |
def __new__(cls, *args, **kwargs): | |
o = super(Fish, cls).__new__(cls, *args, **kwargs) | |
o.type = 'goldfish' | |
for name, val in vars(cls).items(): |
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
import requests | |
auth = ('username', 'password') | |
filepath = '/views/index.py' | |
result = requests.get('https://api.github.com/repos/:company/:repo/contents{}'.format(filepath), auth=auth).json() |