snipt

Ctrl+h for KB shortcuts

Bash

Mercurial case fail.

1
2
3
4
5
6
7
8
destination directory: dotfiles
requesting all changes
adding changesets
adding manifests
adding file changes
added 188 changesets with 1304 changes to 714 files
updating to branch default
abort: case-folding collision between .vim/bundle/vim-coffee-script/copying.md and .vim/bundle/vim-coffee-script/Copying.md
https://snipt.net/embed/95fb67a646f2849641d05fb6dc8676c8/
/raw/95fb67a646f2849641d05fb6dc8676c8/
95fb67a646f2849641d05fb6dc8676c8
bash
Bash
8
2019-06-17T22:50:32
True
False
False
/api/public/snipt/43337/
mercurial-case-fail
<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> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>destination directory: dotfiles </span><span id="L-2"><a name="L-2"></a>requesting all changes </span><span id="L-3"><a name="L-3"></a>adding changesets </span><span id="L-4"><a name="L-4"></a>adding manifests </span><span id="L-5"><a name="L-5"></a>adding file changes </span><span id="L-6"><a name="L-6"></a>added <span class="m">188</span> changesets with <span class="m">1304</span> changes to <span class="m">714</span> files </span><span id="L-7"><a name="L-7"></a>updating to branch default </span><span id="L-8"><a name="L-8"></a>abort: <span class="k">case</span>-folding collision between .vim/bundle/vim-coffee-script/copying.md and .vim/bundle/vim-coffee-script/Copying.md </span></pre></div> </td></tr></table>
bash, hg, mercurial

Bash

bluebird custom themes directory

~/Library/Application Support/Bluebird
https://snipt.net/embed/61c9d1c55edf388b67b2466b098ec2a9/
/raw/61c9d1c55edf388b67b2466b098ec2a9/
61c9d1c55edf388b67b2466b098ec2a9
bash
Bash
1
2019-06-08T08:27:38
True
False
False
/api/public/snipt/4767/
bluebird-custom-themes-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>~/Library/Application Support/Bluebird </span></pre></div> </td></tr></table>
bash

Bash

bashrc aliases for svn add all and svn delete all

alias svnaddall='svn status | grep "^\?" | awk "{print \$2}" | xargs svn add'
alias svndelall='svn status | grep "^\!" | awk "{print \$2}" | xargs svn delete'
https://snipt.net/embed/9d1b127072cd3edf8e5f6461370429f5/
/raw/9d1b127072cd3edf8e5f6461370429f5/
9d1b127072cd3edf8e5f6461370429f5
bash
Bash
2
2019-06-10T14:50:11
True
False
False
/api/public/snipt/4669/
bashrc-aliases-for-svn-add-all-and-svn-delete-all
<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><span class="nb">alias</span> <span class="nv">svnaddall</span><span class="o">=</span><span class="s1">&#39;svn status | grep &quot;^\?&quot; | awk &quot;{print \$2}&quot; | xargs svn add&#39;</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">alias</span> <span class="nv">svndelall</span><span class="o">=</span><span class="s1">&#39;svn status | grep &quot;^\!&quot; | awk &quot;{print \$2}&quot; | xargs svn delete&#39;</span> </span></pre></div> </td></tr></table>
bash, subversion

Bash

create multiple directories in unix

mkdir -p domain.com/{public,private,log,cgi-bin,backup}
https://snipt.net/embed/91f18b0263eb25343da69bbb9c22f1ef/
/raw/91f18b0263eb25343da69bbb9c22f1ef/
91f18b0263eb25343da69bbb9c22f1ef
bash
Bash
1
2019-06-07T09:14:32
True
False
False
/api/public/snipt/3476/
create-multiple-directories-in-unix
<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>mkdir -p domain.com/<span class="o">{</span>public,private,log,cgi-bin,backup<span class="o">}</span> </span></pre></div> </td></tr></table>
apache, bash, nginx, unix

Bash

simple unix backup script with rsync, sync only changes

rsync -vare ssh [email protected]:/path/to/files/* /path/to/local/
https://snipt.net/embed/cd36a739ebc4820e8bfd6289be84ba9a/
/raw/cd36a739ebc4820e8bfd6289be84ba9a/
cd36a739ebc4820e8bfd6289be84ba9a
bash
Bash
1
2019-06-18T00:25:51
True
False
False
/api/public/snipt/3471/
simple-unix-backup-script-with-rsync-sync-only-changes
<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>rsync -vare ssh [email protected]:/path/to/files/* /path/to/local/ </span></pre></div> </td></tr></table>
bash, unix

Bash

recursively remove all .pyc files from current directory

find . -name "*.pyc" -exec rm '{}' ';'
https://snipt.net/embed/0525a4d3e0f8c1da0a29563f4e568682/
/raw/0525a4d3e0f8c1da0a29563f4e568682/
0525a4d3e0f8c1da0a29563f4e568682
bash
Bash
1
2019-06-18T00:00:46
True
False
False
/api/public/snipt/3422/
recursively-remove-all-pyc-files-from-current-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 <span class="s2">&quot;*.pyc&quot;</span> -exec rm <span class="s1">&#39;{}&#39;</span> <span class="s1">&#39;;&#39;</span> </span></pre></div> </td></tr></table>
bash, python

Bash

unix / linux directory tree

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/' 
https://snipt.net/embed/1e6cc974ab23c7be46253a69cb87b908/
/raw/1e6cc974ab23c7be46253a69cb87b908/
1e6cc974ab23c7be46253a69cb87b908
bash
Bash
1
2019-06-16T05:14:31
True
False
False
/api/public/snipt/3319/
unix-linux-directory-tree
<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>ls -R <span class="p">|</span> grep <span class="s2">&quot;:</span>$<span class="s2">&quot;</span> <span class="p">|</span> sed -e <span class="s1">&#39;s/:$//&#39;</span> -e <span class="s1">&#39;s/[^-][^\/]*\//--/g&#39;</span> -e <span class="s1">&#39;s/^/ /&#39;</span> -e <span class="s1">&#39;s/-/|/&#39;</span> </span></pre></div> </td></tr></table>
bash, mac, osx, unix

Bash

flush dns cache on mac os x

dscacheutil -flushcache
https://snipt.net/embed/897f9fed597be095e04359b2c24fd166/
/raw/897f9fed597be095e04359b2c24fd166/
897f9fed597be095e04359b2c24fd166
bash
Bash
1
2019-06-04T11:00:11
True
False
False
/api/public/snipt/2639/
flush-dns-cache-on-mac-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>dscacheutil -flushcache </span></pre></div> </td></tr></table>
bash, mac, osx

Bash

set user mask to auto-assign perms of 775 to newly created directories in unix

# in /etc/profile or /etc/bashrc
umask 002
https://snipt.net/embed/2b39c6ac07090bfa68f90e484b96beaa/
/raw/2b39c6ac07090bfa68f90e484b96beaa/
2b39c6ac07090bfa68f90e484b96beaa
bash
Bash
2
2019-06-01T14:46:18
True
False
False
/api/public/snipt/2559/
set-user-mask-to-auto-assign-perms-of-775-to-newly-created-directories-in-unix
<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><span class="c1"># in /etc/profile or /etc/bashrc</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">umask</span> 002 </span></pre></div> </td></tr></table>
bash, unix