snipt

Ctrl+h for KB shortcuts

Text only

start/killing mongrel cluster

1
2
3
4
5
mongrel_cluster_ctl start
mongrel_cluster_ctl restart
mongrel_cluster_ctl stop

killall -9 mongrel_rails
https://snipt.net/embed/ccaf30b1e12f8e13f6cd318b232977a9/
/raw/ccaf30b1e12f8e13f6cd318b232977a9/
ccaf30b1e12f8e13f6cd318b232977a9
text
Text only
5
2019-07-15T06:19:39
True
False
False
/api/public/snipt/761/
startkilling-mongrel
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>mongrel_cluster_ctl start </span><span id="L-2"><a name="L-2"></a>mongrel_cluster_ctl restart </span><span id="L-3"><a name="L-3"></a>mongrel_cluster_ctl stop </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>killall -9 mongrel_rails </span></pre></div> </td></tr></table>
mongrel

HTML+PHP

Share This

<?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>
https://snipt.net/embed/63e8abe0a35fd30da06b0719e3d79968/
/raw/63e8abe0a35fd30da06b0719e3d79968/
63e8abe0a35fd30da06b0719e3d79968
html+php
HTML+PHP
1
2019-07-21T02:38:58
True
False
False
/api/public/snipt/748/
share-this
<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="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;sharethis_button&#39;</span><span class="p">))</span> <span class="p">{</span> <span class="nx">sharethis_button</span><span class="p">();</span> <span class="p">}</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
social

PHP

PHP ternary operator

1
2
3
4
<?php
// Example usage for: Ternary Operator
$action = (empty($_POST['action'])) ? 'default' : $_POST['action'];
?>
https://snipt.net/embed/9993a2570f3419514bbae2e7ce1f11c8/
/raw/9993a2570f3419514bbae2e7ce1f11c8/
9993a2570f3419514bbae2e7ce1f11c8
php
PHP
4
2019-07-18T21:28:51
True
False
False
/api/public/snipt/747/
php-ternary-operator
<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></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="c1">// Example usage for: Ternary Operator</span> </span><span id="L-3"><a name="L-3"></a><span class="nv">$action</span> <span class="o">=</span> <span class="p">(</span><span class="k">empty</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;action&#39;</span><span class="p">]))</span> <span class="o">?</span> <span class="s1">&#39;default&#39;</span> <span class="o">:</span> <span class="nv">$_POST</span><span class="p">[</span><span class="s1">&#39;action&#39;</span><span class="p">];</span> </span><span id="L-4"><a name="L-4"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
ternary