snipt

Ctrl+h for KB shortcuts

Bash

move git repo

1
2
3
cd my-git-repo
git remote add beanstalk [email protected]:/userwish.git
git push beanstalk
https://snipt.net/embed/4176b38c1420b418f79c76c7334403e6/
/raw/4176b38c1420b418f79c76c7334403e6/
4176b38c1420b418f79c76c7334403e6
bash
Bash
3
2019-08-19T19:52:42
True
False
False
/api/public/snipt/23088/
move-git-repo
<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="nb">cd</span> my-git-repo </span><span id="L-2"><a name="L-2"></a>git remote add beanstalk [email protected]:/userwish.git </span><span id="L-3"><a name="L-3"></a>git push beanstalk </span></pre></div> </td></tr></table>
git, move

Bash

picture mover one-liner

/bin/ls -1 *.jpg | tar -cf - --files-from=- --transform 's#^\(\([^_][^_]*\)_\([^_][^_]*\)_\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9][0-9][0-9]\).*\)#\6/\4/\5/\1#'  | (cd Destdir/ ; tar -xf - )
https://snipt.net/embed/2f93764400ce9d5fa451526c7a02816e/
/raw/2f93764400ce9d5fa451526c7a02816e/
2f93764400ce9d5fa451526c7a02816e
bash
Bash
2
2019-08-19T19:53:23
True
False
False
/api/public/snipt/3055/
picture-mover-one-liner
<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>/bin/ls -1 *.jpg <span class="p">|</span> tar -cf - --files-from<span class="o">=</span>- --transform <span class="s1">&#39;s#^\(\([^_][^_]*\)_\([^_][^_]*\)_\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9][0-9][0-9]\).*\)#\6/\4/\5/\1#&#39;</span> <span class="p">|</span> <span class="o">(</span><span class="nb">cd</span> Destdir/ <span class="p">;</span> tar -xf - <span class="o">)</span> </span></pre></div> </td></tr></table>
bash, date, directories, files, move, sed, tar, transform