When unsing docker compose you can have a problem with the order of dependent linked containers
The solution is to start a script which tries to access a service and waits until it gets ready before loading your program
import os | |
import sys | |
import traceback | |
from functools import wraps | |
from multiprocessing import Process, Queue | |
def processify(func): | |
'''Decorator to run a function as a process. | |
Be sure that every argument and the return value |
@app.route('/login/<provider_name>', methods=['GET', 'POST']) | |
@authomatic.login('g') | |
@requires_ssl | |
def login(provider_name): | |
if g.user is not None and g.user.is_authenticated(): | |
return redirect(url_for('index')) | |
if authomatic.result: | |
if authomatic.result.error: | |
return 'Something went wrong: {0}'.format(authomatic.result.error.message) | |
if authomatic.result.user: |
When unsing docker compose you can have a problem with the order of dependent linked containers
The solution is to start a script which tries to access a service and waits until it gets ready before loading your program
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
#!/usr/bin/env python3 | |
import requests | |
from flask import * | |
import random | |
from apscheduler.schedulers.background import BackgroundScheduler | |
app = Flask(__name__) | |
scheduler = BackgroundScheduler() | |
url = "https://reddit.com/r/gonewild/comments.json?limit=200" |
option_settings: | |
- namespace: aws:elasticbeanstalk:cloudwatch:logs | |
option_name: StreamLogs | |
value: true | |
- namespace: aws:elasticbeanstalk:cloudwatch:logs | |
option_name: DeleteOnTerminate | |
value: false | |
- namespace: aws:elasticbeanstalk:cloudwatch:logs | |
option_name: RetentionInDays | |
value: 14 |
#!/bin/bash | |
# Replace Slack.sh in /boot/config/plugins/dynamix/notifications/agents | |
# Set to your Discord webhook token. | |
WEBHOOK="https://discordapp.com/api/webhooks/ID/TOKEN" | |
curl "$WEBHOOK" \ | |
-X "POST" \ | |
-H 'Content-Type: application/json' \ | |
--data @<(cat <<EOF |