snipt

Ctrl+h for KB shortcuts

Bash

Get JAVA_HOME from alternatives

JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:bin/javac::")
https://snipt.net/embed/ba28f6bb37015f10aee79e793f2a8488/
/raw/ba28f6bb37015f10aee79e793f2a8488/
ba28f6bb37015f10aee79e793f2a8488
bash
Bash
1
2019-06-03T07:51:50
True
False
False
/api/public/snipt/36797/
get-java_home-from-alternatives
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nv">JAVA_HOME</span><span class="o">=</span><span class="k">$(</span>readlink -f /usr/bin/javac <span class="p">|</span> sed <span class="s2">&quot;s:bin/javac::&quot;</span><span class="k">)</span> </span></pre></div> </td></tr></table>
bash, linux, ssh

Text only

Some eclipse shortcuts

Ctrl + F11 - run as
F11 - debug as
https://snipt.net/embed/57257db03f32165b4bb151e124e270e7/
/raw/57257db03f32165b4bb151e124e270e7/
57257db03f32165b4bb151e124e270e7
text
Text only
2
2019-05-30T00:00:51
True
False
False
/api/public/snipt/35581/
some-eclipse-shortcuts
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Ctrl + F11 - run as </span><span id="L-2"><a name="L-2"></a>F11 - debug as </span></pre></div> </td></tr></table>
eclipse

Text only

Maven listing active profiles

mvn help:active-profiles
https://snipt.net/embed/c3e7e8d103275d8e29546d5b85bff802/
/raw/c3e7e8d103275d8e29546d5b85bff802/
c3e7e8d103275d8e29546d5b85bff802
text
Text only
1
2019-06-12T18:24:28
True
False
False
/api/public/snipt/35458/
maven-listing-active-profiles
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>mvn help:active-profiles </span></pre></div> </td></tr></table>
maven

XML

Assign bean's property a Constant value in Spring config file

1
2
3
4
5
6
<property name="map">
            <map>
                <entry key="a"><util:constant static-field="util.ProjectConstants.A"/></entry>
                <entry key="r"><util:constant static-field="util.ProjectConstants.R"/></entry>                
            </map>
        </property>
https://snipt.net/embed/54750497770aa2dddcf11ce68eaa4281/
/raw/54750497770aa2dddcf11ce68eaa4281/
54750497770aa2dddcf11ce68eaa4281
xml
XML
6
2019-06-02T05:30:48
True
False
False
/api/public/snipt/35401/
assign-beans-property-a-constant-value-in-spring-config-file
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;map&quot;</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="nt">&lt;map&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nt">&lt;entry</span> <span class="na">key=</span><span class="s">&quot;a&quot;</span><span class="nt">&gt;&lt;util:constant</span> <span class="na">static-field=</span><span class="s">&quot;util.ProjectConstants.A&quot;</span><span class="nt">/&gt;&lt;/entry&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="nt">&lt;entry</span> <span class="na">key=</span><span class="s">&quot;r&quot;</span><span class="nt">&gt;&lt;util:constant</span> <span class="na">static-field=</span><span class="s">&quot;util.ProjectConstants.R&quot;</span><span class="nt">/&gt;&lt;/entry&gt;</span> </span><span id="L-5"><a name="L-5"></a> <span class="nt">&lt;/map&gt;</span> </span><span id="L-6"><a name="L-6"></a> <span class="nt">&lt;/property&gt;</span> </span></pre></div> </td></tr></table>
java, spring

Text only

View tabs/spaces in eclipse ide

1
2
3
It is now possible to see the invisible whitespace characters in textual editors:

This feature can either be controlled via "General > Editors > Text Editors > Show whitespace characters" preference, or via the tool bar button when the Editor Presentation action set is enabled.
https://snipt.net/embed/c5460675eec45f722b6ad9b7fd98ec28/
/raw/c5460675eec45f722b6ad9b7fd98ec28/
c5460675eec45f722b6ad9b7fd98ec28
text
Text only
4
2019-06-10T13:56:59
True
False
False
/api/public/snipt/35388/
view-tabsspaces-in-eclipse-ide
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>It is now possible to see the invisible whitespace characters in textual editors: </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>This feature can either be controlled via &quot;General &gt; Editors &gt; Text Editors &gt; Show whitespace characters&quot; preference, or via the tool bar button when the Editor Presentation action set is enabled. </span></pre></div> </td></tr></table>
eclipse