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
@SpringApplicationConfiguration( TestClass.Config.class ) | |
public class TestClass { | |
@Configuration | |
public static class Config { | |
// your beans | |
} | |
} |
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
@Order(Ordered.LOWEST_PRECEDENCE) | |
public class MyFrameworkPropertyDefaultsPostProcessor implements EnvironmentPostProcessor { | |
private static final String DEFAULT_MY_FRAMEWORK_PROPERTIES = "defaultMyFrameworkProperties"; | |
private static final String DEFAULT_MY_FRAMEWORK_PROPERTIES_LOCATION = "/config/myFramework-application.yml"; | |
private YamlPropertySourceLoader propertySourceLoader = new YamlPropertySourceLoader(); | |
@Override | |
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { |
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
#!/usr/bin/env ruby | |
if ARGV.length < 2 | |
puts "usage: #{$0} databag.json new_encrypted_databag.json [encrypted_data_bag_secret]" | |
exit(1) | |
end | |
databag_file = ARGV[0] | |
out_file = ARGV[1] | |
if ARGV.length >= 3 |
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
[loggers] | |
keys=root,example.default,gunicorn.access,gunicorn.error | |
[logger_root] | |
level=DEBUG | |
handlers=example | |
[logger_example.default] | |
level=DEBUG | |
handlers=example |
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
#!/bin/bash | |
# Allow toggling components to install and update based off flags | |
updateconsul=1 | |
updatedocker=1 | |
updatedockermachine=1 | |
updatedockercompose=1 | |
updatedockerswarm=1 | |
consulversion="0.5.2" |
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
# Install base packages | |
# -qq implies -y --force-yes | |
sudo apt-get install -qq curl unzip git-core ack-grep software-properties-common build-essential cachefilesd | |
echo ">>> Installing *.xip.io self-signed SSL" | |
SSL_DIR="/etc/ssl/xip.io" | |
DOMAIN="*.xip.io" | |
PASSPHRASE="vaprobash" |
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 pyramid.view import view_config | |
from pyramid.security import remember | |
from pyramid.security import authenticated_userid | |
from pyramid_persona.views import verify_login | |
USE_WHITELIST = False | |
WHITELIST_REJECT_MESSAGE = 'Sorry, you are not authorized to access this site.' | |
WHITELIST_REJECT_REDIRECT = '/' | |
USE_BLACKLIST = False | |
BLACKLIST_REJECT_MESSAGE = 'Sorry, you are not authorized to access this site.' |
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 pyramid.authentication import AuthTktAuthenticationPolicy | |
class MyAuthenticationPolicy(AuthTktAuthenticationPolicy): | |
def authenticated_userid(self, request): | |
userid = self.unauthenticated_userid(request) | |
if userid: | |
if request.verify_userid_is_still_valid(userid): | |
return userid | |
def effective_principals(self, request): |
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
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends curl python-pip && \ | |
pip install requests && \ | |
apt-get remove -y python-pip curl && \ | |
rm -rf /var/lib/apt/lists/* |
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
($env:Path).Replace(';',"`n") |