snipt

Ctrl+h for KB shortcuts

MuPAD

use vim to get colorful diff output

svn diff | view -
https://snipt.net/embed/e90133f066ceed71f94a49b24b896daa/
/raw/e90133f066ceed71f94a49b24b896daa/
e90133f066ceed71f94a49b24b896daa
mupad
MuPAD
1
2019-08-20T11:55:31
True
False
False
/api/public/snipt/30881/
use-vim-to-get-colorful-diff-output
<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><span class="nv">svn</span> <span class="nv">diff</span> <span class="o">|</span> <span class="nv">view</span> <span class="o">-</span> </span></pre></div> </td></tr></table>
bash, subversion, svn, vim

MuPAD

show top committers for the last month

svn log -r {`date +"%Y-%m-%d" -d "1 month ago"`}:HEAD|grep '^r[0-9]' |cut -d\| -f2|sort|uniq -c
https://snipt.net/embed/d72883ebadde361e0538599ddc8a7317/
/raw/d72883ebadde361e0538599ddc8a7317/
d72883ebadde361e0538599ddc8a7317
mupad
MuPAD
1
2019-08-24T20:26:40
True
False
False
/api/public/snipt/30880/
show-top-committers-for-the-last-month
<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><span class="nv">svn</span> <span class="nv">log</span> <span class="o">-</span><span class="nv">r</span> <span class="p">{</span><span class="nv">`date +&quot;%Y-%m-%d&quot; -d &quot;1 month ago&quot;`</span><span class="p">}</span><span class="o">:</span><span class="nv">HEAD</span><span class="o">|</span><span class="nv">grep</span> <span class="o">&#39;^</span><span class="nv">r</span><span class="p">[</span><span class="m">0</span><span class="o">-</span><span class="m">9</span><span class="p">]</span><span class="o">&#39;</span> <span class="o">|</span><span class="nv">cut</span> <span class="o">-</span><span class="nv">d</span>\<span class="o">|</span> <span class="o">-</span><span class="nv">f2</span><span class="o">|</span><span class="nv">sort</span><span class="o">|</span><span class="nv">uniq</span> <span class="o">-</span><span class="nv">c</span> </span></pre></div> </td></tr></table>
bash, subversion, svn

MuPAD

list of files committed for the last 10 days

svn diff -r{`date -d "-10 day" +"%Y-%m-%d"`}:HEAD --summarize . | grep . | awk '{print $2}' | grep -E -v '^\.$'
https://snipt.net/embed/52eaadcd1a4391a833dba189674356c0/
/raw/52eaadcd1a4391a833dba189674356c0/
52eaadcd1a4391a833dba189674356c0
mupad
MuPAD
1
2019-08-22T07:50:11
True
False
False
/api/public/snipt/30867/
list-of-files-committed-for-the-last-10-days
<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><span class="nv">svn</span> <span class="nv">diff</span> <span class="o">-</span><span class="nv">r</span><span class="p">{</span><span class="nv">`date -d &quot;-10 day&quot; +&quot;%Y-%m-%d&quot;`</span><span class="p">}</span><span class="o">:</span><span class="nv">HEAD</span> <span class="o">--</span><span class="nv">summarize</span> <span class="o">.</span> <span class="o">|</span> <span class="nv">grep</span> <span class="o">.</span> <span class="o">|</span> <span class="nv">awk</span> <span class="o">&#39;</span><span class="p">{</span><span class="nv">print</span> <span class="o">$</span><span class="m">2</span><span class="p">}</span><span class="o">&#39;</span> <span class="o">|</span> <span class="nv">grep</span> <span class="o">-</span><span class="no">E</span> <span class="o">-</span><span class="nv">v</span> <span class="o">&#39;^</span>\<span class="o">.$&#39;</span> </span></pre></div> </td></tr></table>
bash, subversion, svn

MuPAD

show top committers for SVN repositority for today

svn log -r {`date "+%Y-%m-%d"`}:HEAD|grep '^r[0-9]' |cut -d\| -f2|sort|uniq -c
https://snipt.net/embed/5b8264fca16f6754b19cc4ce6ad16a59/
/raw/5b8264fca16f6754b19cc4ce6ad16a59/
5b8264fca16f6754b19cc4ce6ad16a59
mupad
MuPAD
1
2019-08-23T02:06:37
True
False
False
/api/public/snipt/30866/
show-top-committers-for-svn-repositority-for-today
<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><span class="nv">svn</span> <span class="nv">log</span> <span class="o">-</span><span class="nv">r</span> <span class="p">{</span><span class="nv">`date &quot;+%Y-%m-%d&quot;`</span><span class="p">}</span><span class="o">:</span><span class="nv">HEAD</span><span class="o">|</span><span class="nv">grep</span> <span class="o">&#39;^</span><span class="nv">r</span><span class="p">[</span><span class="m">0</span><span class="o">-</span><span class="m">9</span><span class="p">]</span><span class="o">&#39;</span> <span class="o">|</span><span class="nv">cut</span> <span class="o">-</span><span class="nv">d</span>\<span class="o">|</span> <span class="o">-</span><span class="nv">f2</span><span class="o">|</span><span class="nv">sort</span><span class="o">|</span><span class="nv">uniq</span> <span class="o">-</span><span class="nv">c</span> </span></pre></div> </td></tr></table>
bash, subversion, svn

Text only

Remove all .svn files in source code directory

find . -name .svn -print0 | xargs -0 rm -rf
https://snipt.net/embed/929f246f203cb3b091b4acffa58ca6e7/
/raw/929f246f203cb3b091b4acffa58ca6e7/
929f246f203cb3b091b4acffa58ca6e7
text
Text only
1
2019-08-24T16:27:47
True
False
False
/api/public/snipt/28233/
remove-all-svn-files-in-source-code-directory
<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>find . -name .svn -print0 | xargs -0 rm -rf </span></pre></div> </td></tr></table>
.svn, svn

Bash

svn add user

1
2
3
# If running SVN_DAV which you should, add users using htpasswd
# Add -c if the file does not exist and we need to create it
htpasswd -md /etc/apache2/svn-auth-file {user-name}
https://snipt.net/embed/bf827548b07a2249b2ef75eb03a3b6ab/
/raw/bf827548b07a2249b2ef75eb03a3b6ab/
bf827548b07a2249b2ef75eb03a3b6ab
bash
Bash
3
2019-08-24T16:28:13
True
False
False
/api/public/snipt/27923/
svn-add-user
<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="c1"># If running SVN_DAV which you should, add users using htpasswd</span> </span><span id="L-2"><a name="L-2"></a><span class="c1"># Add -c if the file does not exist and we need to create it</span> </span><span id="L-3"><a name="L-3"></a>htpasswd -md /etc/apache2/svn-auth-file <span class="o">{</span>user-name<span class="o">}</span> </span></pre></div> </td></tr></table>
svn

Bash

Quick rsync

1
2
3
4
5
svn update

find . \( -not -ipath *.svn* -not -iname changed-list.txt \) -mmin -60 > ./changed-list.txt

rsync -v --files-from=./changed-list.txt . [email protected]:/path/to/code/directory
https://snipt.net/embed/1e4b90cca7a7c682270f3ddab1df9978/
/raw/1e4b90cca7a7c682270f3ddab1df9978/
1e4b90cca7a7c682270f3ddab1df9978
bash
Bash
6
2019-08-23T18:02:51
True
False
False
/api/public/snipt/27794/
quick-rsync
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>svn update </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>find . <span class="se">\(</span> -not -ipath *.svn* -not -iname changed-list.txt <span class="se">\)</span> -mmin -60 &gt; ./changed-list.txt </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>rsync -v --files-from<span class="o">=</span>./changed-list.txt . [email protected]:/path/to/code/directory </span></pre></div> </td></tr></table>
bash, command, rsync, svn