snipt

Ctrl+h for KB shortcuts

Bash

mysql process list

mysqladmin -p processlist
https://snipt.net/embed/a31ac783f3d779ab197b4d1a15564b79/
/raw/a31ac783f3d779ab197b4d1a15564b79/
a31ac783f3d779ab197b4d1a15564b79
bash
Bash
1
2019-07-21T18:46:22
True
False
False
/api/public/snipt/11525/
mysql-process-list
<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>mysqladmin -p processlist </span></pre></div> </td></tr></table>
list, mysql, process

PHP

Category List

<?php
wp_list_categories('orderby=name&include=3,5,9,16'); ?>
https://snipt.net/embed/ba95135b0c44df2e1ca308c0830f13cf/
/raw/ba95135b0c44df2e1ca308c0830f13cf/
ba95135b0c44df2e1ca308c0830f13cf
php
PHP
2
2019-07-21T04:01:13
True
False
False
/api/public/snipt/8174/
category-list
<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><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="nx">wp_list_categories</span><span class="p">(</span><span class="s1">&#39;orderby=name&amp;include=3,5,9,16&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
category, list, wordpress

JavaScript

hide/show FAQs in <dl>

$('dd').toggle();
$('dt').click(function() {$(this).next('dd').toggle('slideDown');});
https://snipt.net/embed/5e412c1bc3e0140ac4bfaae4fec128d4/
/raw/5e412c1bc3e0140ac4bfaae4fec128d4/
5e412c1bc3e0140ac4bfaae4fec128d4
js
JavaScript
2
2019-07-21T13:24:25
True
False
False
/api/public/snipt/7087/
hideshow-faqs-in-dl
<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><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;dd&#39;</span><span class="p">).</span><span class="nx">toggle</span><span class="p">();</span> </span><span id="L-2"><a name="L-2"></a><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;dt&#39;</span><span class="p">).</span><span class="nx">click</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">next</span><span class="p">(</span><span class="s1">&#39;dd&#39;</span><span class="p">).</span><span class="nx">toggle</span><span class="p">(</span><span class="s1">&#39;slideDown&#39;</span><span class="p">);});</span> </span></pre></div> </td></tr></table>
jquery, list, toggle

Bash

amount of file handlers | ? | total allowed

cat /proc/sys/fs/file-nr 
https://snipt.net/embed/2fb96ee8630083b72c9477822d161540/
/raw/2fb96ee8630083b72c9477822d161540/
2fb96ee8630083b72c9477822d161540
bash
Bash
1
2019-07-19T18:25:19
True
False
False
/api/public/snipt/6447/
amount-of-file-handlers-total-allowed
<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>cat /proc/sys/fs/file-nr </span></pre></div> </td></tr></table>
bash, files, list, lsof, of, open

Bash

max for lsof

cat /proc/sys/fs/file-max 
https://snipt.net/embed/2c971c605eb1597ba0413e38ca4fa8ee/
/raw/2c971c605eb1597ba0413e38ca4fa8ee/
2c971c605eb1597ba0413e38ca4fa8ee
bash
Bash
1
2019-07-19T02:11:05
True
False
False
/api/public/snipt/6446/
max-for-lsof
<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>cat /proc/sys/fs/file-max </span></pre></div> </td></tr></table>
bash, files, list, lsof, open

MySQL

list mysql schemas

SHOW SCHEMAS;
SHOW DATABASES;
https://snipt.net/embed/af0c9469dfcd4d332785462f59853b59/
/raw/af0c9469dfcd4d332785462f59853b59/
af0c9469dfcd4d332785462f59853b59
mysql
MySQL
2
2019-07-22T14:15:17
True
False
False
/api/public/snipt/6418/
list-mysql-schemas
<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><span class="k">SHOW</span> <span class="k">SCHEMAS</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="k">SHOW</span> <span class="k">DATABASES</span><span class="p">;</span> </span></pre></div> </td></tr></table>
list, mysql, schemas, show

Python

repeating a string in to a list

" ".join(repeat('oo',3))
https://snipt.net/embed/e24eff87700ec4f25efe54ffd4ba88d0/
/raw/e24eff87700ec4f25efe54ffd4ba88d0/
e24eff87700ec4f25efe54ffd4ba88d0
python
Python
1
2019-07-22T12:53:45
True
False
False
/api/public/snipt/6277/
repeating-a-string-in-to-a-list
<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="s2">&quot; &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">repeat</span><span class="p">(</span><span class="s1">&#39;oo&#39;</span><span class="p">,</span><span class="mi">3</span><span class="p">))</span> </span></pre></div> </td></tr></table>
list, repeat