What is the intended use of the DEFAULT section in config files used by ConfigParser?

I found an explanation here by googling for “windows ini” “default section”. Summary: whatever you put in the [DEFAULT] section gets propagated to every other section. Using the example from the linked website, let’s say I have a config file called test1.ini: [host 1] lh_server=192.168.0.1 vh_hosts = PloneSite1:8080 lh_root = PloneSite1 [host 2] lh_server=192.168.0.1 vh_hosts …

Read more

Application configuration files [closed]

YAML, for the simple reason that it makes for very readable configuration files compared to XML. XML: <user id=”babooey” on=”cpu1″> <firstname>Bob</firstname> <lastname>Abooey</lastname> <department>adv</department> <cell>555-1212</cell> <address password=”xxxx”>ahunter@example1.com</address> <address password=”xxxx”>babooey@example2.com</address> </user> YAML: babooey: computer : cpu1 firstname: Bob lastname: Abooey cell: 555-1212 addresses: – address: babooey@example1.com password: xxxx – address: babooey@example2.com password: xxxx The examples were taken …

Read more

SSIS how to set connection string dynamically from a config file

First add a variable to your SSIS package (Package Scope) – I used FileName, OleRootFilePath, OleProperties, OleProvider. The type for each variable is “string”. Then I create a Configuration file (Select each variable – value) – populate the values in the configuration file – Eg: for OleProperties – Microsoft.ACE.OLEDB.12.0; for OleProperties – Excel 8.0;HDR=, OleRootFilePath …

Read more

What are the differences between set -g, set -ga and set-option -g in a .tmux.conf file?

set is the alias of set-option. set -g is used to set global options and -ga appends values to existing settings. From Tmux’s man page: With -a, and if the option expects a string or a style, value is appended to the existing setting. For example: set -g status-left “foo” set -ag status-left “bar” Will …

Read more

How can I store a binary file in a Kubernetes ConfigMap?

Binary ConfigMaps are now supported since Kubernetes version 1.10.0. From the readme notes: ConfigMap objects now support binary data via a new binaryData field. When using kubectl create configmap –from-file, files containing non-UTF8 data will be placed in this new field in order to preserve the non-UTF8 data. Note that kubectl’s –append-hash feature doesn’t take …

Read more

Equivalents of XDG_CONFIG_HOME and XDG_DATA_HOME on Mac OS X?

Comparing Apple’s documentation for the various paths to the XDG Base Directory specifications approximates to the following locations: XDG_CONFIG_HOME ▶︎ ~/Library/Preferences/ XDG_DATA_HOME ▶︎ ~/Library/ XDG_CACHE_HOME ▶︎ ~/Library/Caches/ Mapping XDG Base Directory Specification locations for “My App” on Mac OS X could look like this: XDG_CONFIG_HOME ▶︎ ~/Library/Preferences/name.often.with.domain.myapp.plist XDG_DATA_HOME ▶︎ ~/Library/My App/ XDG_CACHE_HOME ▶︎ ~/Library/Caches/My App/ …

Read more

How to set authorization in mongodb config file?

For mongod version 2.4 (ini config file) auth = true https://docs.mongodb.com/v2.4/reference/configuration-options/#auth For mongod versions 2.6+ (yaml config file) security: authorization: enabled https://docs.mongodb.com/v3.2/reference/configuration-options/#security.authorization https://docs.mongodb.com/v3.0/reference/configuration-options/#security.authorization https://docs.mongodb.com/v2.6/reference/configuration-options/#security.authorization

Correct implementation of a custom config section with nested collections?

I finally found this guy’s example. It was coded and worked right out of the box. http://manyrootsofallevilrants.blogspot.com/2011/07/nested-custom-configuration-collections.html I am going to paste the code here……only because I cannot stand it when someone says “Your answer is here”, and the link is dead. Please try his website first, and leave a “thank you” if it works. …

Read more