Questions tagged [configuration]

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

Filter by
Sorted by
Tagged with
5
votes
1answer
4k 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
123 views

Configuration file parser

https://github.com/pixlark/vars-parser ...
3
votes
1answer
74 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
91 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
644 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
515 views

Parse custom configuration file in C

I have to parse a custom configuration file with this structure: ...
1
vote
1answer
42 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
64 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
2k 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
70 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
5k 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. ...
4
votes
1answer
671 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
102 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
44 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
549 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
137 views

Nginx configuration, with global defaults and support for a PHP site

The following code is an Nginx default conf file. The conf file itself includes another server block which holds a site's configuration. While this combination ...
6
votes
1answer
9k 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
461 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 ...
8
votes
2answers
1k 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
684 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
474 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
389 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
34 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
1k 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
68 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
1k 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
6k 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
159 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
70 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 ...
0
votes
1answer
383 views

Reading and writing configuration file

I am working on my first open source project, and I have read a lot to get the desire coding style and I think I got it. But before go further I want to get reviews about my code. This script is not ...
3
votes
1answer
105 views

Loading configuration properties from XML

I would like a review of the transformation of the first method to the updated one below: ...
1
vote
0answers
149 views

Simple INI and command-line parsing, functional programming edition

I'm in the beginning stages of rewriting the model layer of my VBA Sync Tool in F#, to better learn functional programming. So far I've defined: A public ...
2
votes
2answers
81 views

Simple Configuration System

I have created a simple ConfigManager in C# that loads each line of a file. If the line contains = then it gets the before ...
4
votes
2answers
621 views

Retrieve Internet explorer proxy settings from the registry

I just re-wrote a library to easily retrieve the proxy settings of Internet Explorer (self answered SO question: https://stackoverflow.com/q/41764614/3207406). Git repository GoDoc (with an example) ...
2
votes
0answers
636 views

Configure Webpack to handle cache-busting

I'm not very familiar with webpack, and I was very afraid that what I implemented for cache busting would break something. What I have seems to work. When I open up the built folder, under ...
3
votes
1answer
104 views

Python configuration module for a web framework

I'm currently writing a web framework and I wanted to add a configuration module for reading environment variables and a configuration toml file. Here is the code. The comment in the ...
1
vote
1answer
37 views

Overriding default animation parameters with custom values

Using JavaScript ES5, I would like to know if you could suggest me a more "elegant" and succinct way to overriding defaults variable when User pass custom values. In the following example, an ...
1
vote
4answers
95 views

Creating enchantment objects based on configuration

I'm searching a way to literally shorten my code. For the moment my code is this; ...
2
votes
1answer
147 views

Regex detection for Puppet configuration

I've got a PR to add a feature to a Ruby application (Puppet) to allow Regex detection. Right now, the method only does comparison on exact string matching: ...
6
votes
1answer
567 views

Parsing a key=value config file for a Python FreeCell game

I'm new to Python, and my first serious project was a FreeCell game. The game works, with lots of options to combine moves, save games, load them, etc. But I skimped on some specifics of Python. In ...
4
votes
2answers
98 views

Node.JS module to retrieve configuration from environment variables

I don't like the idea of sprinkling process.env all over the place and wanted to abstract it out a bit. I'm new to Node and know there must be a better way to do a few things. Not repeat the name 4 ...
4
votes
3answers
3k views

Reading properties from file during standalone application startup

I've a standalone Java application, which basically starts and manages two socket servers. I'd like to configure server ports in a .properties file using the ...
2
votes
2answers
933 views

Config file to struct in C

I have a struct OPTS which contains a few chars and char[]s. I also have a file opts.cnf ...
6
votes
2answers
667 views

Small part of an INI parser

I know there are probably thousands of INI parser implementations in C. Nevertheless I want to implement one to learn the art of parsing grammar. I just wrote a small piece of the INI parser and ...
1
vote
2answers
5k views

Set ENV variables for Ruby on Rails

I've followed the steps from this video from railscasts for setting ENV variables. This is my configuration: config/database.yml ...
2
votes
0answers
198 views

libconfini (shared library)

I recently wrote a small INI parsing library. The code is also on GitHub, with documentation. I would like to have opinions, suggestions, and critiques. confini.h ...
2
votes
1answer
149 views

C# XML Config File

I'm trying to find a simple, clean and fast way to implement an XML config file in C# without any 3rd party tools. It also should replace this restricted ...
8
votes
1answer
2k views

Script to send push notifications using email, Pushbullet, or Pushover

I have built a tiny script to send out push notifications. I would be glad to receive general suggestions / feedback. My main problem is that the only security offered is coming from the OS ...
1
vote
2answers
116 views

Webdriver-based test that uses configuration parameters from a database [closed]

I am writing automated functional tests for my application. To interact with the application, I use the SQL database to retrieve data and validate data. One of the challenges that I'm facing is that ...
6
votes
2answers
2k views

Simple ini file parser

The below is a C++ parser for a reasonably simple INI grammar (although my understanding is that there isn't an official spec as such). My grammar is roughly: ...