snipt

Ctrl+h for KB shortcuts

Bash

Preventing Git cert error

env GIT_SSL_NO_VERIFY=true git clone https://bitbucket.org/user/repo.git
https://snipt.net/embed/517bc21864aa314d2a7bda5ef5f4f51f/
/raw/517bc21864aa314d2a7bda5ef5f4f51f/
517bc21864aa314d2a7bda5ef5f4f51f
bash
Bash
2
2019-07-17T00:37:04
True
False
False
Nov 23, 2012 at 08:58 AM
/api/public/snipt/50666/
preventing-git-cert-error
<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>env <span class="nv">GIT_SSL_NO_VERIFY</span><span class="o">=</span><span class="nb">true</span> git clone https://bitbucket.org/user/repo.git </span></pre></div> </td></tr></table>
cert, git, https, prevent, ssh

JavaScript

Javascript Pad(s, n)

1
2
3
s = new Array(n + 1 - s.length).join('0') + s;
// or
s = ((new Array(n + 1).join('0')) + s).slice(-n);
https://snipt.net/embed/eac96a5af94fc5d880602b5840430d4e/
/raw/eac96a5af94fc5d880602b5840430d4e/
eac96a5af94fc5d880602b5840430d4e
js
JavaScript
3
2019-07-13T20:42:08
True
False
False
/api/public/snipt/50224/
javascript-pads-n
<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><span class="nx">s</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Array</span><span class="p">(</span><span class="nx">n</span> <span class="o">+</span> <span class="mi">1</span> <span class="o">-</span> <span class="nx">s</span><span class="p">.</span><span class="nx">length</span><span class="p">).</span><span class="nx">join</span><span class="p">(</span><span class="s1">&#39;0&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="nx">s</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="c1">// or</span> </span><span id="L-3"><a name="L-3"></a><span class="nx">s</span> <span class="o">=</span> <span class="p">((</span><span class="k">new</span> <span class="nb">Array</span><span class="p">(</span><span class="nx">n</span> <span class="o">+</span> <span class="mi">1</span><span class="p">).</span><span class="nx">join</span><span class="p">(</span><span class="s1">&#39;0&#39;</span><span class="p">))</span> <span class="o">+</span> <span class="nx">s</span><span class="p">).</span><span class="nx">slice</span><span class="p">(</span><span class="o">-</span><span class="nx">n</span><span class="p">);</span> </span></pre></div> </td></tr></table>
javascript, js, pad, string