Questions tagged [configuration]

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

Filter by
Sorted by
Tagged with
75
votes
8answers
223k views

Getting/setting default values from my App.config

Imagine that I need a color palette for my Winforms application to have a consistent look. What I did was create a static helper class and helper methods that I can call from anywhere in my code, and ...
14
votes
4answers
421 views

Rolling my own Configuration with UI

The Rubberduck Saga continues as I find a need to roll my own configuration. Since the program is really a *.dll and available to several host applications, using app.config is not an option. I ...
12
votes
3answers
11k views

ini file parser in C++

Please review my ini file parser (and potentially some general config file formats). The data structure used is a section, see below. Does that seem a good approach? I was wondering about the name. ...
11
votes
6answers
6k views

Parse a simple key=value config file in C

Write a program that should read a file formatted strictly like this below: $ cat sample bingo=2 bingo2=939 bingo3=text The left and right side of ...
9
votes
3answers
2k views

Storing a Ruby app's settings

I have used code which looks a little like this in an app I'm working on: ...
9
votes
3answers
268 views

Toggle any application feature ON or OFF

When testing or debugging applications it'd be often useful to be able to run it without certain features like committing things to the database, saving files, sending emails, reading files, executing ...
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 ...
8
votes
3answers
572 views

Abstracted Interface for Settings

I just learned about the beauties and wonders of interfaces and I realized how I could fix some code that has been bothering me because of its duplication. This is ...
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 ...
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 ...
7
votes
1answer
82 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: ...
7
votes
1answer
123 views

Configuration file parser

https://github.com/pixlark/vars-parser ...
7
votes
1answer
140 views

Configuration concept and implementation

I created an API to load, save and read user configuration in my application. I've a Configuration interface which provides the basic methods to read, save and read ...
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 ...
6
votes
4answers
2k views

Ini file parser project

I would appreciate any opinions and critiques anyone has on my code. My code allow you to read a ini file. parser.c ...
6
votes
1answer
259 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 ...
6
votes
3answers
920 views

Loading Configurations from plist into singleton

In my iOS application, I've created a singleton class that reads a configuration plist file and provides accessor methods to easily retrieve the values: ...
6
votes
2answers
214 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-...
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 ...
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 ...
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 ...
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: ...
6
votes
1answer
138 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 ...
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 ...
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 /...
5
votes
2answers
185 views

Reading configuration from a file for video rendering

I haven't done anything similar so I got nothing to go on. The point was to load everything from the file and I thought a struct would be a good choice to be the ...
4
votes
2answers
537 views

SSH passing your Public key to all the users on remote host

I've grown tired of typing my password back and forth to all the hosts you connect to, i want to be able to jump to every single user on all the hosts with ease. So i've made this script with a ...
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 ...
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 ...
4
votes
1answer
532 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 ...
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
2answers
728 views

Reusable configuration reader for Java

This is related to a question I posted on Stack Overflow. The consensus was to use JAXB, which is what I did. One of the requirements was that it needed to work with legacy XML configuration files. ...
4
votes
2answers
173 views

CGI script that reads or writes its height and weight configuration

UPDATES: I'm looking for an answer that can answer the questions listed in the post. Moreover, this answer will not only continue my way of thinking, but also give feedback based on it. It's just like ...
4
votes
2answers
183 views

Simple INI file parser in Haskell

I've written a rudimentary parser for INI files: ...
4
votes
1answer
100 views

Sanitize and build data structure from Consul configuration

I have a piece of working code that takes some strings from Consul configuration exports, sanitizes them a little and converts them into valid json and/or hocon structures. While I am iterating over ...
4
votes
1answer
674 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
2answers
622 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) ...
4
votes
1answer
1k views

Parse a text file containing settings for neuroimaging software

I would like to refactor a large Python method I wrote to have better practices. I wrote a method that parses a design file from the FSL neuroimaging library. Design files are text files with ...
4
votes
1answer
117 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 ...
4
votes
1answer
96 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 ...
4
votes
1answer
103 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 ...
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
2answers
85 views

Creating a device configuration

During the test process of a device, there is a procedure that sets a device in a state in which it is ready to be tested (typically by writing default measure parameters, 3G connection parameters and ...
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 ...
4
votes
0answers
228 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, ...
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
166 views

Function to get current value or default from a string of two values

I have SQL scripts that I want to be executable directly in the editor (like DataGrip or SSMS) and also in automated integration tests. However, in each use-case they require different environment and ...
3
votes
2answers
72 views

Script to create shell aliases

Can anybody find anything to pick apart in this script? ...
3
votes
1answer
53 views

Opening YouTube videos according to chakra cycles

I'm learning how to write code in Python. This code makes an .ini that saves different cycles adding one new operation to the previous cycle. It starts at 1;1, saves that it has run 1 cycle and will ...