configuration-files

Equivalents of XDG_CONFIG_HOME and XDG_DATA_HOME on Mac OS X?

て烟熏妆下的殇ゞ 提交于 2019-12-02 16:40:38
I am planning to develop a cross-platform script. On Linux and other operating systems, it will store configuration in XDG_CONFIG_HOME and data files (specifically, downloaded plugins) in XDG_DATA_HOME . On Windows, it will use APPDATA for both (unless someone has a better idea). However, what would be the proper thing to do on Mac OS X? On my first glance through a handy Macbook's ~/Library directory, I saw Preferences and Application Support folders. I was originally planning to use those, but Preferences seems to just contain plists with reverse domain names like com.apple.foo.bar.baz.plist

Eclipse Java launch configuration file path

可紊 提交于 2019-12-02 16:05:45
I'm looking for a file where Eclipse stores its launch configurations. I'm doing some Java development in Ubuntu. One of the executables i'm developing requires an output from another executable as a argument to it. So say, the output of 'B' needs to be passed as a commandline argument to 'A'. In the Eclipse, I don't want to manually change the "Run Configuration" every time. Where does Eclipse store these configurations esp the arguments? I found a "eclipseArguments.txt" in the extras folder of the project but this isn't the same as the arguments I'm passing into the Run Configurations. The "

Finding out the name of the original repository you cloned from in Git

最后都变了- 提交于 2019-12-02 14:16:04
When you do your first clone using the syntax git clone username@server:gitRepo.git Is it possible using your local repository to find the name of that initial clone? (So in the above example, find gitRepo.git .) allait In the repository root, the .git/config file holds all information about remote repositories and branches. In your example, you should look for something like: [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = server:gitRepo.git Also, the Git command git remote -v shows the remote repository name and URL. The "origin" remote repository usually corresponds to

Custom Configuration Section can only be saved/modified while running as administrator?

馋奶兔 提交于 2019-12-02 12:42:04
问题 I wrote a custom configuration section, collection, and element to add/modify to my app.config. All seems to be going well and it works perfectly running in Visual Studio. However, when I install the application and it comes time to save the new data to the custom config section, the following exception is thrown: System.Configuration.ConfigurationErrorsException: Unable to save config to file '{path to config file}' The interesting part is that if I run the application in administrator mode,

Internationalization on CodeIgniter config files?

假如想象 提交于 2019-12-02 09:45:24
I'm trying to do something like: $config['first_link'] = 'lang:pagination_first_link'; $config['prev_link'] = 'lang:pagination_prev_link'; $config['next_link'] = 'lang:pagination_next_link'; $config['last_link'] = 'lang:pagination_last_link'; Is there a simple way to do this ? This configuration is specific to the Pagination config file, but the question is generic. You have language folders for that. If you take a look at system/language/english, you can see how CodeIgniter deals with internationalization. For your example, you would create a file in system/language/english, called pagination

Custom Configuration Section can only be saved/modified while running as administrator?

我怕爱的太早我们不能终老 提交于 2019-12-02 04:20:27
I wrote a custom configuration section, collection, and element to add/modify to my app.config. All seems to be going well and it works perfectly running in Visual Studio. However, when I install the application and it comes time to save the new data to the custom config section, the following exception is thrown: System.Configuration.ConfigurationErrorsException: Unable to save config to file '{path to config file}' The interesting part is that if I run the application in administrator mode, everything works fine. Is there any reason it would only work as administrator? EDIT: I should note

Java Properties: How to keep non key=value lines?

放肆的年华 提交于 2019-12-02 03:34:59
I am trying to modify a config file in Java using Properties. I read, write and modify the lines successfully using Properties.store, load and setProperty, but I noticed that after doing such operation the file is overwritten and thus I loose al the lines in the config file that are not key-value pairs. Namely, I loose the comments. Is there a way to keep such lines using java.util? Placing a prefix in each line is not a problem. I know how to do it 'manually' reading line by line; I'am asking instead for an alternative I don't think it is possible. Note that properties also don't promise that

Hide octave-workspace file from home directory

情到浓时终转凉″ 提交于 2019-12-02 03:24:00
问题 I would like to change the file octave-workspace from my home directory, simply renaming it to .octave_workspace . How can I manage to make octave recognize a workspace file (or create a new one) with this new name? Thanks. 回答1: That is the purpose of the octave_core_file_name() function. Add the following to your .octaverc file: octave_core_file_name (".octave-workspace") 回答2: OSX Solution: You can use chflags To hide a file from Finder: chflags hidden /Path/To/File To unhide: chflags

Java Properties: How to keep non key=value lines?

末鹿安然 提交于 2019-12-02 03:22:15
问题 I am trying to modify a config file in Java using Properties. I read, write and modify the lines successfully using Properties.store, load and setProperty, but I noticed that after doing such operation the file is overwritten and thus I loose al the lines in the config file that are not key-value pairs. Namely, I loose the comments. Is there a way to keep such lines using java.util? Placing a prefix in each line is not a problem. I know how to do it 'manually' reading line by line; I'am

Append or modify keys in conf files using sed/bash one-liner

﹥>﹥吖頭↗ 提交于 2019-12-02 03:12:44
问题 I often have to modify files such as sysctl.conf , and I'm familiar with using sed to replace existing values. Is there a way to append the new key/value pair to the file if sed wasn't able to replace it? For instance, using this example: modify config file using bash script sed -c -i "s/\($TARGET_KEY *= *\).*/\1$REPLACEMENT_VALUE/" $CONFIG_FILE How could I add the $TARGET_KEY = $REPLACEMENT_VALUE new line to $CONFIG_FILE using the same sed expression with slight changes? And on a related