Questions tagged [configuration]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
49 views

Reading configuration variables in a Python project

I am new to python, in .NET we use web.config to store environment specific variables... I want to achieve the same for my python program (scraper) I have created .env file at the root of the project ...
2
votes
1answer
35 views

Determine dependency injection type at runtime from config

I have a .NET application with a .config file that has content like this: ...
2
votes
1answer
87 views

Systeminfo, a C++ class to retrieve system management data from the BIOS

Please review my System information class. Systeminfo can be used to retrieve system management data from the BIOS. This data is mostly strings. Is the code easy to understand and maintainable? Is ...
1
vote
1answer
59 views

How to avoid using exec() and eval() in Python

I wrote a script to execute a service on the Forestry TEP platform via its REST API. This service has certain input parameters, some of them are numerical values, other strings or files. The current ...
3
votes
1answer
33 views

IPython - Clipboard Extension

I often copy things from my terminal to other places (like Discord), and to make my workflow even easier I decided to use the IPython API to make an extension that has two magic functions ...
2
votes
0answers
208 views

Tkinter widget for managing .ini files through ConfigParser

A tkinter widget for reading/editing .ini files Dynamically generates a form based on the contents of the passed .ini file. Why make this? I made this as a backend for a larger project; I wanted my ...
2
votes
1answer
45 views

config files for different development environments (Production, Dev, Testing)

I am following a guide that specifies how to manage different configurations (DB_URI, LOGGER_NAME, etc...) per development environments. I create a config module ...
1
vote
1answer
69 views

Finding all alphanumerical words in a text line using std::string

Preliminaries I am working on a software that controls CAEN digitizer. The current step is to provide an ability to save/load configuration to/from an external source (hereafter - "config file&...
2
votes
0answers
103 views

SharedPreferences singleton wrapper

I was wondering wether my implementation of the PreferenceService below is thread safe or could cause memory leaks. Android Studio gives me the warning "Do not place Android context classes in ...
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 ...
1
vote
0answers
25 views

Providing JavaScript Configuration (Laravel config() style)

This may be better suited on Stackoverflow, in which case, please let me know and I will move it over... Background Consider the following file structure: ...
3
votes
2answers
67 views

Static global settings class with serializing

I have a class that is used for serializing and deserializing global application variables. I would like to know if there is anything that I can improve. I know I could inject a dependency to support ...
3
votes
2answers
160 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 ...
11
votes
6answers
3k 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 ...
3
votes
2answers
55 views

Script to create shell aliases

Can anybody find anything to pick apart in this script? ...
1
vote
1answer
26 views

PHP/Apache - Production/staging consts file path

Is there anything wrong with having a file path as an env variable and using that as-is in a require_once? ...
2
votes
1answer
73 views

Fetching configuration or default value

I have two code snippets, doing exactly the same thing and both get the job done: use defaults use from config Which is cleaner to use in golang and why? first option: ...
-2
votes
1answer
48 views

Is it ok to use subclasses to define just a couple of attributes? [closed]

I'm working with some code left from other developers. Here we have several projects we can work with. The project object is instantiated at the runtime. Then it used in other classes. There are no ...
9
votes
3answers
260 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 ...
4
votes
2answers
140 views

Simple INI file parser in Haskell

I've written a rudimentary parser for INI files: ...
1
vote
1answer
49 views

INI File configuration handler

I am currently working on a game, and I get the configuration in an .ini file, and I get information with this library https://github.com/benhoyt/inih I would like to improve the readability / ...
3
votes
1answer
51 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 ...
1
vote
1answer
62 views

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

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
74 views

Settings class implementation

I have a settings.txt file with the following format: ...
2
votes
1answer
111 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 ...
6
votes
1answer
141 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
141 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, ...
1
vote
1answer
131 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
126 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
73 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: ...
3
votes
1answer
166 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
38 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
59 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
1answer
103 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
744 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
201 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-...
2
votes
0answers
1k 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 ...
2
votes
1answer
89 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
79 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 ...
3
votes
1answer
1k 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
101 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
38 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
74 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
417 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
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
99 views

Configuration file parser

https://github.com/pixlark/vars-parser ...
3
votes
1answer
72 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
86 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
608 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
265 views

Parse custom configuration file in C

I have to parse a custom configuration file with this structure: ...