Creates a new ohai and configures it.

 === Return
 ohai(Ohai::System):: configured ohai
189223
def create_ohai
      ohai = Ohai::System.new
      ohai.require_plugin('os')
      ohai.require_plugin('hostname')
      return ohai
    end
187551
def configure(cls, global_, key, val):
        
        # first retrieve current configuration
        scope = 'global' if global_ else 'local'
        if scope not in cls._conffiles:
            cls._conffiles[scope] = {}
        config = cls._conffiles.get(scope, {})
        # apply modification to fields
        cls._set(scope, key, val)
        conf_file = cls.home_config if global_ else cls.local_config
        # save configuration to file
        cls.save(os.path.expanduser(conf_file), config)
260830
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public ArtifactoryConfiguration newConfiguration(@RequestBody ArtifactoryConfiguration configuration) {
        return configurationService.newConfiguration(configuration);
    }
440890
public static synchronized SystemConfiguration createSystemConfiguration()
            throws IOException {
        if (self == null) {
            if (getenv(BELFRAMEWORK_HOME_ENV_VAR) == null) {
                String err = MISSING_SYSCFG;
                err = err.concat(": environment variable not set ");
                err = err.concat(BELFRAMEWORK_HOME_ENV_VAR);
                throw new IOException(err);
            }
            self = new SystemConfiguration();
        }
        return self;
    }
857249
def create(options = {})
      query = { 
        query: {
          username: options[:username],
          password: options[:password],
          attributes: hash_to_base64_json(options[:attributes])
          }
        }
      new_options = default_options_to_merge_with.merge(query)
      self.class.post("/#{@api_ver}/users", new_options)
    end
1208857
private function createTerra()
    {
        $terra = new Terra();
      // Get config from env variables or files.
        if ($config_env = getenv('TERRA')) {
            $config_env = Yaml::parse($config_env);
            $config = new Config($config_env);
        } else {
            $fs = new Filesystem();

            $user_config = array();
            $user_config_file = getenv('HOME').'/.terra/terra';
            if ($fs->exists($user_config_file)) {
                $user_config = Yaml::parse($user_config_file);
            }

            $project_config = array();
            $process = new Process('git rev-parse --show-toplevel');
            $process->run();
            if ($process->isSuccessful()) {
                $project_config_file = trim($process->getOutput()).'/terra.yml';
                if ($fs->exists($project_config_file)) {
                    $project_config = Yaml::parse($project_config_file);
                }
            }

            $config = new Config($user_config, $project_config);
        }
        $terra->setConfig($config);

        return $terra;
    }
673090
def configure(conf)
      super
      @host = conf['host']
      @port = conf['port']
      @token = conf['token']
      @hostname = conf['hostname'] || Socket.gethostname.split('.').first

      # Determine mapping of record keys to syslog keys
      @mappings = {}
      SYSLOG_HEADERS.each do |key_name|
        conf_key = "#{key_name}_key"
        @mappings[key_name] = conf[conf_key] if conf.key?(conf_key)
      end
    end
318064
def create(self):
        
        data = values.of({})

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return ConfigurationInstance(self._version, payload, )
1098571
def create(self, **kwargs):
        
        tmos_v = self._meta_data['bigip']._meta_data['tmos_version']
        if LooseVersion(tmos_v) == LooseVersion('11.5.4') or LooseVersion(
                tmos_v) == LooseVersion('12.1.1'):
            if 'uri' in self._meta_data:
                error = "There was an attempt to assign a new uri to this " \
                        "resource, the _meta_data['uri'] is %s and it should" \
                        " not be changed." % (self._meta_data['uri'])
                raise URICreationCollision(error)
            self._check_exclusive_parameters(**kwargs)
            requests_params = self._handle_requests_params(kwargs)
            self._check_create_parameters(**kwargs)

            # Reduce boolean pairs as specified by the meta_data entry below
            for key1, key2 in self._meta_data['reduction_forcing_pairs']:
                kwargs = self._reduce_boolean_pair(kwargs, key1, key2)

            # Make convenience variable with short names for this method.
            _create_uri = self._meta_data['container']._meta_data['uri']
            session = self._meta_data['bigip']._meta_data['icr_session']
            # We using try/except just in case some HF will fix
            # this in 11.5.4

            try:
                response = session.post(
                    _create_uri, json=kwargs, **requests_params)

            except HTTPError as err:
                if err.response.status_code != 404:
                    raise
                if err.response.status_code == 404:
                    return self._return_object(self._meta_data['container'],
                                               kwargs['name'])
            # Make new instance of self
            return self._produce_instance(response)
        else:
            return self._create(**kwargs)
1145334
public static function create($uri, $base_uri = null): self
    {
        return new self(Uri::create($uri, $base_uri));
    }
270199
def create(self):
        
        if not self.exists():
            # create new empyt config file based on template
            self.config.add_section("lametric")
            self.config.set("lametric", "client_id", "")
            self.config.set("lametric", "client_secret", "")

            # save new config
            self.save()

            # stop here, so user can set his config
            sys.exit(
                "An empty config file '{}' has been created. Please set "
                "the corresponding LaMetric API credentials.".format(
                    self._filename
                )
            )
31618
public static function create() {
		$app = new CLIApplication('Dachi', Kernel::getVersion(true));
		
		$commands = array(
			new \Dachi\Core\Console\Command\TestCommand(),
			new \Dachi\Core\Console\Command\CreateCommand(),
			new \Dachi\Core\Console\Command\DocumentCommand(),

			/** run under 'dachi:all' **/
			new \Dachi\Core\Console\Command\RouteCommand(),
			new \Dachi\Core\Console\Command\ModulesCommand(),
			new \Dachi\Core\Console\Command\ConfigCommand(),

			new \Dachi\Core\Console\Command\AllCommand()
			/** end run under 'dachi:all' **/
		);

		foreach($commands as $commandClass) {
			$app->add($commandClass);
		}

		$app->run();
	}
559579
def setup_configuration name:, options: {}
      @configuration = configuration.to_h.merge(
        gem: {
          label: name.titleize,
          name: name,
          path: name.snakecase,
          class: name.camelcase,
          platform: "Gem::Platform::RUBY",
          url: Git.github_url(name),
          license: "MIT"
        },
        generate: options.symbolize_keys
      )
    end
203411
def install_configure_in(base)
      base.instance_eval <<-EOF
        # Configuration class for host module
        #
        #{base.name}::Configuration = Class.new(Configurations::Configuration)

        # The central configure method
        # @params [Proc] block the block to configure host module with
        # @raise [ArgumentError] error when not given a block
        # @example Configure a configuration
        #   MyGem.configure do |c|
        #     c.foo = :bar
        #   end
        #
        def self.configure(&block)
          semaphore.synchronize do
            fail ArgumentError, "configure needs a block" unless block_given?
            include_configuration_type!(#{base.name}::Configuration)

            set_configuration!(&block)
          end
        end

        # A reader for Configuration
        #
        def configuration
          semaphore.synchronize do
            return @configuration if @configuration

            if @configuration_defaults
              include_configuration_type!(#{base.name}::Configuration)
              set_configuration! { }
            end
          end
        end


        private

        # Sets the configuration instance variable
        #
        def self.set_configuration!(&block)
          @configuration = #{base.name}::Configuration.__new__(
                                                      configuration_options,
                                                      &block
                                                    )
        end

        @semaphore = Mutex.new
        def self.semaphore
          @semaphore
        end

      EOF
    end
702482
protected function createConnection()
  {
      $config = $this['config'];
    /*
     * Attaches the Connection instance to the container
     */
    $this->applyInstance('connection', new Connection(
        $config['app.connection.username'],
        $config['app.connection.oauth'],
        $config['app.connection.ircServer.hostname'],
        $config['app.connection.ircServer.port']
      )
    );
  }
1236918
protected function createServer()
    {
        $config = $this->getServerInitConfig();
        $this->swooleServer = new \swoole_server($config['host'], $config['port'], $config['mode'], $config['sockType']);
    }
997921
protected function createConfiguration()
    {
        // check if a phpbu xml/json config file is configured
        $phpbuConfigFile = $this->configProxy->get('phpbu.phpbu');
        if (!empty($phpbuConfigFile)) {
            // load xml or json configurations
            $configLoader  = PhpbuConfigLoaderFactory::createLoader($phpbuConfigFile);
            $configuration = $configLoader->getConfiguration($this->runner->getFactory());
        } else {
            $this->validateConfig();
            // no phpbu config so translate the laravel settings
            $translator    = new Translator();
            $configuration = $translator->translate($this->configProxy);
            $configuration->setSimulate((bool) $this->option('phpbu-simulate'));
            // in laravel mode we sync everything using the Laravel Filesystems
            PhpbuFactory::register('sync', 'laravel-storage', '\\phpbu\\Laravel\\Backup\\Sync\\LaravelStorage');
        }
        return $configuration;
    }