Allow your account to sudo

I have the installed the bash of the Linux sub system on my windows 10 now for quite some time. Today the prompt informed me about available updates for packages. I tried to sudo to run the apt command but failed.lennybacon is not in the sudoers file. This incident will be reported. So I had a look at the /etc/sudoers file:... # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL ... So I decided to not modify the file and add my account to the admin group:usermod -aG admin lennybacon Now I can sudo! HTH, Daniel

Maven Archetypes in IntelliJ

IntelliJ has the ability to use Maven as build and project system. The concept of an archetype is a predefined project or project template.When “File | New project” is used to create a new project and “Maven” is selected the following dialog is displayed:IntelliJ comes with a few archetypes but of course custom ones can be added. On the MVN Repository for example several archetypes for Wildfly are available: http://mvnrepository.com/artifact/org.wildfly.archetypeThe XML snipped can be used as copy-paste-source for IntelliJ’s “Add archetype dialog”:After clicking the “OK” button the newly added archetypes are available as a source for the project creation. The custom archetypes are stored in the file “C:\{username}\Daniel\.IntelliJIdea{version}\system\Maven\Indices\UserArchetypes.xml” on Windows and “~/.IntelliJIdea{version}/system/Maven/Indices/UserArchetypes.xml” on Linux. Next define group and artifact identifier as well as version for the new project:Select the Maven version:And the project location:The result is a runnable quick start for working with the Wildfly application server.

Code Snippets in IntelliJ

Code snippets can be helpful. Otherwise the can lead to code duplicates – so use them with wisely.In JetBrains IntelliJ the code snipptes are called Live Templates. They are stored in files saved in C:\Users\{UserName}\.IntelliJIdea{Version}\config\templates on Windows and ~/.IntelliJIdea{Version}/config/templates on Linux. To create a live template open IntelliJ and open the Settings from the File menu:In the Settings dialog you can use the search text box to quickly access the Live Templates section:Now just select the Language and use the green plus button on the upper right to add a new one (like the iife that I just added here).There is a special placeholders that can be used aside from variables:$SELECTION$The Edit variables button switches to enabled state as soon as you user a variable name in the code.