Set a new bootstrap theme
189652
@PreAuthorize("hasAnyRole('ROLE_SU')")
  @PostMapping(
      value = "/set-bootstrap-theme",
      produces = "application/json",
      consumes = "application/json")
  public @ResponseBody void setBootstrapTheme(@Valid @RequestBody String styleName) {
    styleService.setSelectedStyle(styleName);
  }
961811
protected function bootstrap(): void
	{
		(function($app, $container): void
		{
			include $this->applicationPath . '/bootstrap.php';
		})($this, $this->container);
	}
1037076
public static function bootstrap_init() {
        global $CFG, $SITE, $DB, $FULLME;

        // backup the globals
        self::$globals['_SERVER'] = $_SERVER;
        self::$globals['CFG'] = clone($CFG);
        self::$globals['SITE'] = clone($SITE);
        self::$globals['DB'] = $DB;
        self::$globals['FULLME'] = $FULLME;

        // refresh data in all tables, clear caches, etc.
        self::reset_all_data();
    }
1017915
public static function bootstrap()
    {
        on('install',        'Pyrite\Users::install');
        on('user_fromemail', 'Pyrite\Users::fromEmail');
        on('user_resolve',   'Pyrite\Users::resolve');
        on('authenticate',   'Pyrite\Users::login');
        on('user_update',    'Pyrite\Users::update');
        on('user_create',    'Pyrite\Users::create');
        on('user_search',    'Pyrite\Users::search');
        on('ban_user',       'Pyrite\Users::ban');
        on('unban_user',     'Pyrite\Users::unban');
        on('clean_userids',  'Pyrite\Users::cleanList');
        on('all_users',      'Pyrite\Users::listAll');
    }
349733
protected function bootstrapDotenv()
    {
        if (!$this->files->has($this->paths->getDotenvPath())) {
            return;
        }

        $path = $this->files->getAdapter()->applyPathPrefix($this->paths->getBasePath());
        $dotenv = new Dotenv($path);
        $dotenv->load();
    }
195998
function bootstrap(monitor) {
    plugins.logger.attach.call(monitor, options);
    if (options.watch) {
      plugins.watch.attach.call(monitor, options);
    }
  }
822666
protected function _bootstrap()
    {
        if(!defined('_JEXEC'))
        {
            $_SERVER['HTTP_HOST']       = 'localhost';
            $_SERVER['HTTP_USER_AGENT'] = 'Composer';
            $_SERVER['REMOTE_ADDR']     = '127.0.0.1';

            define('_JEXEC', 1);
            define('DS', DIRECTORY_SEPARATOR);

            define('JPATH_BASE', realpath('.'));

            if (!file_exists(JPATH_BASE . '/includes/defines.php')) {
                throw new \RuntimeException('Could not find Joomla files. Make sure to run `composer install` from inside the root folder of your Joomla installation!');
            }

            require_once JPATH_BASE . '/includes/defines.php';

            require_once JPATH_BASE . '/includes/framework.php';
            require_once JPATH_LIBRARIES . '/import.php';

            require_once JPATH_LIBRARIES . '/cms.php';
        }

        if(!($this->_application instanceof Application))
        {
            $options = array(
                'root_user' => $this->_credentials['username'],
                'loglevel'  => $this->_verbosity
            );

            $this->_application = new Application($options);
            $this->_application->authenticate($this->_credentials);
        }
    }
1211114
def bootstrap(options):
    """"""
    try:
        import virtualenv
    except ImportError, e:
        raise RuntimeError("virtualenv is needed for bootstrap")

    bdir = options.bootstrap_dir
    if not os.path.exists(bdir):
        os.makedirs(bdir)
    bscript = "boostrap.py"

    options.virtualenv.script_name = os.path.join(options.bootstrap_dir,
                                                  bscript)
    options.virtualenv.no_site_packages = True
    options.bootstrap.no_site_packages = True
    print options.virtualenv.script_name
    call_task('paver.virtual.bootstrap')
    sh('cd %s; %s %s' % (bdir, sys.executable, bscript))
1199547
public function install()
    {
        $file = $this->getFilePath();

        $contents = $this->command->files()->get(SLEEPINGOWL_STUB_PATH.'/bootstrap.stub');
        $this->command->files()->put($file, $contents);
        $filePath = str_replace(base_path(), '', $file);
        $this->command->line("<info>Bootstrap file is [{$filePath}]</info>");
    }
511282
def install_theme(theme=None,
                monofont=None,
                monosize=11,
                nbfont=None,
                nbfontsize=13,
                tcfont=None,
                tcfontsize=13,
                dffontsize=93,
                outfontsize=85,
                mathfontsize=100,
                margins='auto',
                cellwidth='980',
                lineheight=170,
                cursorwidth=2,
                cursorcolor='default',
                altprompt=False,
                altmd=False,
                altout=False,
                hideprompt=False,
                vimext=False,
                toolbar=False,
                nbname=False,
                kernellogo=False,
                dfonts=False):

    
    # get working directory
    wkdir = os.path.abspath('./')

    stylefx.reset_default(False)
    stylefx.check_directories()

    doc = '\nConcatenated font imports, .less styles, & custom variables\n'
    s = '*' * 65
    style_less = '\n'.join(['/*', s, s, doc, s, s, '*/'])
    style_less += '\n\n\n'
    style_less += '/* Import Notebook, Markdown, & Code Fonts */\n'

    # initialize style_less & style_css
    style_less = stylefx.set_font_properties(
        style_less=style_less,
        monofont=monofont,
        monosize=monosize,
        nbfont=nbfont,
        nbfontsize=nbfontsize,
        tcfont=tcfont,
        tcfontsize=tcfontsize,
        dffontsize=dffontsize,
        outfontsize=outfontsize,
        mathfontsize=mathfontsize,
        dfonts=dfonts)

    if theme is not None:
        # define some vars for cell layout
        cursorcolor = stylefx.get_colors(theme=theme, c=cursorcolor)
        style_less = stylefx.style_layout(
            style_less,
            theme=theme,
            cellwidth=cellwidth,
            margins=margins,
            lineheight=lineheight,
            altprompt=altprompt,
            altmd=altmd,
            altout=altout,
            hideprompt=hideprompt,
            cursorwidth=cursorwidth,
            cursorcolor=cursorcolor,
            vimext=vimext,
            toolbar=toolbar,
            nbname=nbname,
            kernellogo=kernellogo)

    # compile tempfile.less to css code and append to style_css
    style_css = stylefx.less_to_css(style_less)

    # append mathjax css & script to style_css
    style_css = stylefx.set_mathjax_style(style_css, mathfontsize)

    # install style_css to .jupyter/custom/custom.css
    stylefx.write_final_css(style_css)

    # change back to original working directory
    os.chdir(wkdir)
1355763
protected function bootstrapContainer()
    {
        static::setInstance($this);

        $this->instance('app', $this);
        $this->instance('Bugotech\Foundation\Application', $this);

        $this->registerContainerAliases();
        $this->registerBinders();
        $this->registerContainerBase();

        $this->configure('app');
        $this->configure('paths');
    }
1161597
public function bootstrapPlugins()
    {
        $plugins = (array) $this->config->get('plugins.loaded');
        $plugins = array_filter($plugins, 'class_exists');

        $this->events->onTag('plugins', function () use ($plugins) {
            foreach ($plugins as $plugin) {
                $this->container->addServiceProvider($plugin);
            }
        });
    }
667392
public function bootstrap()
    {

        // setup autoloader
        require SERVER_AUTOLOADER;

        // register the application's class loaders
        $application = $this->getApplication();
        $application->registerClassLoaders();

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

        // try to load the system logger
        $this->systemLogger = $this->getLogger(LoggerUtils::SYSTEM);

        // try to load the profile logger
        if ($this->profileLogger = $this->getLogger(LoggerUtils::PROFILE)) {
            $this->profileLogger->appendThreadContext('servlet-engine-garbage-collector');
        }
    }
1217909
def apply_theme(self, themename, themeoptions):
        

        # push the existing values onto the Stack
        self._theme_stack.append(
            (self.theme, self.theme_options)
        )

        theme_factory = HTMLThemeFactory(self.app)
        theme_factory.load_additional_themes(self.get_builtin_theme_dirs() + self.config.slide_theme_path)

        self.theme = theme_factory.create(themename)
        self.theme_options = themeoptions.copy()
        self.templates.init(self, self.theme)
        self.templates.environment.filters['json'] = json.dumps

        if self.theme not in self._additional_themes:
            self._additional_themes.append(self.theme)
605947
public function boot() {

		// Load the locale functions files.
		add_action( 'after_setup_theme', [ $this, 'loadLocaleFunctions' ], ~PHP_INT_MAX );

		// Load framework textdomain.
		add_action( 'after_setup_theme', [ $this, 'loadTextdomain' ], 95 );

		// Overrides the load textdomain function for the 'hybrid-core' domain.
		add_filter( 'override_load_textdomain', [ $this, 'overrideLoadTextdomain' ], 5, 3 );

		// Filter the textdomain mofile to allow child themes to load the parent theme translation.
		add_filter( 'load_textdomain_mofile', [ $this, 'loadTextdomainMofile' ], 10, 2 );
	}
1298634
protected function bootstrapContainer()
    {
        static::setInstance($this);
        
        $this->instance('app', $this);
        
        $this->bootstrapEnvironment();
        
        $this->bindPathsInContainer();
        $this->registerContainerAliases();
        $this->registerCoreServices();
        $this->registerLogBindings();
        $this->registerTheme();
    }
67826
protected function bootstrap()
    {
        foreach (static::$bootstrappers as $bootstrapper) {
            try{
                $bootstrapper($this);
            }catch (\Exception $e){
                echo $e->getMessage();
            }
        }
    }