snipt

Ctrl+h for KB shortcuts

VimL

scp in vimrc

1
2
3
4
let g:netrw_cygwin= 0
let g:netrw_scp_cmd = "C:\\path\\to\\putty's\\scp\\pscp.exe -pw yourpasswd"
let g:netrw_sftp_cmd = "C:\\path\\to\\putty's\\sftp\\pftp.exe -pw yourpasswd"
let g:netrw_list_cmd = "plink [email protected] -pw yourpasswd ls -Fa"
https://snipt.net/embed/e450480cdb6f1328aee58711caea0f85/
/raw/e450480cdb6f1328aee58711caea0f85/
e450480cdb6f1328aee58711caea0f85
vim
VimL
4
2019-07-21T02:25:28
True
False
False
/api/public/snipt/17078/
scp-in-vimrc
<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">let</span> <span class="k">g</span>:netrw_cygwin<span class="p">=</span> <span class="m">0</span> </span><span id="L-2"><a name="L-2"></a><span class="k">let</span> <span class="k">g</span>:netrw_scp_cmd <span class="p">=</span> <span class="s2">&quot;C:\\path\\to\\putty&#39;s\\scp\\pscp.exe -pw yourpasswd&quot;</span> </span><span id="L-3"><a name="L-3"></a><span class="k">let</span> <span class="k">g</span>:netrw_sftp_cmd <span class="p">=</span> <span class="s2">&quot;C:\\path\\to\\putty&#39;s\\sftp\\pftp.exe -pw yourpasswd&quot;</span> </span><span id="L-4"><a name="L-4"></a><span class="k">let</span> <span class="k">g</span>:netrw_list_cmd <span class="p">=</span> <span class="s2">&quot;plink [email protected] -pw yourpasswd ls -Fa&quot;</span> </span></pre></div> </td></tr></table>
vim

Bash

copy key and crt

$ cat host.key host.crt > host.pem
https://snipt.net/embed/7bd9b005fdd5689ff0f70ce73a86a976/
/raw/7bd9b005fdd5689ff0f70ce73a86a976/
7bd9b005fdd5689ff0f70ce73a86a976
bash
Bash
1
2019-07-21T02:25:36
True
False
False
/api/public/snipt/17077/
copy-key-and-crt
<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 host.key host.crt &gt; host.pem </span></pre></div> </td></tr></table>
bash

Lighttpd configuration file

create https

1
2
3
4
5
6
7
$SERVER[socket] == IP:443 {
    ssl.engine = enable
    ssl.pemfile = /etc/lighttpd/ssl/fq.dn/host.pem”
    ssl.ca-file = /etc/lighttpd/ssl/fq.dn/host.crt”
    server.name = fq.dn
    server.document-root = /var/www/fq.dn”
}
https://snipt.net/embed/464322cb3b77dbd852780fe0c364a486/
/raw/464322cb3b77dbd852780fe0c364a486/
464322cb3b77dbd852780fe0c364a486
lighty
Lighttpd configuration file
7
2019-08-17T02:09:46
True
False
False
/api/public/snipt/17076/
create-https
<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> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">$SERVER</span><span class="p">[</span><span class="err">“</span><span class="k">socket</span><span class="err">”</span><span class="p">]</span> <span class="o">==</span> <span class="err">“</span><span class="k">IP</span><span class="err">:</span><span class="m">443</span><span class="err">”</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="k">ssl.engine</span> <span class="o">=</span> <span class="err">“</span><span class="k">enable</span><span class="err">”</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">ssl.pemfile</span> <span class="o">=</span> <span class="err">“</span><span class="n">/etc/lighttpd/ssl/fq.dn/host.pem”</span> </span><span id="L-4"><a name="L-4"></a> <span class="k">ssl.ca-file</span> <span class="o">=</span> <span class="err">“</span><span class="n">/etc/lighttpd/ssl/fq.dn/host.crt”</span> </span><span id="L-5"><a name="L-5"></a> <span class="k">server.name</span> <span class="o">=</span> <span class="err">“</span><span class="k">fq.dn</span><span class="err">”</span> </span><span id="L-6"><a name="L-6"></a> <span class="k">server.document-root</span> <span class="o">=</span> <span class="err">“</span><span class="n">/var/www/fq.dn”</span> </span><span id="L-7"><a name="L-7"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
lighttpd, server