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
import pytest | |
from sqlalchemy import create_engine, engine, MetaData | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy_utils import create_database, database_exists, drop_database | |
from my_project.database import Base | |
@pytest.fixture(scope="session", autouse=True) |
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 | |
clean_containers() { | |
containers=$(docker ps -q) | |
echo "Stopping any running containers..." | |
docker stop $containers | |
echo "Removing all containers..." | |
docker rm -v $containers 2>/dev/null | |
echo "Containers removed from system." | |
} |
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
# Privacy settings and SPAM blocker. | |
# Redirect all those nasty guys background requests to localhost. | |
127.0.0.1 google-analytics.com | |
127.0.0.1 www.google-analytics.com | |
127.0.0.1 adbooth.net | |
127.0.0.1 softigloo.com | |
127.0.0.1 www.softigloo.com | |
127.0.0.1 ero-advertising.com | |
127.0.0.1 beursvoorbeginners.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
server { | |
listen 80; # Listen on port 80 for IPv4 requests | |
server_name jenkins.example.com; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443 default ssl; |
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
{% load i18n future pages_tags %} | |
{% spaceless %} | |
{% if page_branch_in_menu %} | |
{% if branch_level == 0 %} | |
<ul class="menu"> | |
{% for page in page_branch %} | |
{% if page.in_menu %} | |
<li> | |
<a href="{{ page.get_absolute_url }}">{{ page.title }}</a> |
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
from lxml import etree | |
import requests | |
class XMLClient(object): | |
""" | |
Generic XML client. All the different provider's API implementations must | |
inherit from it to create its own client implementation. | |
""" | |
def __init__(self, username, password, url): |