snipt

Ctrl+h for KB shortcuts

Text only

Git - Remove local changes & pull from repo

git fetch --all
git reset --hard origin/master
https://snipt.net/embed/7d683e6531c2f892b0c388aca4f94c60/
https://snipt.net/raw/7d683e6531c2f892b0c388aca4f94c60/
7d683e6531c2f892b0c388aca4f94c60
text
Text only
2
2016-09-24T23:33:46
True
False
False
Oct 04, 2015 at 06:14 PM
/api/public/snipt/141491/
git-remove-local-changes-pull-from-repo
<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 id="L-1"><a name="L-1"></a>git fetch --all </span><span id="L-2"><a name="L-2"></a>git reset --hard origin/master </span></pre></div> </td></tr></table>
changes, git, remove

Text only

git - remove file tracking

git rm --cached FILENAME
https://snipt.net/embed/b95f9e34e8e024efa716289d976d771e/
https://snipt.net/raw/b95f9e34e8e024efa716289d976d771e/
b95f9e34e8e024efa716289d976d771e
text
Text only
1
2016-09-24T23:34:03
True
False
False
Oct 04, 2015 at 04:35 PM
/api/public/snipt/141490/
git-remove-file-tracking
<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>git rm --cached FILENAME </span></pre></div> </td></tr></table>
git, remove, tracking

JavaScript

Jquery Submenu - active - remove and add

1
2
3
4
$("#submenu01").on("click", "a:not(.active)", function ( event ) {
    $(".active", event.delegateTarget).removeClass("active");
    $(this).addClass("active");
});
https://snipt.net/embed/af6aade45f123b2636cd4b7b8558e28f/
https://snipt.net/raw/af6aade45f123b2636cd4b7b8558e28f/
af6aade45f123b2636cd4b7b8558e28f
js
JavaScript
5
2016-09-24T01:51:30
True
False
False
Aug 05, 2013 at 12:29 PM
/api/public/snipt/72025/
jquery-submenu-active-remove-and-add
<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><span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#submenu01&quot;</span><span class="p">).</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;click&quot;</span><span class="p">,</span> <span class="s2">&quot;a:not(.active)&quot;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span> <span class="nx">event</span> <span class="p">)</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="s2">&quot;.active&quot;</span><span class="p">,</span> <span class="nx">event</span><span class="p">.</span><span class="nx">delegateTarget</span><span class="p">).</span><span class="nx">removeClass</span><span class="p">(</span><span class="s2">&quot;active&quot;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">addClass</span><span class="p">(</span><span class="s2">&quot;active&quot;</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a><span class="p">});</span> </span></pre></div> </td></tr></table>
active, add, addClass, class, jquery, remove

Text only

remove directory from GIT

1
2
3
git rm -r one-of-the-directories
git commit -m "Remove duplicated directory"
git push origin master
https://snipt.net/embed/5c7dedff4d939d924ea1ff04daaafccd/
https://snipt.net/raw/5c7dedff4d939d924ea1ff04daaafccd/
5c7dedff4d939d924ea1ff04daaafccd
text
Text only
3
2016-09-22T18:07:17
True
False
False
May 07, 2013 at 08:55 AM
/api/public/snipt/60850/
remove-directory-from-git
<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 id="L-1"><a name="L-1"></a>git rm -r one-of-the-directories </span><span id="L-2"><a name="L-2"></a>git commit -m &quot;Remove duplicated directory&quot; </span><span id="L-3"><a name="L-3"></a>git push origin master </span></pre></div> </td></tr></table>
directory, folder, git, remove

VB.net

ASP.Net String Manipulation (Split and Last Character)

1
2
3
str.Remove(str.Length - 1, 1)

Dim StatusArray As String() = s.Split(New Char() {","c})
https://snipt.net/embed/d423874ea7d4a5e4435085f8d0ab639a/
https://snipt.net/raw/d423874ea7d4a5e4435085f8d0ab639a/
d423874ea7d4a5e4435085f8d0ab639a
vb.net
VB.net
3
2016-09-21T13:25:32
True
False
False
/api/public/snipt/49301/
aspnet-remove-last-character
<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 id="L-1"><a name="L-1"></a><span class="n">str</span><span class="p">.</span><span class="n">Remove</span><span class="p">(</span><span class="n">str</span><span class="p">.</span><span class="n">Length</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="k">Dim</span> <span class="n">StatusArray</span> <span class="ow">As</span> <span class="kt">String</span><span class="p">()</span> <span class="o">=</span> <span class="n">s</span><span class="p">.</span><span class="n">Split</span><span class="p">(</span><span class="k">New</span> <span class="kt">Char</span><span class="p">()</span> <span class="p">{</span><span class="s">&quot;,&quot;c</span><span class="p">})</span> </span></pre></div> </td></tr></table>
asp.net, character, last, remove, split
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.