snipt

Ctrl+h for KB shortcuts

SQL

Sql Server Monitor TempDb

1
2
3
select * from sys.dm_db_file_space_usage
select * from sys.dm_db_task_space_usage
select * from sys.dm_db_session_space_usage 
https://snipt.net/embed/ba07ec11b5eb89fc257e6332f9a9617e/
/raw/ba07ec11b5eb89fc257e6332f9a9617e/
ba07ec11b5eb89fc257e6332f9a9617e
sql
SQL
3
2019-06-11T16:31:18
True
False
False
/api/public/snipt/44225/
sql-server-monitor-tempdb
<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="k">select</span> <span class="o">*</span> <span class="k">from</span> <span class="n">sys</span><span class="p">.</span><span class="n">dm_db_file_space_usage</span> </span><span id="L-2"><a name="L-2"></a><span class="k">select</span> <span class="o">*</span> <span class="k">from</span> <span class="n">sys</span><span class="p">.</span><span class="n">dm_db_task_space_usage</span> </span><span id="L-3"><a name="L-3"></a><span class="k">select</span> <span class="o">*</span> <span class="k">from</span> <span class="n">sys</span><span class="p">.</span><span class="n">dm_db_session_space_usage</span> </span></pre></div> </td></tr></table>
sql, sql-server, tempdb

Bash

Add all the new svn files at once

svn status | grep "^?" | awk '{print $2}' | xargs svn add
https://snipt.net/embed/cf7e32e54cfe6423fd3d164544f2c9b7/
/raw/cf7e32e54cfe6423fd3d164544f2c9b7/
cf7e32e54cfe6423fd3d164544f2c9b7
bash
Bash
1
2019-06-11T23:18:23
True
False
False
/api/public/snipt/38619/
add-all-the-new-svn-files-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></span><span id="L-1"><a name="L-1"></a>svn status <span class="p">|</span> grep <span class="s2">&quot;^?&quot;</span> <span class="p">|</span> awk <span class="s1">&#39;{print $2}&#39;</span> <span class="p">|</span> xargs svn add </span></pre></div> </td></tr></table>
awk, grep, svn, xarg