Tutorial by Examples: conf

nginx consists of modules which are controlled by directives specified in the configuration file. Simple Directives A simple directive consists of the name and parameters separated by spaces and ends with a semicolon (;). Block Directive A block directive has the same structure as a simple direc...
Create a YAML file in the config/ directory, for example: config/neo4j.yml The content of neo4j.yml can be something like the below (for simplicity, default is used for all environments): default: &default host: localhost port: 7474 username: neo4j password: root development: ...
In Drupal 7 and lower, your configuration is probably stored using the Features module. To update a feature with changes from the databases use this command: drush features-update [feature-name] // e.g. drush features-update content_type_news You can also use this shorthand: drush fu [feature-n...
You can write the default protocol implementation for a specific class. protocol MyProtocol { func doSomething() } extension MyProtocol where Self: UIViewController { func doSomething() { print("UIViewController default protocol implementation") } } class M...
Each of Laravel's queue drivers are configured from the config/queue.php file. A queue driver is the handler for managing how to run a queued job, identifying whether the jobs succeeded or failed, and trying the job again if configured to do so. Out of the box, Laravel supports the following queue ...
This example shows how to configure multiple environments with different Dependency Injection configuration and separate middlewares in one Startup class. Alongside of public void Configure(IApplicationBuilder app) and public void ConfigureServices(IServiceCollection services) methods one can use C...
Database configuration of a rails project lies in a file config/database.yml. If you create a project using rails new command and don't specify a database engine to be used then rails uses sqlite as the default database. A typical database.yml file with default configuration will look similar to fol...
Steps to create Hello Spring: Investigate Spring Boot to see if that would better suit your needs. Have a project set up with the correct dependencies. It is recommended that you are using Maven or Gradle. create a POJO class, e.g. Employee.java create a XML file where you can define your clas...
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...
A way to use confirm() is when some UI action does some destructive changes to the page and is better accompanied by a notification and a user confirmation - like i.e. before deleting a post message: <div id="post-102"> <p>I like Confirm modals.</p> <a data-dele...
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...
If you are using multiple namespaces that may have same-name classes(such as System.Random and UnityEngine.Random), you can use an alias to specify that Random comes from one or the other without having to use the entire namespace in the call. For instance: using UnityEngine; using System; Ran...
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...

Page 3 of 17