snipt

Ctrl+h for KB shortcuts

Bash

Change default location where OSX saves screenshots.

defaults write com.apple.screencapture location ~/Desktop/Screenshots/ && killall SystemUIServer
https://snipt.net/embed/23c0fd8e90df017b2c9b6f6330caa447/
https://snipt.net/raw/23c0fd8e90df017b2c9b6f6330caa447/
23c0fd8e90df017b2c9b6f6330caa447
bash
Bash
1
2016-09-29T09:27:13
True
False
False
/api/public/snipt/30422/
change-default-location-where-osx-saves-screenshots
<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>defaults write com.apple.screencapture location ~/Desktop/Screenshots/ <span class="o">&amp;&amp;</span> killall SystemUIServer </span></pre></div> </td></tr></table>
macosx, osx, shell, utilities

Bash

how to configure, build a php extension on macosx snow leopard ( intel arch only )

1
2
3
4
5
$ cd /src/php/ext/dir
$ phpize 
$ MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' ./configure --with-php-config=/Developer/SDKs/MacOSX10.6.sdk/usr/bin/php-config
$ make -j6
$ sudo make install
https://snipt.net/embed/5a706cbea9e68f66f9a071f6a06a97cc/
https://snipt.net/raw/5a706cbea9e68f66f9a071f6a06a97cc/
5a706cbea9e68f66f9a071f6a06a97cc
bash
Bash
5
2016-09-28T12:43:41
True
False
False
/api/public/snipt/9041/
how-to-configure-build-a-php-extension-on-macosx-snow-leopard
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nv">$ </span><span class="nb">cd</span> /src/php/ext/dir </span><span id="L-2"><a name="L-2"></a><span class="nv">$ </span>phpize </span><span id="L-3"><a name="L-3"></a><span class="nv">$ MACOSX_DEPLOYMENT_TARGET</span><span class="o">=</span>10.6 <span class="nv">CFLAGS</span><span class="o">=</span><span class="s1">&#39;-O3 -fno-common -arch i386 -arch x86_64&#39;</span> <span class="nv">LDFLAGS</span><span class="o">=</span><span class="s1">&#39;-O3 -arch i386 -arch x86_64&#39;</span> <span class="nv">CXXFLAGS</span><span class="o">=</span><span class="s1">&#39;-O3 -fno-common -arch i386 -arch x86_64&#39;</span> ./configure --with-php-config<span class="o">=</span>/Developer/SDKs/MacOSX10.6.sdk/usr/bin/php-config </span><span id="L-4"><a name="L-4"></a><span class="nv">$ </span>make -j6 </span><span id="L-5"><a name="L-5"></a><span class="nv">$ </span>sudo make install </span></pre></div> </td></tr></table>
compilation, configure, extension, macosx, php, snowleopard

Text only

Diff Mac OS X Directories

1
2
3
4
5
6
7
Mac OS X diff directories:
diff -rq dirA dirB

Or, sorted and tidyer:

diff -qr dirA dirB | grep -v -e 'DS_Store' -e 'Thumbs' | 
sort > diffs.txt
https://snipt.net/embed/03f86222b33a87e4ad085fc60fb3bbe3/
https://snipt.net/raw/03f86222b33a87e4ad085fc60fb3bbe3/
03f86222b33a87e4ad085fc60fb3bbe3
text
Text only
7
2016-09-20T14:32:58
True
False
False
/api/public/snipt/3097/
diff-mac-os-x-directories
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Mac OS X diff directories: </span><span id="L-2"><a name="L-2"></a>diff -rq dirA dirB </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>Or, sorted and tidyer: </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a>diff -qr dirA dirB | grep -v -e &#39;DS_Store&#39; -e &#39;Thumbs&#39; | </span><span id="L-7"><a name="L-7"></a>sort &gt; diffs.txt </span></pre></div> </td></tr></table>
diff, dir, macosx

Text only

Renew DHCP when button missing from Sys Pref

1
2
3
4
Mac OS X renew DHCP when renew dhcp button missing from system preferences panel:

sudo ipconfig set en0 BOOTP
sudo ipconfig set en0 DHCP.
https://snipt.net/embed/1bf0cf39a8d88028002964827e808063/
https://snipt.net/raw/1bf0cf39a8d88028002964827e808063/
1bf0cf39a8d88028002964827e808063
text
Text only
4
2016-09-26T12:17:34
True
False
False
/api/public/snipt/2888/
renew-dhcp-when-button-missing-from-sys-pref
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Mac OS X renew DHCP when renew dhcp button missing from system preferences panel: </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>sudo ipconfig set en0 BOOTP </span><span id="L-4"><a name="L-4"></a>sudo ipconfig set en0 DHCP. </span></pre></div> </td></tr></table>
commandline, dhcp, macosx

Text only

Mac OS X screen as a serial console

screen /dev/tty.PL2303-0000201A 9600
https://snipt.net/embed/4d4af6f4471a6e4fd43a02062fbd865e/
https://snipt.net/raw/4d4af6f4471a6e4fd43a02062fbd865e/
4d4af6f4471a6e4fd43a02062fbd865e
text
Text only
1
2016-09-30T01:45:52
True
False
False
/api/public/snipt/2543/
mac-os-x-screen-as-a-serial-console
<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>screen /dev/tty.PL2303-0000201A 9600 </span></pre></div> </td></tr></table>
cli, macosx, screen, serial

Bash

Remove .DS_Store files

1
2
3
#!/bin/bash
 
find . -name .DS_Store -exec rm {} \;
https://snipt.net/embed/68ef5680e1f0018da2072d72c1e50b43/
https://snipt.net/raw/68ef5680e1f0018da2072d72c1e50b43/
68ef5680e1f0018da2072d72c1e50b43
bash
Bash
3
2016-09-28T18:53:06
True
False
False
/api/public/snipt/878/
remove-ds_store-files
<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 id="L-1"><a name="L-1"></a><span class="c">#!/bin/bash</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>find . -name .DS_Store -exec rm <span class="o">{}</span> <span class="se">\;</span> </span></pre></div> </td></tr></table>
delete, ds_store, macosx
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.