snipt

Ctrl+h for KB shortcuts

Text only

Dock Spacers

defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type=“spacer-tile”;}’
https://snipt.net/embed/3e7d05c7f0db7c76320fc57ca4957700/
/raw/3e7d05c7f0db7c76320fc57ca4957700/
3e7d05c7f0db7c76320fc57ca4957700
text
Text only
1
2019-08-18T18:15:36
True
False
False
/api/public/snipt/39384/
dock-spacers
<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>defaults write com.apple.dock persistent-apps -array-add &#39;{tile-data={}; tile-type=“spacer-tile”;}’ </span></pre></div> </td></tr></table>
OSX, doc, mac, spacer

Text only

list rails databases from console

ActiveRecord::Base.connection.tables
https://snipt.net/embed/73b8530a70f850774ac40f602a78af0c/
/raw/73b8530a70f850774ac40f602a78af0c/
73b8530a70f850774ac40f602a78af0c
text
Text only
1
2019-08-24T09:17:36
True
False
False
/api/public/snipt/36413/
list-rails-databases-from-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></span><span id="L-1"><a name="L-1"></a>ActiveRecord::Base.connection.tables </span></pre></div> </td></tr></table>
console, rails, ruby, terminal

Text only

start local mysql from terminla

mysql.server start
https://snipt.net/embed/fc9faa2c0514cdd45dd849597efbbc3a/
/raw/fc9faa2c0514cdd45dd849597efbbc3a/
fc9faa2c0514cdd45dd849597efbbc3a
text
Text only
1
2019-08-24T22:48:48
True
False
False
/api/public/snipt/36089/
start-local-mysql-from-terminla
<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>mysql.server start </span></pre></div> </td></tr></table>
mysql, rails, terminal

Text only

find and kill a ruby process by port number

lsof -i:3000
kill -9 603
https://snipt.net/embed/9a3d5f758d73c2587950c0c832c2b2a1/
/raw/9a3d5f758d73c2587950c0c832c2b2a1/
9a3d5f758d73c2587950c0c832c2b2a1
text
Text only
2
2019-08-24T22:49:45
True
False
False
/api/public/snipt/35991/
find-and-kill-a-ruby-process-by-port-number
<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>lsof -i:3000 </span><span id="L-2"><a name="L-2"></a>kill -9 603 </span></pre></div> </td></tr></table>
rails, ruby, terminal