snipt

Ctrl+h for KB shortcuts

Text only

Swift experiment

1
2
3
if 5 seconds standby
else no activity
then print \
https://snipt.net/embed/398d2175bcb6b8b886c97c62c926b025/
/raw/398d2175bcb6b8b886c97c62c926b025/
398d2175bcb6b8b886c97c62c926b025
text
Text only
3
2019-05-22T07:06:35
True
False
False
Mar 07, 2019 at 09:52 AM
/api/public/snipt/148280/
swift-experiment
<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></span><span id="L-1"><a name="L-1"></a>if 5 seconds standby </span><span id="L-2"><a name="L-2"></a>else no activity </span><span id="L-3"><a name="L-3"></a>then print \ </span></pre></div> </td></tr></table>

Text only

aaaaaaaaaa test

assdasdasdas password
https://snipt.net/embed/763196b7b92dfc24dedd6d8136666f90/
/raw/763196b7b92dfc24dedd6d8136666f90/
763196b7b92dfc24dedd6d8136666f90
text
Text only
2
2019-05-22T09:24:43
True
False
False
Feb 25, 2019 at 12:14 PM
/api/public/snipt/148272/
aaaaaaaaaa-test
<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>assdasdasdas password </span></pre></div> </td></tr></table>

SQL

Pensión alimenticia

1
2
3
4
5
6
7
8
# IMPORTANTE: Verificar primero que no exista ya el registro

INSERT into paysheet_company_element_concepts (element_id,company_id, `key`, label, name, sort, config, status, created_at, unique_id, concept,type, deleted_at, dynamic_columns,afterall_callback, apply)
SELECT
    id, 'id-de-la-compañia', `key`, 'PENSIÓN ALIMENTICIA', 'PENSIÓN ALIMENTICIA', 1500, '{}', 1, NOW(),  RIGHT(MD5(CONCAT(unique_id, "-id-de-la-compañia")), 25), 'pension_alimenticia', type, NULL, COLUMN_CREATE('default', 1, 'discountForPeriods', 0, 'isFix', 1), NULL, 1
FROM paysheet_elements
WHERE unique_id = 'd_alimienticia'
;
https://snipt.net/embed/9e77180e42a141aacacc8caaedbf32b1/
/raw/9e77180e42a141aacacc8caaedbf32b1/
9e77180e42a141aacacc8caaedbf32b1
sql
SQL
8
2019-05-24T16:46:26
True
False
False
Feb 12, 2019 at 01:28 PM
/api/public/snipt/148256/
pension-alimenticia
<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></span><span id="L-1"><a name="L-1"></a><span class="o">#</span> <span class="n">IMPORTANTE</span><span class="p">:</span> <span class="n">Verificar</span> <span class="n">primero</span> <span class="n">que</span> <span class="k">no</span> <span class="n">exista</span> <span class="n">ya</span> <span class="n">el</span> <span class="n">registro</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="k">INSERT</span> <span class="k">into</span> <span class="n">paysheet_company_element_concepts</span> <span class="p">(</span><span class="n">element_id</span><span class="p">,</span><span class="n">company_id</span><span class="p">,</span> <span class="o">`</span><span class="k">key</span><span class="o">`</span><span class="p">,</span> <span class="n">label</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">sort</span><span class="p">,</span> <span class="n">config</span><span class="p">,</span> <span class="n">status</span><span class="p">,</span> <span class="n">created_at</span><span class="p">,</span> <span class="n">unique_id</span><span class="p">,</span> <span class="n">concept</span><span class="p">,</span><span class="k">type</span><span class="p">,</span> <span class="n">deleted_at</span><span class="p">,</span> <span class="n">dynamic_columns</span><span class="p">,</span><span class="n">afterall_callback</span><span class="p">,</span> <span class="n">apply</span><span class="p">)</span> </span><span id="L-4"><a name="L-4"></a><span class="k">SELECT</span> </span><span id="L-5"><a name="L-5"></a> <span class="n">id</span><span class="p">,</span> <span class="s1">&#39;id-de-la-compañia&#39;</span><span class="p">,</span> <span class="o">`</span><span class="k">key</span><span class="o">`</span><span class="p">,</span> <span class="s1">&#39;PENSIÓN ALIMENTICIA&#39;</span><span class="p">,</span> <span class="s1">&#39;PENSIÓN ALIMENTICIA&#39;</span><span class="p">,</span> <span class="mi">1500</span><span class="p">,</span> <span class="s1">&#39;{}&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">NOW</span><span class="p">(),</span> <span class="k">RIGHT</span><span class="p">(</span><span class="n">MD5</span><span class="p">(</span><span class="n">CONCAT</span><span class="p">(</span><span class="n">unique_id</span><span class="p">,</span> <span class="ss">&quot;-id-de-la-compañia&quot;</span><span class="p">)),</span> <span class="mi">25</span><span class="p">),</span> <span class="s1">&#39;pension_alimenticia&#39;</span><span class="p">,</span> <span class="k">type</span><span class="p">,</span> <span class="k">NULL</span><span class="p">,</span> <span class="n">COLUMN_CREATE</span><span class="p">(</span><span class="s1">&#39;default&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">&#39;discountForPeriods&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;isFix&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="k">NULL</span><span class="p">,</span> <span class="mi">1</span> </span><span id="L-6"><a name="L-6"></a><span class="k">FROM</span> <span class="n">paysheet_elements</span> </span><span id="L-7"><a name="L-7"></a><span class="k">WHERE</span> <span class="n">unique_id</span> <span class="o">=</span> <span class="s1">&#39;d_alimienticia&#39;</span> </span><span id="L-8"><a name="L-8"></a><span class="p">;</span> </span></pre></div> </td></tr></table>
"pension alimenticia", insert, paysheet_company_element_concepts