snipt

Ctrl+h for KB shortcuts

Ruby

TextMate : Run current scala file as Script

1
2
3
4
5
6
7
#!/usr/bin/env ruby -w

cmd = ENV['SCALA_HOME'] + "bin/scala -nocompdaemon -howtorun:script '" + ENV['TM_FILEPATH'] + "'"

result = "" + `#{cmd}`

puts "#{result}"
https://snipt.net/embed/bfafdafd7d7c30dbc040633e4cc8b106/
/raw/bfafdafd7d7c30dbc040633e4cc8b106/
bfafdafd7d7c30dbc040633e4cc8b106
rb
Ruby
7
2016-12-25T10:34:30
True
False
True
Jul 04, 2013 at 06:19 PM
/api/public/snipt/66491/
textmate-run-filescala-as-script
<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></span><span id="L-1"><a name="L-1"></a><span class="ch">#!/usr/bin/env ruby -w</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="n">cmd</span> <span class="o">=</span> <span class="no">ENV</span><span class="o">[</span><span class="s1">&#39;SCALA_HOME&#39;</span><span class="o">]</span> <span class="o">+</span> <span class="s2">&quot;bin/scala -nocompdaemon -howtorun:script &#39;&quot;</span> <span class="o">+</span> <span class="no">ENV</span><span class="o">[</span><span class="s1">&#39;TM_FILEPATH&#39;</span><span class="o">]</span> <span class="o">+</span> <span class="s2">&quot;&#39;&quot;</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="n">result</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span> <span class="o">+</span> <span class="sb">`</span><span class="si">#{</span><span class="n">cmd</span><span class="si">}</span><span class="sb">`</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="nb">puts</span> <span class="s2">&quot;</span><span class="si">#{</span><span class="n">result</span><span class="si">}</span><span class="s2">&quot;</span> </span></pre></div> </td></tr></table>

SQL

Delete duplicate records in Oracle by Id

delete from duplicates where rowid not in ( SELECT MIN(rowid)
FROM duplicates GROUP BY id)
https://snipt.net/embed/008709c30a171cd7643eb5017d1b1b38/
/raw/008709c30a171cd7643eb5017d1b1b38/
008709c30a171cd7643eb5017d1b1b38
sql
SQL
2
2019-08-15T06:28:30
True
False
False
/api/public/snipt/55395/
delete-duplicate-records-in-oracle-by-id
<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="k">delete</span> <span class="k">from</span> <span class="n">duplicates</span> <span class="k">where</span> <span class="n">rowid</span> <span class="k">not</span> <span class="k">in</span> <span class="p">(</span> <span class="k">SELECT</span> <span class="k">MIN</span><span class="p">(</span><span class="n">rowid</span><span class="p">)</span> </span><span id="L-2"><a name="L-2"></a><span class="k">FROM</span> <span class="n">duplicates</span> <span class="k">GROUP</span> <span class="k">BY</span> <span class="n">id</span><span class="p">)</span> </span></pre></div> </td></tr></table>

HTML

Editable Selector

1
2
3
4
5
6
7
<select id="combo4" style="width: 200px;" onchange="$('input#text4').val($(this).val());">
    <option>option 1</option>
    <option>option 2</option>
    <option>option 3</option>
</select>

<input id="text4" style="margin-left: -203px; width: 180px; height: 1.2em; border: 0;" />
https://snipt.net/embed/fc96b535ed70199346d352f3f5d5b1d7/
/raw/fc96b535ed70199346d352f3f5d5b1d7/
fc96b535ed70199346d352f3f5d5b1d7
html
HTML
7
2019-08-09T15:03:30
True
False
False
/api/public/snipt/54411/
editable-selector
<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></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">select</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;combo4&quot;</span> <span class="na">style</span><span class="o">=</span><span class="s">&quot;width: 200px;&quot;</span> <span class="na">onchange</span><span class="o">=</span><span class="s">&quot;$(&#39;input#text4&#39;).val($(this).val());&quot;</span><span class="p">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="p">&lt;</span><span class="nt">option</span><span class="p">&gt;</span>option 1<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="p">&lt;</span><span class="nt">option</span><span class="p">&gt;</span>option 2<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="p">&lt;</span><span class="nt">option</span><span class="p">&gt;</span>option 3<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> </span><span id="L-5"><a name="L-5"></a><span class="p">&lt;/</span><span class="nt">select</span><span class="p">&gt;</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;text4&quot;</span> <span class="na">style</span><span class="o">=</span><span class="s">&quot;margin-left: -203px; width: 180px; height: 1.2em; border: 0;&quot;</span> <span class="p">/&gt;</span> </span></pre></div> </td></tr></table>
html, jquery

Text only

Understanding PlayFramework 2.0

1
2
3
4
5
To understand the concepts I made the following Mind Map:

https://www.xmind.net/m/CFc9/

Enjoy!
https://snipt.net/embed/14cbdab3eb559651e9d25bb693ef8b9a/
/raw/14cbdab3eb559651e9d25bb693ef8b9a/
14cbdab3eb559651e9d25bb693ef8b9a
text
Text only
5
2016-12-21T17:29:03
True
False
True
Dec 27, 2012 at 04:18 PM
/api/public/snipt/52443/
understanding-playframework-20
<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></span><span id="L-1"><a name="L-1"></a>To understand the concepts I made the following Mind Map: </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>https://www.xmind.net/m/CFc9/ </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>Enjoy! </span></pre></div> </td></tr></table>
playframework