Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [configuration]

Configuration is the process of specifying the settings used for a system or application.

1
vote
1answer
46 views

ASP.net service that sends email whenever an entity is updated [on hold]

I have an ASP.net MVC5 project which involve different domain services, and one of it are EmailService which will send email if entity is updated. ...
3
votes
1answer
49 views

Settings class implementation

I have a settings.txt file with the following format: ...
2
votes
1answer
93 views

Create Apache2 virtualhost, Mysql db & user. CLI tool and GUI on top of it

Review for optimization, code standards, missed validation. What's in this version: Rewritten, instead of large complex script - few tools with each own task. Solid CLI tool and GUI script on top of ...
5
votes
1answer
57 views

Simple bash script creates apache2 virtualhost config for subdomain

Simple bash script to create apache2 virtualhost for localhost. Can be used for public subdomains on developer server with changes - "replace .localhost". Tested on Ubuntu, but should work where ...
4
votes
0answers
41 views

Wrapping argparse to use configuration file

I want to be able to both provide options through command line and from a configuration file. A single option could be served either by the user or by the configuration. But if is provided by both, ...
0
votes
1answer
70 views

Saving settings to Windows registry as a tuple

Regarding an application written in C++ using the Windows API. I'd like to store a user setting like the window position on program exit, to the Windows registry and retrieve settings like these on ...
1
vote
0answers
37 views

Java classes to load configuration data from a JSON file, with Scala tests

I want to implement classes in a project that will support the loading of configuration data from a JSON file. The JSON file is in the following form. Please be as critical as you can be. I'm a junior ...
7
votes
1answer
46 views

Perl one-liner for parsing host names from ssh config file

Here is the working code (intended to be executed with perl -e '<code>' ~/.ssh/config): Actual version: ...
2
votes
1answer
97 views

Editing a configuration file using C++ and Win32

I have made a small and simple tool for Windows using C++ and the Win32 API to allow people to change their resolution in Fortnite, without having to search for the configuration file and manually ...
1
vote
1answer
37 views

Database as a config and class structure to call it

I have question regarding best practices. I've decided instead having config inside either app.config or xml file to have my config file inside SQLite file database. This config will contain basic ...
3
votes
1answer
55 views

Read a single int from an optional .properties file

I am no newcomer to Java. One thing that confounds me is why it is so messy to load values from .properties files. I have an application where, if the .properties file is found, then the value if ...
4
votes
0answers
61 views

Dynamic setting names based on properties

In one of my frameworks that I use with many tools I have an ExpressionVisitor whose job is to resolve the exact property, it's declaring type and instance. I ...
1
vote
1answer
301 views

SSMTP configuration in Ubuntu 18.04 with Bash in my own system (one user)

This is how I configure the utility SSMTP that allows me to send mail via smtp protocol through a Google-Gmail proxy instead I'll have to manually configure an "...
6
votes
2answers
141 views

Minimalistic, self-contained class for reading a sectionless INI file

When sections are ignored and no writing capability is needed, an INI reader becomes quite simple to implement. Here is my attempt at reading a sectionless INI file without any non-...
1
vote
0answers
192 views

Elastic Beanstalk configuration using ebextensions container_commands combining leader_only and test

For our Django app running on AWS Elastic Beanstalk, we use a web-server/worker setup. The same code is deployed to the web-server and worker environments, and environment-specific configuration is ...
1
vote
1answer
36 views

Node.js configuration object based on environment variables

In the code below, I am building a NODE_ENV-sensitive config object from environment variables. ...
2
votes
1answer
68 views

Crontab datetime field pattern parser in Rust

@angus on Unix.SE implemented a tool in C to list upcoming cron jobs in response to a question. I've re-implemented the basic functionality (showing only the next cron job) in Rust, using ...
1
vote
1answer
303 views

Property file into configuration in Go

My first ever attempt at Go. Writing a small app. It takes a property file and uses it to populate a Config object. After adding the first property of the Config object (dateformat) I realised that ...
1
vote
0answers
50 views

Simple json config provider

I'm pretty new to this so constructive criticism is acceptable. I'm trying to find any way I can improve this system, all it does is take a string, determine if that string is a web address or a file ...
1
vote
1answer
32 views

JS/Node.js .env loader

I needed an environment values loader for a random node project, and instead of just using dotenv, decided to just make one myself and see how it'll turn out. To make this meaningful, here's a rough ...
4
votes
1answer
55 views

Minimalist config file reader/writer

I have written a simple configuration file reader and writer in D that is intended to parse string[string] associative arrays (the whole file is one array) and ...
3
votes
1answer
178 views

Socket server in c#

I'm writing a socket server for a project I am working on. I'm used to working in .NET FW, but I'm attempting to write this using .NET standard/core. Particularly, I am concerned about managing ...
5
votes
1answer
875 views

Reading a config file in python

We're wanting to read data in from a config file and provide it to other python modules in a helpful way. We have found a number of ways to accomplish this that range from the module being easy to ...
7
votes
1answer
63 views

Configuration file parser

https://github.com/pixlark/vars-parser ...
3
votes
1answer
55 views

Configuration modules

I started writing a new framework in C# which can be used for any server development. It contains the basic stuff, such as database, TCP and configuration. I did write the configuration last night and ...
4
votes
0answers
55 views

A config file handler I made for a game with Monogame

The reason I used fields instead of automatic properties is because I am using tryparse which can not use properties... I know the Title setting could have been an automatic property but I decided to ...
3
votes
1answer
583 views

XML design for parsing in C# [closed]

I am trying to design XML with configuration info so I can parse it into this code: ...
3
votes
2answers
118 views

Parse custom configuration file in C

I have to parse a custom configuration file with this structure: ...
1
vote
1answer
39 views

Nginx-WordPress conf

This is how I create am Nginx virtual host for a WordPress webapp. I did best to keep it as minimal as I can while having a working webapp. Please review it: ...
4
votes
1answer
60 views

A class to load, check and supply configuration data from a .py file

The callable class below loads configuration data, formats it into a form compatible with my application(from its human-friendly version), performs some important checking, and finally makes it ...
3
votes
1answer
184 views

Attempting to make my properties an enum based singleton

I was attempting to implement my first singleton using an enum, was a bit of a struggle for me and I'm not sure if its right and more importantly thread safe? Property provider enum: ...
2
votes
1answer
46 views

Changing php.ini with code in a LEMP stack on Debian systems

This is how I establish a Debian LEMP and use code to change php.ini directives, as part of php-fpm. Please review the way I change ...
4
votes
2answers
2k views

Configuration class in C#, reading an INI file

This class will load a file with INI configuration elements and cache them, it then has a method to get an item from the cache if it needs to. ...
3
votes
1answer
209 views

Work with configuration files holding encrypted credentials

The idea with this script is to provide a way to work with configuration (xml) files for PowerShell scripts. These files may contain credential information which needs to be secured; those would be ...
4
votes
1answer
67 views

INI configuration handler

Just to quickly explain what this is and what it does: it's a config handler that loads a file that has configuration data in INI format, key=value that sort of format. I then just store it all inside ...
1
vote
2answers
35 views

Detect resolution of X display and change font accordingly

This is my first attempt at anything functioning within elisp. This script is part of my configuration file that I use across multiple machines, one of which is hi-dpi and the other is not. To avoid ...
-1
votes
1answer
145 views

Configuration fallback for environment value [closed]

Is there a better practice for using a fallback value in a crate when a user environment value isn't present? My current thoughts are to treat it as an ternary condition and use a ...
6
votes
1answer
4k views

Read a .ini file

I got frustrated with C++ not being Python, so I put together a .ini file reader for myself. The last C++ code I posted, the feedback was that it's better to use free functions that private static ...
1
vote
0answers
277 views

Using 12-Factor Configuration Standard in a Python (Django) Project

I am currently learning practices from the 12-Factor guide using one of the Django apps that I am running in production. In short, after reading the theory and doing my best to understand the work ...
9
votes
2answers
641 views

Managing python application configuration in a key-value store

For a project we're working on, we need a central place to store the configurations for various applications (they're all headless services running in docker containers so local configuration files or ...
3
votes
1answer
469 views

Bash script to deploy a mongodb cluster on local machine

I recently wrote a small script to deploy a mongodb cluster on a single machine. The cluster is composed of : 3 configurations server that holds the same informations (they are replicas ) 2 shard ...
8
votes
3answers
386 views

Update MediaWiki settings with dynamic IP address

I'm running a MediaWiki instance from a home server where the public IP address is not guaranteed to remain static. The following script is meant to run at boot time to check if the IP address has ...
2
votes
2answers
378 views

Nested switch to return configuration for combination of 3 database types and 4 domains

I am currently doing a code review for a coworker. I have encountered something like this: ...
3
votes
0answers
31 views

aiohttp resources container

I want to simplify aiohttp routes/resources configuration (see this paragraphs). For this task I have written this _resources.py ...
3
votes
2answers
554 views

Cisco router configuration script generator in Java

I've written a basic program to generate a script that will automatically configure routing in a Cisco router. It reads an input file which contains the directly connected interfaces of a router. e....
3
votes
0answers
65 views

Initialising numerical properties from a text-based properties file

This is a Spring Framework-based datasource instantiator which reads its properties from the Spring Framework context, i.e. the values are initially all String from ...
4
votes
3answers
496 views

ini file parser in C++ - Take 2

Please review my ini file parser (and potentially some general config file formats). This code is a continuation of this review: ini file parser in C++ I have tried to incorporate all the ...
2
votes
1answer
3k views

Reading a config file outside of the publicly visible root directory

To enable my PHP scripts to access my MySQL database, I have a configuration file containing the name of the MySQL database, usernames, etc. In order to keep that information secure, I'm storing it ...
5
votes
1answer
152 views

Reimplementation of Laravel's config system

I am trying to create a config class identical to Laravel's but wanted to do it myself, to test my knowledge on the PHP language, can anyone help me improve it? Each config file is located in the /...
6
votes
1answer
66 views

Construct SQL query with a lot of parameters from configuration

I have implemented an interface through which one can select, update and remove items of the Account class in a MySQL database. For the three functions I'm ...