snipt

Ctrl+h for KB shortcuts

Bash

skip unit tests in maven

mvn install -Dmaven.test.skip=true
https://snipt.net/embed/ffb40d8991ad44c4e13f1ae85b5836ed/
/raw/ffb40d8991ad44c4e13f1ae85b5836ed/
ffb40d8991ad44c4e13f1ae85b5836ed
bash
Bash
1
2019-07-22T10:01:39
True
False
False
/api/public/snipt/6674/
skip-unit-tests-in-maven
<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>mvn install -Dmaven.test.skip<span class="o">=</span><span class="nb">true</span> </span></pre></div> </td></tr></table>
mvn, test

Bash

import PPA key

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key id>
https://snipt.net/embed/14f9b7b4b63cffc62884bda6a07743f6/
/raw/14f9b7b4b63cffc62884bda6a07743f6/
14f9b7b4b63cffc62884bda6a07743f6
bash
Bash
1
2019-07-21T03:58:19
True
False
False
/api/public/snipt/5725/
import-ppa-key
<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>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys &lt;key id&gt; </span></pre></div> </td></tr></table>
apt, gpg, ubuntu

Bash

GPG public key import

gpg --keyserver subkeys.pgp.net --recv-key <fingerprint>
gpg --export <fingerprint> | sudo apt-key add -
https://snipt.net/embed/a24db9423c99b35a11a7098d9d29915a/
/raw/a24db9423c99b35a11a7098d9d29915a/
a24db9423c99b35a11a7098d9d29915a
bash
Bash
2
2019-07-21T03:32:30
True
False
False
/api/public/snipt/4268/
gpg-public-key-import
<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></span><span id="L-1"><a name="L-1"></a>gpg --keyserver subkeys.pgp.net --recv-key &lt;fingerprint&gt; </span><span id="L-2"><a name="L-2"></a>gpg --export &lt;fingerprint&gt; <span class="p">|</span> sudo apt-key add - </span></pre></div> </td></tr></table>
apt, gpg, ubuntu

Bash

Rip DVD with VLV

vlc dvd:/dev/[email protected] --sout "#standard{access=file,mux=ps,dst=movie.ps}"
https://snipt.net/embed/48c7dbb2448f3050128c18392b02c4bb/
/raw/48c7dbb2448f3050128c18392b02c4bb/
48c7dbb2448f3050128c18392b02c4bb
bash
Bash
1
2019-07-21T03:58:24
True
False
False
/api/public/snipt/3466/
rip-dvd-with-vlv
<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>vlc dvd:/dev/[email protected] --sout <span class="s2">&quot;#standard{access=file,mux=ps,dst=movie.ps}&quot;</span> </span></pre></div> </td></tr></table>
dvd, rip, video, vlc

Bash

Rip audio track from video file

1
2
3
ffmpeg -i video.avi audio.mp3

mplayer -dumpaudio video.avi -dumpfile audio.mp3
https://snipt.net/embed/df840061eed54ad58cccff9ef219109d/
/raw/df840061eed54ad58cccff9ef219109d/
df840061eed54ad58cccff9ef219109d
bash
Bash
3
2019-07-22T09:12:07
True
False
False
/api/public/snipt/3433/
rip-audio-track-from-video-file
<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>ffmpeg -i video.avi audio.mp3 </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>mplayer -dumpaudio video.avi -dumpfile audio.mp3 </span></pre></div> </td></tr></table>
audio, rip, video

Bash

concatenate video files

mencoder video1.avi video2.avi ... -o bigvideo.avi -ovc copy -oac copy
https://snipt.net/embed/0296ae696f0da5b96d863fb0ba532e53/
/raw/0296ae696f0da5b96d863fb0ba532e53/
0296ae696f0da5b96d863fb0ba532e53
bash
Bash
1
2019-07-21T03:58:34
True
False
False
/api/public/snipt/2245/
concatenate-video-files
<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>mencoder video1.avi video2.avi ... -o bigvideo.avi -ovc copy -oac copy </span></pre></div> </td></tr></table>
linux, video

Bash

show files not added to perforce

find . -type f -print0 | xargs -0 p4 fstat 2>&1 | grep " - no such file(s).$" | grep -v .DS_Store | grep -v /target/
https://snipt.net/embed/278342e35f6bc38d23076f4e280be01c/
/raw/278342e35f6bc38d23076f4e280be01c/
278342e35f6bc38d23076f4e280be01c
bash
Bash
1
2019-07-21T03:32:34
True
False
False
/api/public/snipt/1884/
show-files-not-added-to-perforce
<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 . -type f -print0 <span class="p">|</span> xargs -0 p4 fstat 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="p">|</span> grep <span class="s2">&quot; - no such file(s).</span>$<span class="s2">&quot;</span> <span class="p">|</span> grep -v .DS_Store <span class="p">|</span> grep -v /target/ </span></pre></div> </td></tr></table>
osx, perforce

Bash

network interface settings and speed

sudo ethtool eth0
https://snipt.net/embed/44c760eeaf28008f0d63495d423d8044/
/raw/44c760eeaf28008f0d63495d423d8044/
44c760eeaf28008f0d63495d423d8044
bash
Bash
1
2019-07-21T03:32:36
True
False
False
/api/public/snipt/1255/
network-interface-settings-and-spped
<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>sudo ethtool eth0 </span></pre></div> </td></tr></table>
linux, network, speed

Bash

raid drives status check

mdadm --query --detail /dev/md1
https://snipt.net/embed/24ab27e4c5e18f6957d22cf3c8a19515/
/raw/24ab27e4c5e18f6957d22cf3c8a19515/
24ab27e4c5e18f6957d22cf3c8a19515
bash
Bash
1
2019-07-21T03:32:38
True
False
False
/api/public/snipt/180/
raid-drives-status-check
<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>mdadm --query --detail /dev/md1 </span></pre></div> </td></tr></table>
raid