snipt

Ctrl+h for KB shortcuts

Bash

get a process id

ps aux | grep processname | grep -v grep | awk '{print $2}'
https://snipt.net/embed/977692c82ec931746a22046523d31140/
/raw/977692c82ec931746a22046523d31140/
977692c82ec931746a22046523d31140
bash
Bash
1
2019-07-08T03:07:10
True
False
False
/api/public/snipt/12427/
script-or-command-to-get-a-process-id
<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>ps aux <span class="p">|</span> grep processname <span class="p">|</span> grep -v grep <span class="p">|</span> awk <span class="s1">&#39;{print $2}&#39;</span> </span></pre></div> </td></tr></table>
bash

Bash

undo last commit

git reset --soft HEAD^
https://snipt.net/embed/2d8182cd777fe5428093cfbdc02c8b1c/
/raw/2d8182cd777fe5428093cfbdc02c8b1c/
2d8182cd777fe5428093cfbdc02c8b1c
bash
Bash
3
2019-07-08T01:29:55
True
False
False
/api/public/snipt/1554/
undo-last-commit
<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>git reset --soft HEAD^ </span></pre></div> </td></tr></table>
git

Bash

delete .svn files/folders

find ./ -name ".svn" | xargs rm -Rf
https://snipt.net/embed/d8781cd48c3294c727b6c110f60a5927/
/raw/d8781cd48c3294c727b6c110f60a5927/
d8781cd48c3294c727b6c110f60a5927
bash
Bash
1
2019-07-15T17:35:42
True
False
False
/api/public/snipt/1166/
delete-svn-filesfolders
<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 <span class="s2">&quot;.svn&quot;</span> <span class="p">|</span> xargs rm -Rf </span></pre></div> </td></tr></table>
svn

Text only

format os x

diskutil eraseDisk HFS+ newdisk disk1
https://snipt.net/embed/377d54d2d59953e1d296b6438110c1c4/
/raw/377d54d2d59953e1d296b6438110c1c4/
377d54d2d59953e1d296b6438110c1c4
text
Text only
1
2019-07-09T21:55:05
True
False
False
/api/public/snipt/1164/
format-os-x
<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>diskutil eraseDisk HFS+ newdisk disk1 </span></pre></div> </td></tr></table>
osx