snipt

Ctrl+h for KB shortcuts

Text only

Activate Tomcat Manager

1
2
3
4
nano /etc/tomcat7/tomcat-users.xml

<role rolename="manager-gui"/>
<user username="webadmin" password="webadmin" roles="manager-gui"/>
https://snipt.net/embed/baab80616b8387ad900b6fce4a5b3b78/
https://snipt.net/raw/baab80616b8387ad900b6fce4a5b3b78/
baab80616b8387ad900b6fce4a5b3b78
text
Text only
4
2016-09-22T01:26:25
True
False
False
Sep 18, 2014 at 09:06 AM
/api/public/snipt/111475/
activate-tomcat-manager
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>nano /etc/tomcat7/tomcat-users.xml </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>&lt;role rolename=&quot;manager-gui&quot;/&gt; </span><span id="L-4"><a name="L-4"></a>&lt;user username=&quot;webadmin&quot; password=&quot;webadmin&quot; roles=&quot;manager-gui&quot;/&gt; </span></pre></div> </td></tr></table>
configuration, tomcat

XML

Force Sitecore to use the Master DB

1
2
3
4
5
6
In Web.Config:

<site>
	<site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/POM" startItem="/home" database="master" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
    ...
</site>
https://snipt.net/embed/f87dc63cb928d696384d2a31fe951451/
https://snipt.net/raw/f87dc63cb928d696384d2a31fe951451/
f87dc63cb928d696384d2a31fe951451
xml
XML
6
2016-09-22T01:26:32
True
False
False
/api/public/snipt/96946/
force-sitecore-to-use-the-master-db
<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 id="L-1"><a name="L-1"></a>In Web.Config: </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="nt">&lt;site&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="nt">&lt;site</span> <span class="na">name=</span><span class="s">&quot;website&quot;</span> <span class="na">virtualFolder=</span><span class="s">&quot;/&quot;</span> <span class="na">physicalFolder=</span><span class="s">&quot;/&quot;</span> <span class="na">rootPath=</span><span class="s">&quot;/sitecore/content/POM&quot;</span> <span class="na">startItem=</span><span class="s">&quot;/home&quot;</span> <span class="na">database=</span><span class="s">&quot;master&quot;</span> <span class="na">domain=</span><span class="s">&quot;extranet&quot;</span> <span class="na">allowDebug=</span><span class="s">&quot;true&quot;</span> <span class="na">cacheHtml=</span><span class="s">&quot;true&quot;</span> <span class="na">htmlCacheSize=</span><span class="s">&quot;10MB&quot;</span> <span class="na">registryCacheSize=</span><span class="s">&quot;0&quot;</span> <span class="na">viewStateCacheSize=</span><span class="s">&quot;0&quot;</span> <span class="na">xslCacheSize=</span><span class="s">&quot;5MB&quot;</span> <span class="na">filteredItemsCacheSize=</span><span class="s">&quot;2MB&quot;</span> <span class="na">enablePreview=</span><span class="s">&quot;true&quot;</span> <span class="na">enableWebEdit=</span><span class="s">&quot;true&quot;</span> <span class="na">enableDebugger=</span><span class="s">&quot;true&quot;</span> <span class="na">disableClientData=</span><span class="s">&quot;false&quot;</span> <span class="nt">/&gt;</span> </span><span id="L-5"><a name="L-5"></a> ... </span><span id="L-6"><a name="L-6"></a><span class="nt">&lt;/site&gt;</span> </span></pre></div> </td></tr></table>
configuration, sitecore

Text only

Actualizar .bashrc sin tener que reiniciar

source .bashrc
https://snipt.net/embed/5668229a38c6ccee4f12df7aafafee60/
https://snipt.net/raw/5668229a38c6ccee4f12df7aafafee60/
5668229a38c6ccee4f12df7aafafee60
text
Text only
1
2016-09-22T01:26:50
True
False
False
Apr 30, 2013 at 09:00 AM
/api/public/snipt/60322/
actualizar-bashrc-sin-tener-que-reiniciar
<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 id="L-1"><a name="L-1"></a>source .bashrc </span></pre></div> </td></tr></table>
Linux, configuration

PHP

Joomla global configuration object

1
2
3
4
// get object
$config =& JFactory::getConfig();
// only way JDump works (otherwise it shows just methods of JRegistry, at least in J1.6+)
dump($config->toArray());
https://snipt.net/embed/153bd3e245649c85b31c52753eb52d3c/
https://snipt.net/raw/153bd3e245649c85b31c52753eb52d3c/
153bd3e245649c85b31c52753eb52d3c
php
PHP
4
2016-09-24T19:46:14
True
False
False
/api/public/snipt/43057/
joomla-global-configuration-object
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x">// get object</span> </span><span id="L-2"><a name="L-2"></a><span class="x">$config =&amp; JFactory::getConfig();</span> </span><span id="L-3"><a name="L-3"></a><span class="x">// only way JDump works (otherwise it shows just methods of JRegistry, at least in J1.6+)</span> </span><span id="L-4"><a name="L-4"></a><span class="x">dump($config-&gt;toArray());</span> </span></pre></div> </td></tr></table>
config, configuration, joomla

Markdown

The perfect Varnish configuration for Joomla websites

IMPORTANT NOTICE

The Varnish configuration is now available on GitHub's Gist:

https://gist.github.com/fevangelou/84d2ce05896cab5f730a

https://snipt.net/embed/c5d8853eb1045bba9eb2e8bf02d15e2b/
https://snipt.net/raw/c5d8853eb1045bba9eb2e8bf02d15e2b/
c5d8853eb1045bba9eb2e8bf02d15e2b
markdown
Markdown
6
2016-09-26T04:27:59
True
False
False
/api/public/snipt/42658/
the-perfect-varnish-configuration-for-joomla-websites
<h3>IMPORTANT NOTICE</h3> <p>The Varnish configuration is now available on GitHub's Gist:</p> <p><a href="https://gist.github.com/fevangelou/84d2ce05896cab5f730a">https://gist.github.com/fevangelou/84d2ce05896cab5f730a</a></p>
configuration, default.vcl, joomla, varnish
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.