snipt

Ctrl+h for KB shortcuts

Bash

mount window share (samba)

sudo mount -t cifs //remoteserver/share -o username=user,password=password /mnt/mountdir
https://snipt.net/embed/6a099450119bb83600f3bd235cab4f7d/
/raw/6a099450119bb83600f3bd235cab4f7d/
6a099450119bb83600f3bd235cab4f7d
bash
Bash
1
2019-08-13T18:17:09
True
False
False
/api/public/snipt/19533/
mount-window-share-samba
<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>sudo mount -t cifs //remoteserver/share -o <span class="nv">username</span><span class="o">=</span>user,password<span class="o">=</span>password /mnt/mountdir </span></pre></div> </td></tr></table>
linux, network, samba

Bash

mount a window shared folder

mount -t cifs //ntserver/download -o username=vivek,password=myPassword /mnt/ntserver
https://snipt.net/embed/edcad141d5f5c9b3e6ade4ca66e18682/
/raw/edcad141d5f5c9b3e6ade4ca66e18682/
edcad141d5f5c9b3e6ade4ca66e18682
bash
Bash
1
2019-08-20T01:51:49
True
False
False
/api/public/snipt/18696/
mount-a-window-shared-folder
<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>mount -t cifs //ntserver/download -o <span class="nv">username</span><span class="o">=</span>vivek,password<span class="o">=</span>myPassword /mnt/ntserver </span></pre></div> </td></tr></table>
bash, linux, samba, sysadmin, windows

MySQL

All tables in a schema with a given column name

1
2
3
4
SELECT DISTINCT TABLE_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME LIKE 'columnA'
        AND TABLE_SCHEMA='database name';
https://snipt.net/embed/36fd6045905a2502133812d9cb202cfc/
/raw/36fd6045905a2502133812d9cb202cfc/
36fd6045905a2502133812d9cb202cfc
mysql
MySQL
5
2019-08-13T16:41:24
True
False
False
/api/public/snipt/18665/
all-tables-in-a-schema-with-a-given-column-name
<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="k">SELECT</span> <span class="k">DISTINCT</span> <span class="n">TABLE_NAME</span> </span><span id="L-2"><a name="L-2"></a> <span class="k">FROM</span> <span class="n">INFORMATION_SCHEMA</span><span class="p">.</span><span class="n">COLUMNS</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">WHERE</span> <span class="n">COLUMN_NAME</span> <span class="k">LIKE</span> <span class="s1">&#39;columnA&#39;</span> </span><span id="L-4"><a name="L-4"></a> <span class="k">AND</span> <span class="n">TABLE_SCHEMA</span><span class="o">=</span><span class="s1">&#39;database name&#39;</span><span class="p">;</span> </span></pre></div> </td></tr></table>
mysql

Bash

start local pydoc server

1
2
3
python -m pydoc -p 9090

 ## http://localhost:9090
https://snipt.net/embed/9817d4980ae432991a62ffe56fe371b8/
/raw/9817d4980ae432991a62ffe56fe371b8/
9817d4980ae432991a62ffe56fe371b8
bash
Bash
3
2019-08-22T05:07:35
True
False
False
/api/public/snipt/18558/
start-local-pydoc-server
<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>python -m pydoc -p 9090 </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a> <span class="c1">## http://localhost:9090</span> </span></pre></div> </td></tr></table>
python

Text only

remote desktop in console

mstsc /console
https://snipt.net/embed/0b662d1381c2f509a5fc0532016fad94/
/raw/0b662d1381c2f509a5fc0532016fad94/
0b662d1381c2f509a5fc0532016fad94
text
Text only
1
2019-08-22T17:00:44
True
False
False
/api/public/snipt/18552/
remote-desktop-in-console
<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>mstsc /console </span></pre></div> </td></tr></table>
dos