snipt

Ctrl+h for KB shortcuts

Ruby

in console displays activerecord's sql operations

ActiveRecord::Base.logger = Logger.new(STDOUT)
https://snipt.net/embed/b7f919534c624dea2eb5d12037ac9ae9/
/raw/b7f919534c624dea2eb5d12037ac9ae9/
b7f919534c624dea2eb5d12037ac9ae9
rb
Ruby
2
2019-08-14T20:38:17
True
False
False
/api/public/snipt/7701/
in-console-displays-activerecords-sql-operaitons
<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><span class="no">ActiveRecord</span><span class="o">::</span><span class="no">Base</span><span class="o">.</span><span class="n">logger</span> <span class="o">=</span> <span class="no">Logger</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="no">STDOUT</span><span class="p">)</span> </span></pre></div> </td></tr></table>
console, rails, sql

Bash

Avoid beep from console

$> echo "setterm -bfreq 0" >> ~/.bashrc
$> source ~/.bashrc
https://snipt.net/embed/c142093b6d6ff490fc5620a6a083f1e4/
/raw/c142093b6d6ff490fc5620a6a083f1e4/
c142093b6d6ff490fc5620a6a083f1e4
bash
Bash
2
2019-08-10T04:59:18
True
False
False
/api/public/snipt/6355/
avoid-beep-from-console
<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>$&gt; <span class="nb">echo</span> <span class="s2">&quot;setterm -bfreq 0&quot;</span> &gt;&gt; ~/.bashrc </span><span id="L-2"><a name="L-2"></a>$&gt; <span class="nb">source</span> ~/.bashrc </span></pre></div> </td></tr></table>
console, linux