Get Twitter Bootstrap Configuration.
502694
protected function addTwitterBootstrapParameterNode()
    {
        $builder = new TreeBuilder();
        $node = $builder->root('twbs');

        $defaults = array(
            'twbs_dir' => self::COMPONENTS_DIR.'/bootstrap',
            'js' => array('js/bootstrap.min.js'),
            'less' => array(
                'less/bootstrap.less',
                'less/theme.less',
            ),
            'css' => array(),
            'icon_prefix' => 'glyphicon',
            'fonts_dir' => '%kernel.root_dir%/../web/fonts',
            'icon_tag' => 'span',
            'form_theme' => 'ASFLayoutBundle:form:fields.html.twig',
        );

        $node
           ->treatTrueLike($defaults)
           ->treatFalseLike(array(
               'twbs_dir' => false,
           ))
           ->addDefaultsIfNotSet()
           ->children()
               ->scalarNode('twbs_dir')
                   ->cannotBeEmpty()
                   ->info('Fill this value if you do not use the package "component/bootstrap".')
                   ->defaultValue(self::COMPONENTS_DIR.'/bootstrap')
               ->end()
               ->arrayNode('js')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search js files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('js')
                   ->prototype('scalar')->end()
                   ->defaultValue(array(
                       'js/bootstrap.min.js',
                   ))
               ->end()
               ->arrayNode('less')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search less files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('less')
                   ->prototype('scalar')->end()
                   ->defaultValue(array(
                       'less/bootstrap.less',
                       'less/theme.less',
                   ))
               ->end()
               ->arrayNode('css')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search css files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('css')
                   ->prototype('scalar')->end()
               ->end()
               ->scalarNode('icon_prefix')
                   ->defaultValue('glyphicon')
               ->end()
               ->scalarNode('icon_tag')
                   ->defaultValue('span')
               ->end()
               ->scalarNode('fonts_dir')
                   ->defaultValue('%kernel.root_dir%/../web/fonts')
               ->end()
               ->scalarNode('form_theme')
                   ->defaultValue('ASFLayoutBundle:form:fields.html.twig')
               ->end()
               ->arrayNode('customize')
                   ->children()
                       ->arrayNode('less')
                           ->children()
                               ->scalarNode('dest_dir')->end()
                               ->arrayNode('files')
                                   ->fixXmlConfig('less_files')
                                   ->prototype('scalar')->end()
                               ->end()
                           ->end()
                       ->end()
                   ->end()
               ->end()
           ->end()
        ;

        return $node;
    }
418680
def _config_bootstrap(self) -> None:
        
        if self.output:
            self.folder: str = os.getcwd() + "/" + self.project
            os.mkdir(self.folder)
1204109
public function bootstrap()
    {

        // setup autoloader
        require SERVER_AUTOLOADER;

        // make the application available and register the class loaders
        $application = $this->application;
        $application->registerClassLoaders();

        // register the applications annotation registries
        $application->registerAnnotationRegistries();

        // add the application instance to the environment
        Environment::singleton()->setAttribute(EnvironmentKeys::APPLICATION, $application);

        // create s simulated request/session ID whereas session equals request ID
        Environment::singleton()->setAttribute(EnvironmentKeys::SESSION_ID, $sessionId = SessionUtils::generateRandomString());
        Environment::singleton()->setAttribute(EnvironmentKeys::REQUEST_ID, $sessionId);

        // try to load the profile logger
        if (isset($this->loggers[$profileLoggerKey = \AppserverIo\Logger\LoggerUtils::PROFILE])) {
            $this->profileLogger = $this->loggers[$profileLoggerKey];
            $this->profileLogger->appendThreadContext('timer-service-executor');
        }
    }
73621
def op_bootstrap(self):
        """"""
        self.logger.info('Bootstrapping django-dev directory structure in current directory ...')
        self.make_venv(DJANGO_DEFAULT_VERSION)
        venv_path = self.make_venv('1.6.5')
        self.venv_install('south==1.0.1', venv_path)
        apps_dir = self.make_apps_dir()
        self.logger.info('Now you may symlink (ln -s) your apps '
                         '(and other apps that you apps depend upon) into %s' % apps_dir)
79002
private Configuration buildTwitterConfiguration() {
        logger.debug("creating twitter configuration");
        ConfigurationBuilder cb = new ConfigurationBuilder();

        cb.setOAuthConsumerKey(oauthConsumerKey)
                .setOAuthConsumerSecret(oauthConsumerSecret)
                .setOAuthAccessToken(oauthAccessToken)
                .setOAuthAccessTokenSecret(oauthAccessTokenSecret);

        if (proxyHost != null) cb.setHttpProxyHost(proxyHost);
        if (proxyPort != null) cb.setHttpProxyPort(Integer.parseInt(proxyPort));
        if (proxyUser != null) cb.setHttpProxyUser(proxyUser);
        if (proxyPassword != null) cb.setHttpProxyPassword(proxyPassword);
        if (raw) cb.setJSONStoreEnabled(true);
        logger.debug("twitter configuration created");
        return cb.build();
    }
584941
def _get_base_configs(self):
        """"""
        return BIOSBaseConfigs(
            self._conn, utils.get_subresource_path_by(
                self, ["Oem", "Hpe", "Links", "BaseConfigs"]),
            redfish_version=self.redfish_version)
1284471
public static ConfigurationTree build(final Bootstrap bootstrap,
                                          final Configuration configuration) {
        return build(bootstrap, configuration, true);
    }
140694
def bootstraps(self, _args):
        """"""
        for bs in Bootstrap.list_bootstraps():
            bs = Bootstrap.get_bootstrap(bs, self.ctx)
            print('{Fore.BLUE}{Style.BRIGHT}{bs.name}{Style.RESET_ALL}'
                  .format(bs=bs, Fore=Out_Fore, Style=Out_Style))
            print('    {Fore.GREEN}depends: {bs.recipe_depends}{Fore.RESET}'
                  .format(bs=bs, Fore=Out_Fore))
460920
function bootstrap(app, options) {
  var config = defaults({}, options, DEFAULT_CONFIGURATION);
  var log = logger.get(options);
  app._mukoan = app._mukoan || {};

  if (!app._mukoan.initialized) {
    initialize(app, options);
  }

  if (!app._mukoan.bootstrapped) {
    // Configure and setup middlewares
    app.use(middlewares.bodyparser(config.bodyParser));
    app.use(middlewares.morgan(config.morgan.format, config.morgan.options));
    app.use(middlewares.responseTime());
    app.use(middlewares.helmet(config.helmet));
    app.use(middlewares.compress({
      flush: zlib.Z_SYNC_FLUSH
    }));
    app.use(middlewares.conditional());
    app.use(middlewares.etag());
    app.use(middlewares.cacheControl(config.cacheControl));
    app.use(middlewares.cors(config.cors));
    app.use(middlewares.favicon(config.favicon));
    app.use(middlewares.jwt(config.jwt.options).unless(config.jwt.unless));
    app.use(middlewares.json());
    app._mukoan.bootstrapped = true;
    log.debug('Finished configuring Koa server');
  } else {
    log.warn('Trying to bootstrap the same Koa instance twice (ignoring action)');
  }
  return app;
}
1367261
public static function get_public_config() {
        global $CFG, $SITE, $PAGE, $OUTPUT;
        require_once($CFG->libdir . '/authlib.php');

        $context = context_system::instance();
        // We need this to make work the format text functions.
        $PAGE->set_context($context);

        list($authinstructions, $notusedformat) = external_format_text($CFG->auth_instructions, FORMAT_MOODLE, $context->id);
        list($maintenancemessage, $notusedformat) = external_format_text($CFG->maintenance_message, FORMAT_MOODLE, $context->id);
        $settings = array(
            'wwwroot' => $CFG->wwwroot,
            'httpswwwroot' => $CFG->wwwroot,
            'sitename' => external_format_string($SITE->fullname, $context->id, true),
            'guestlogin' => $CFG->guestloginbutton,
            'rememberusername' => $CFG->rememberusername,
            'authloginviaemail' => $CFG->authloginviaemail,
            'registerauth' => $CFG->registerauth,
            'forgottenpasswordurl' => clean_param($CFG->forgottenpasswordurl, PARAM_URL), // We may expect a mailto: here.
            'authinstructions' => $authinstructions,
            'authnoneenabled' => (int) is_enabled_auth('none'),
            'enablewebservices' => $CFG->enablewebservices,
            'enablemobilewebservice' => $CFG->enablemobilewebservice,
            'maintenanceenabled' => $CFG->maintenance_enabled,
            'maintenancemessage' => $maintenancemessage,
            'mobilecssurl' => !empty($CFG->mobilecssurl) ? $CFG->mobilecssurl : '',
            'tool_mobile_disabledfeatures' => get_config('tool_mobile', 'disabledfeatures'),
            'country' => clean_param($CFG->country, PARAM_NOTAGS),
            'agedigitalconsentverification' => \core_auth\digital_consent::is_age_digital_consent_verification_enabled(),
            'autolang' => $CFG->autolang,
            'lang' => clean_param($CFG->lang, PARAM_LANG),  // Avoid breaking WS because of incorrect package langs.
            'langmenu' => $CFG->langmenu,
            'langlist' => $CFG->langlist,
            'locale' => $CFG->locale,
        );

        $typeoflogin = get_config('tool_mobile', 'typeoflogin');
        // Not found, edge case.
        if ($typeoflogin === false) {
            $typeoflogin = self::LOGIN_VIA_APP; // Defaults to via app.
        }
        $settings['typeoflogin'] = $typeoflogin;

        // Check if the user can sign-up to return the launch URL in that case.
        $cansignup = signup_is_enabled();

        $url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
        $settings['launchurl'] = $url->out(false);

        // Check that we are receiving a moodle_url object, themes can override get_logo_url and may return incorrect values.
        if (($logourl = $OUTPUT->get_logo_url()) && $logourl instanceof moodle_url) {
            $settings['logourl'] = clean_param($logourl->out(false), PARAM_URL);
        }
        if (($compactlogourl = $OUTPUT->get_compact_logo_url()) && $compactlogourl instanceof moodle_url) {
            $settings['compactlogourl'] = clean_param($compactlogourl->out(false), PARAM_URL);
        }

        // Identity providers.
        $authsequence = get_enabled_auth_plugins(true);
        $identityproviders = \auth_plugin_base::get_identity_providers($authsequence);
        $identityprovidersdata = \auth_plugin_base::prepare_identity_providers_for_output($identityproviders, $OUTPUT);
        if (!empty($identityprovidersdata)) {
            $settings['identityproviders'] = $identityprovidersdata;
        }

        // If age is verified, return also the admin contact details.
        if ($settings['agedigitalconsentverification']) {
            $settings['supportname'] = clean_param($CFG->supportname, PARAM_NOTAGS);
            $settings['supportemail'] = clean_param($CFG->supportemail, PARAM_EMAIL);
        }

        return $settings;
    }
1319340
def common_bootsrap_payload(self):
        """"""
        messages = get_flashed_messages(with_categories=True)
        locale = str(get_locale())
        return {
            'flash_messages': messages,
            'conf': {k: conf.get(k) for k in FRONTEND_CONF_KEYS},
            'locale': locale,
            'language_pack': get_language_pack(locale),
            'feature_flags': get_feature_flags(),
        }
96153
public function bootstrap()
    {
        $config = Zilf::$container->getShare('config');

        $this->loadConfigurationFiles($config);

        Zilf::$app->environment = $config->get('app.app_env');

        date_default_timezone_set($config->get('app.timezone', 'UTC'));

        mb_internal_encoding('UTF-8');
    }
532074
def bootstrap(self, config):
        
        pg_hba = config.get('pg_hba', [])
        method = config.get('method') or 'initdb'
        self._running_custom_bootstrap = method != 'initdb' and method in config and 'command' in config[method]
        if self._running_custom_bootstrap:
            do_initialize = self._custom_bootstrap
            config = config[method]
        else:
            do_initialize = self._initdb
        return do_initialize(config) and self.append_pg_hba(pg_hba) and self.save_configuration_files() \
            and self._configure_server_parameters() and self.start()
762385
def __get_config():
    '''
    
    '''
    if 'config' not in globals():
        return None
    cfg = globals().get('config', None)
    if cfg is None:
        return None

    if not isinstance(cfg, dict):
        return None
    return cfg
910606
public function bootstrap($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'debug' => false,
            'css'   => true,
            'javascript' => false
        ));

        $html = '';

        if ($config->javascript && !static::isLoaded('bootstrap-javascript'))
        {
            $html .= $this->jquery($config);
            $html .= '<ktml:script src="assets://js/'.($config->debug ? 'build/' : 'min/').'bootstrap.js" />';

            static::setLoaded('bootstrap-javascript');
        }

        if ($config->css && !static::isLoaded('bootstrap-css'))
        {
            $html .= '<ktml:style src="assets://css/bootstrap.css" />';

            static::setLoaded('bootstrap-css');
        }

        return $html;
    }
1286821
def _get_bootstrap_url(directory):
    '''
    

    '''
    v = _get_buildout_ver(directory)
    return _URL_VERSIONS.get(v, _URL_VERSIONS[DEFAULT_VER])
1263204
def get_auth_settings():
    
    from yacms.conf import settings
    try:
        auth_settings = (settings.TWITTER_CONSUMER_KEY,
                         settings.TWITTER_CONSUMER_SECRET,
                         settings.TWITTER_ACCESS_TOKEN_KEY,
                         settings.TWITTER_ACCESS_TOKEN_SECRET)
    except AttributeError:
        return None
    else:
        return auth_settings if all(auth_settings) else None