snipt

Ctrl+h for KB shortcuts

Bash

python > quick web server in current folder

$ python -m SimpleHTTPServer
https://snipt.net/embed/60f836001fcdf3de01ff858ceb4a1bcd/
https://snipt.net/raw/60f836001fcdf3de01ff858ceb4a1bcd/
60f836001fcdf3de01ff858ceb4a1bcd
bash
Bash
1
2016-09-21T19:38:59
True
False
False
Aug 13, 2013 at 12:49 AM
/api/public/snipt/73804/
python-quick-web-server-in-current-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 id="L-1"><a name="L-1"></a><span class="nv">$ </span>python -m SimpleHTTPServer </span></pre></div> </td></tr></table>
python, server, web

Bash

make directory and multiple subdirectories at once

$ mkdir -p somlor.com/{public,private,log,backup}
https://snipt.net/embed/7ad7fadab1f1a41534a1b25198eff333/
https://snipt.net/raw/7ad7fadab1f1a41534a1b25198eff333/
7ad7fadab1f1a41534a1b25198eff333
bash
Bash
1
2016-09-21T13:32:58
True
False
False
Feb 23, 2013 at 07:10 PM
/api/public/snipt/53807/
make-directory-and-multiple-subdirectories-at-once
<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><span class="nv">$ </span>mkdir -p somlor.com/<span class="o">{</span>public,private,log,backup<span class="o">}</span> </span></pre></div> </td></tr></table>
directory, folder, mkdir, ubuntu, web, webdev

Text only

.htaccess allowing access from one IP only

1
2
3
4
order deny, allow
deny from all
allow from a.b.d.c
# Where a.b.c.d is the allowed IP
https://snipt.net/embed/9d0210f5e69feb4b316ade61882efb03/
https://snipt.net/raw/9d0210f5e69feb4b316ade61882efb03/
9d0210f5e69feb4b316ade61882efb03
text
Text only
4
2016-09-25T11:09:28
True
False
False
/api/public/snipt/48588/
htaccess-allowing-access-from-one-ip-only
<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>order deny, allow </span><span id="L-2"><a name="L-2"></a>deny from all </span><span id="L-3"><a name="L-3"></a>allow from a.b.d.c </span><span id="L-4"><a name="L-4"></a># Where a.b.c.d is the allowed IP </span></pre></div> </td></tr></table>
.htaccess, server, web
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.