LF configuration of VSCode on Ubuntu and Windows - reactjs

My projects that are programmed in Ubuntu, where VSCode is configured in LF work perfectly.
When I clone on Windows even with the .editorconfig configured only for lf, it modifies the entire code of a file when saving, needing to commit the files again just because it reconfigured the lf.
The problem is that I have already configured editorconfig, vscode, git global to lf and nothing solved, whenever saved it modifies the file.
I use eslint, prettier and editorconfig in the code. I wanted a solution to be able to program on both operating systems.

When installing Git for Windows it asks you how you want to handle this situation (line endings). Usually it gives 3 options. Once you choose one, every time you clone a repo it applies that option.
So, say the repo uses LF and you specified that you want to use CRLF during your Git installation, it will make all the files CRLF.
I am not sure if that option is configurable post install. You can uninstall Git and reinstall it and you'll see that option. From there, if you Unix is your primary development environment I would say choose the option that says "Check out Unix style, commit Unix style".

Related

Spotless reformats all java files of a directory to LF on windows?

we are using the spotless plugin within a java multi module maven project and for two modules (and all its sub modules) mvn spotless:check suggests changing the line ending from CRLF to LF on all of our windows machines.
we have the .gitattributes file configured with core.autocrlf=true and the spotless is not configured to handle line endings in another way then default.
For all other modules beside the named two modules it is working perfectly fine, only those two modules are causing troubles. There is nothing (obvious) which is changing the configuration only for those modules. Freshly checked out, all files are encoded as CRLF, so this looks correct to me.
I also checked, that there are no special non-printed characters like described in
Git checking out a specific file only with LF line endings on Windows despite core.autocrlf=true
Does anyone has other hints what could cause this problem (on directory/module base)?

Trying to set up a deployment package for silent uninstall of Notepad++ and installation of a new version

All of the below on Windows 7 Machines and regarding Notepad++ installation / uninstallation:
Uninstaller
When I try to uninstall using the command
if exist "C:\Program Files (x86)\Notepad++\uninstall.exe" "C:\Program Files (x86)\Notepad++\uninstall.exe" /S
there are some files left in the Notepad++ file afterward. Notepad++'s uninstaller, when run manually, prompts halfway through the uninstall asking "Do you want to keep your custom settings" and I'm thinking that the command may be choosing to answer this "Yes" by default. I'm wondering if there's an easy way to have it choose "No" here instead. If not, I can probably just delete the folder.
Installer
I'm running the installation using the 32 bit default .exe file from Notepad++ in a deployment package compiled in Lansweeper. What I'm noticing is that presently, the package executed the CMD uninstall command, but stops short of installing the new version. For reference, I've been using an installed 7.3.2 and the installer for 7.3.3 to test, so that it should uninstall the 7.3.2 and install 7.3.3 by the end of the package.
I'm wondering if the fact that there are a number of options in the Notepad++ installer could be the culprit here. If it is better to install via command line or to include some sort of configuration file I'm fine with either option, just not especially well-versed in doing them.
Notepad++ Installer requests the following during installation:
Select a language - should choose English
Choose Components - want to be able to customize selection of localization / auto complete / themes / context menu / plugins / auto update according to our requirements
Choose Components - Don't use Appdata, Allow Plugins to be loaded from Appdata, and Create Shortcut on Desktop should all remain unchecked
Run Notepad ++ - should be unchecked (checked by default)
All the other components that I can see are straightforward Next / I Agree buttons.
I'm hoping someone may be able to make helpful suggestions here as I've not had any experience with configuring silent installs with specific parameters. Notepad++ doesn't seem to have its own MSI and I won't use a third party one so some sort of batch or configuration file or flagging options in cmd if possible are the preferable options.
Please let me know if there's any additional information I can provide that may be helpful.
Thank you in advance.
If you just need to update to the latest version. It is quite simple. Run the newest installer again and it will automatically update older versions.
See
Silent Install Notepad++
I'm using the command:
start /wait npp.7.2.Installer.x64.exe /S
Didn't show any interface during silent installation.
Notepad kicks a secondary process that doesn't finish until success is evaluated.
try:
"%ProgramFiles(x86)%\Notepad++\uninstall.exe" /S
timeout 5

Install Packages (for dummies)

I know there's a lot of information on here about installing python packages, but I'm quite new to python and I think I need a more "for dummies" level of help.
I was trying to install openpyxl for which as far as I can tell I need easy_install, for which, as far as I can tell, I need setuptools. I tried running the code provided here https://pypi.python.org/pypi/setuptools which is supposed to download and install setuptools (and according to some sites, easy_install aswell?) - it runs successfully, but help(modules) doesn't show setuptools or easy_install as modules, I have no idea whats installed and what isn't, or how I'm supposed to install any of it!
Essentially I'm very confused, very frustrated and really need someone to talk me through (in idiot-speak) what I'm supposed to do.
Thankyou!
We all start somewhere, I was there two weeks ago.
I'll assume you're using Python2. I believe Distribute and Pip are recommended for Python3 (which I will be using as examples). I will also assume you are on Windows.
First, python needs to be registered to Path. To check if this has been done automatically, open a command prompt (start -> programs -> accessories), and type 'python', then enter. If it returns the version number, etc, skip down a bit. If it throws an error, you need to add Python to Path.
Adding Python to Path
To add Python to Path on a Windows computer, go to:
Control Panel -> System -> Advanced Settings -> Environment Settings -> System Variables
Scroll down to select path, then click edit. Copy the entire line to a text document, and add your install directory for Python.exe (and the scripts folder) using ';' as a delimiter between different directories. Copy this back to Path and save. (Additionally close your command prompt window to reset it.)
For my Windows 7 machine, I added:
;C:\Python33;C:\Python33\scripts;
Take care when editing this file. There are many videos out there describing this in detail if you feel unsure about changing this.
Installing Modules (Such as setup_tools)
Once Python is registered in the Path file, download and unzip setup_tools to a folder within your Python install directory called 'modules'. I use ExtractNow to unzip, as it will unzip twice (as required) automatically.
Open a command prompt window again, and direct it to change directories by typing
cd [directory for module you want to install]
On my computer, this would be
cd C:\Python33\modules\distribute-0.6.40
Again, I use distribute, rather than setup_tools as it sounds like you need would for Python2. Simply use the appropriate directory. Press enter to change the directory.
Once you've entered this and it shows a changed directory, type:
python setup.py install
This indicates that you want to use the program python to use the setup.py file in the specified folder to install the module. This should be successful, and will write many lines of code.
If you want to install other modules, you would install them in a similar way. Python would automatically use setup_tools on your computer to finish each install.
Remember to import at the start of your script when using them to code:
import [module]
Happy Programming!

Solaris: How to de-register/de-list a package installed with pkgadd

We have uninstalled an application on several Solaris servers manually by deleting folders and files only to realize afterwards that it had been installed with a package through pkgadd.
The command pkginfo -l, still shows the package even though its files are gone. Is there a way to simply "de-register" the package so it doesn't show up anymore with pkginfo?
As well as /var/sadm/pkg you should also check /var/sadm/install/contents, and the man page contents(4) for the same (man -s4 contents).

Trying to install MacPorts

I've followed the directions in Installing MacPorts.
To install MacPorts using the pkg installer. The installation apparently goes fine. For example, it goes through the multi-step process eventually saying "Installation Successful" or something to this effect.
And now there's just the "little" problem that neither of these commands work:
man ports
which ports
I've checked in /usr/local, /bin, and /usr/bin, and I don't see where this has been installed to. Ideas?
They're in /opt/local/bin, so as to not overwrite stuff that came with Mac OS X or that you might have gotten from elsewhere. They won't be in your $PATH until you close that Terminal and open another (nothing can alter the environment of a running program except the program itself).
It's in /opt/local/bin. MacPorts updates .bash_profile to include this in the path, but obviously existing shells don't see the updated PATH variable...
It's probably because you're trying ports but the command is called port: See http://guide.macports.org/#using.port

Resources