snipt

Ctrl+h for KB shortcuts

Bash

SASS watch changes script for OS X (save in .command file and run)

cd $(dirname "$0")
sass --watch "style.scss":"style.css"
https://snipt.net/embed/545eedf4c165272bbce7e4b217c0d2e2/
https://snipt.net/raw/545eedf4c165272bbce7e4b217c0d2e2/
545eedf4c165272bbce7e4b217c0d2e2
bash
Bash
2
2016-09-07T02:18:25
True
False
True
Feb 12, 2013 at 01:17 PM
/api/public/snipt/48430/
sass-watch-changes-script-for-os-x-save-in-command-file-and-run
<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 id="L-1"><a name="L-1"></a><span class="nb">cd</span> <span class="k">$(</span>dirname <span class="s2">&quot;</span><span class="nv">$0</span><span class="s2">&quot;</span><span class="k">)</span> </span><span id="L-2"><a name="L-2"></a>sass --watch <span class="s2">&quot;style.scss&quot;</span>:<span class="s2">&quot;style.css&quot;</span> </span></pre></div> </td></tr></table>
"os x", css, ruby, sass, webdev

Bash

uninstall homebrew

1
2
3
4
5
6
7
8
cd `brew --prefix`
rm -rf Cellar
brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew

---
This should also revert your /usr/local folder to its pre-Homebrew days. See the Homebrew installation wiki (http://github.com/mxcl/homebrew/wiki/installation) for more information.
https://snipt.net/embed/aa127681f8fc01ce04f79700a93d81d4/
https://snipt.net/raw/aa127681f8fc01ce04f79700a93d81d4/
aa127681f8fc01ce04f79700a93d81d4
bash
Bash
8
2016-10-01T03:37:09
True
False
False
/api/public/snipt/29855/
uninstall-homebrew
<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 id="L-1"><a name="L-1"></a><span class="nb">cd</span> <span class="sb">`</span>brew --prefix<span class="sb">`</span> </span><span id="L-2"><a name="L-2"></a>rm -rf Cellar </span><span id="L-3"><a name="L-3"></a>brew prune </span><span id="L-4"><a name="L-4"></a>rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew </span><span id="L-5"><a name="L-5"></a>rm -rf ~/Library/Caches/Homebrew </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>--- </span><span id="L-8"><a name="L-8"></a>This should also revert your /usr/local folder to its pre-Homebrew days. See the Homebrew installation wiki <span class="o">(</span>http://github.com/mxcl/homebrew/wiki/installation<span class="o">)</span> <span class="k">for</span> more information. </span></pre></div> </td></tr></table>
"os x", brew, homebrew, uninstall

Bash

Clear OS X Log to speed up Terminal loading.

sudo rm -rf /private/var/log/asl/*.asl
https://snipt.net/embed/ff9fe35b9cc1d6c543689f1ac02ca20c/
https://snipt.net/raw/ff9fe35b9cc1d6c543689f1ac02ca20c/
ff9fe35b9cc1d6c543689f1ac02ca20c
bash
Bash
1
2016-10-01T04:01:28
True
False
False
/api/public/snipt/29203/
clear-os-x-log-to-speed-up-terminal-loading
<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 id="L-1"><a name="L-1"></a>sudo rm -rf /private/var/log/asl/*.asl </span></pre></div> </td></tr></table>
"os x", bash, cmd, faster, log, mac, osx, speed, terminal

Bash

one liner recursive execute command on directory of files

#> for f in /path/to/*;do yourcommand $f;done
https://snipt.net/embed/f6b236c4c1afe16b83af27054f7bbc4f/
https://snipt.net/raw/f6b236c4c1afe16b83af27054f7bbc4f/
f6b236c4c1afe16b83af27054f7bbc4f
bash
Bash
1
2016-09-22T00:48:20
True
False
False
/api/public/snipt/21365/
one-liner-recursive-execute-command-on-directory-of-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 id="L-1"><a name="L-1"></a><span class="c">#&gt; for f in /path/to/*;do yourcommand $f;done</span> </span></pre></div> </td></tr></table>
"os x", bash, commandline, linux, one-liner
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.