Tutorial by Examples: config

Inside a Project configuration, you can Create build configuration: Manually Provide a Name and a Description. The Build Configuration ID is generated from the ProjectName, and the Build Configuration Name's. Once your configuraion is Saved, you can specify a Version Control Settings. This will ...
Consider the following Java classes: class Foo { private Bar bar; public void foo() { bar.baz(); } } As can be seen, the class Foo needs to call the method baz on an instance of another class Bar for its method foo to work successfully. Bar is said to be a dependency for Foo sin...
The same examples as shown above with XML configuration can be re-written with Java configuration as follows. Constructor injection @Configuration class AppConfig { @Bean public Bar bar() { return new Bar(); } @Bean public Foo foo() { return new Foo(bar()); } } Property in...
Dependencies can be autowired when using the component scan feature of the Spring framework. For autowiring to work, the following XML configuration must be made: <context:annotation-config/> <context:component-scan base-package="[base package]"/> where, base-package is th...
Constructor injection through Java configuration can also utilize autowiring, such as: @Configuration class AppConfig { @Bean public Bar bar() { return new Bar(); } @Bean public Foo foo(Bar bar) { return new Foo(bar); } }
Git config allows you to customize how git works. It is commonly used to set your name and email or favorite editor or how merges should be done. To see the current configuration. $ git config --list ... core.editor=vim credential.helper=osxkeychain ... To edit the config: $ git config &lt...
[Service] # empty exec prevents error "docker.service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing." ExecStart= ExecStart=/usr/bin/dockerd -H fd:// --log-driver=syslog This enables syslog logging for the docker daemon. The file sho...
This is a porting of set up sourced from DigitalOcean's tutorial of How To Serve Flask Applications with uWSGI and Nginx on Ubuntu 14.04 and some useful git resources for nginx servers. Flask Application This tutorial assume you use Ubuntu. locate var/www/ folder. Create your web app folder m...
Create a file webpack.config.js in the root of your working directory Filename: webpack.config.js module.exports = { entry: __dirname + "/src/index.jsx", devtool: "source-map", output: { path: __dirname + "/build", filename: "bund...
Create a file .babelrc in the root of our working directory Filename: .babelrc { "presets": ["es2015","react"] }
@Configuration @EnableAsync public class ApplicationConfiguration{ @Bean public TaskExecutor getAsyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(2); executor.setThreadNamePrefix("executor-task...
XML Example The below configuration configures two appenders (log output). The first logs to standard system output (console) and the other logs to file. In this example, the location of the file can be set statically in configuration (appender file) or dynamically via maven filtering feature (<...
In mysqld.cnf or equivalent: [mysql] prompt = '\u@\h [\d]> ' This achieves a similar effect, without having to deal with .bashrc's.
In the build.sbt file (or where the project is defined if it is in another location), add the following setting: scalacOptions += "-language:experimental.macros" For instance, a project might be defined like this: lazy val main = project.in(file(".")) // root project .se...
To externalise a distributed systems configuration Spring Cloud Config provides server and client-side support needed for externalising and centralising your configuration. To get started quickly you could use Spring Initializr to bootstrap your server. Add the Config Server dependency to automatic...
To get started quickly you could use Spring Initializr to bootstrap your client. Add the Config Client to automatically generate a project with the needed dependencies. Or you could add the dependency manually to an existing Spring Cloud application. <dependency> <groupId>org.spri...
To setup JVM options inside elastic beanstalk, your bundle file must be like this: -bundle.zip |--.ebextensions //do not forget the dot at the beginning of the name |--jvm.config |--java_app.jar And, the jvm.config file must be set like this: option_settings: ...
The most sensitive information of a WordPress install is stored in the wp-config.php file. If a hacker gets access to this file then they have total control of your website. By default wp-config.php is stored in the WordPress install folder. To make this file harder to steal you can move it out of ...
You need to get some details from your OAuth provider of choice. We'll be looking at Google, but ASP.NET is also set up to allow out-the-box use of Twitter, Facebook and Microsoft (obviously). You'll want to go to the Google developer console (https://console.developers.google.com/) and create a pr...
If you are behind a proxy and need to connect to the internet, you can use: export http_proxy="http://username:password@host:port/" For configuring the proxy inside apt-get: cd /etc/apt/apt.conf.d Create a file named 10proxy: sudo nano 10proxy Without authentication add the fol...

Page 10 of 15