Tutorial by Examples: config

android { ... defaultConfig {...} buildTypes {...} productFlavors { demo { applicationId "com.example.myapp.demo" versionName "1.0-demo" } full { applicationId "com.example.myapp.full"...
The filesystem configuration file is located at config/filesystems.php. Within this file you may configure all of your "disks". Each disk represents a particular storage driver and storage location. Example configurations for each supported driver is included in the configuration file. So,...
Add a keystore using: keytool -genkey -v -keystore example.keystore -alias example -keyalg RSA -keysize 2048 -validity 10000 Note: This should be at root of project. Though not a hard requirement, it eases the file referencing Add a build.json with release/dev configuration for key...
Connect to Redis server and allow admin (risky) commands ConfigurationOptions options = new ConfigurationOptions() { EndPoints = { { "localhost", 6379}}, AllowAdmin = true, ConnectTimeout = 60*1000, }; Connectio...
To read default configuration properties: package com.example; public class ExampleApplication { private Properties getDefaults() throws IOException { Properties defaults = new Properties(); try (InputStream defaultsStream = ExampleApplication.class.getResou...
You can create and configure build types in the module-level build.gradle file inside the android {} block. android { ... defaultConfig {...} buildTypes { release { minifyEnabled true proguardFiles getDefaultProguar...
Download your preferred version from Lightbend with curl: curl -O http://downloads.lightbend.com/scala/2.xx.x/scala-2.xx.x.tgz Unzip the tar file to /usr/local/share or /opt/bin: unzip scala-2.xx.x.tgz mv scala-2.xx.x /usr/local/share/scala Add the PATH to ~/.profile or ~/.bash_profile or ...
Managing AWS resources that scale up and down runs into the limits of the static inventory host file, that's why we need something dynamic. And that's what the dynamic inventories are for. Let's start: Download these ec2.ini and ec2.py files to the your project folder: cd my_ansible_project wget...
Go in the Firebase console. Choose your project Click on the Database section on the left, and then select the Rules tab. If you would like to test your security rules before putting them into production, you can simulate operations in the console using the Simulate button in the upper right ...
Ensure that you install the correct npm dependencies (babel decided to split itself into a bunch of packages, something to do with "peer dependencies"): npm install webpack webpack-node-externals babel-core babel-loader babel-preset-react babel-preset-latest --save webpack.config.js: mo...
GHCi uses a configuration file in ~/.ghci. A configuration file consists of a sequence of commands which GHCi will execute on startup. $ echo ":set prompt \"foo> \"" > ~/.ghci $ ghci GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration...
If profiling your build shows significant time spend in Configuring Projects, the Configure on Demand option might improve your performance. You can enable Configure on Demand mode by editing $GRADLE_USER_HOME/.gradle/gradle.properties (~/.gradle/gradle.properties by default), and setting org.gradl...
As a root user: sudo nginx -s reload Ubuntu 14.04 example sudo service nginx reload Ubuntu 16.04 example sudo systemctl reload nginx Before reloading, it is a good idea to check config for syntax errors: sudo nginx -t Or sudo service nginx configtest
The following are the steps to start an Eclipse remote debugger. This is useful when the application is not started from a server instance within Eclipse. This feature is really powerful and can also help debugging code which resides in the test or production environment. Let's have a look at the se...
In the logging configuration file of your choice set the logging of the following packages to the levels shown.: # log the sql statement org.hibernate.SQL=DEBUG # log the parameters org.hibernate.type=TRACE There will probably be some logger specific prefixes that are required. Log4j config:...
[ alias ] ignored = ! git ls-files --others --ignored --exclude-standard --directory \ && git ls-files --others -i --exclude-standard Shows one line per file, so you can grep (only directories): $ git ignored | grep '/$' .yardoc/ doc/ Or count: ~$ git ignored | ...
Now you have aws cli installed, you'll have to configure it access your AWS resources. You can have multiple profiles like test, dev, prod, etc profiles. So let's assume you want to configure it for your test environment. aws configure --profile=test It will ask for following information: AWS A...
Then go into the mongo shell and initiate the replica set, like so: mongo > rs.initiate() PRIMARY> rs.add("mongo-a") PRIMARY> rs.add("mongo-b") PRIMARY> rs.add("mongo-c") PRIMARY> rs.setReadPref('secondaryPreferred')
The replica set will need an oplog user to access the database. mongo PRIMARY> use admin PRIMARY> db.addUser({user:"oplogger",pwd:"YOUR_PASSWORD",roles:[],otherDBRoles:{local:["read"]}}); PRIMARY> show users
This example illustrates how to configure Jersey so that you can begin using it as a JAX-RS implementation framework for your RESTful API. Assuming that you have already installed Apache Maven, follow these steps to set up Jersey: Create maven web project structure, in terminal (windows) execute...

Page 3 of 15