snipt

Ctrl+h for KB shortcuts

CSS

Vertical align anything with just 3 lines of CSS

1
2
3
4
5
6
7
.element {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

/* http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ */
https://snipt.net/embed/1343a0d45d565bb3f1628e80106f70cc/
/raw/1343a0d45d565bb3f1628e80106f70cc/
1343a0d45d565bb3f1628e80106f70cc
css
CSS
7
2019-06-23T08:09:23
True
False
False
Jan 22, 2014 at 10:26 AM
/api/public/snipt/107772/
vertical-align-anything-with-just-3-lines-of-css
<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="nc">.element</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">position</span><span class="o">:</span> <span class="nb">relative</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nb">top</span><span class="o">:</span> <span class="m">50%</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="n">transform</span><span class="o">:</span> <span class="n">translateY</span><span class="p">(</span><span class="m">-50%</span><span class="p">);</span> </span><span id="L-5"><a name="L-5"></a><span class="p">}</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="c">/* http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ */</span> </span></pre></div> </td></tr></table>

MySQL

select values with img/a markup

1
2
3
SELECT id, title, introtext
FROM `table`
WHERE introtext LIKE '%<a href%' OR introtext LIKE '%<img src%'
https://snipt.net/embed/a1613f18fa76d94f570562dcc9e19fa9/
/raw/a1613f18fa76d94f570562dcc9e19fa9/
a1613f18fa76d94f570562dcc9e19fa9
mysql
MySQL
3
2019-06-23T08:09:36
True
False
False
/api/public/snipt/31229/
select-values-with-imga-markup
<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><span class="k">SELECT</span> <span class="n">id</span><span class="p">,</span> <span class="n">title</span><span class="p">,</span> <span class="n">introtext</span> </span><span id="L-2"><a name="L-2"></a><span class="k">FROM</span> <span class="ss">`table`</span> </span><span id="L-3"><a name="L-3"></a><span class="k">WHERE</span> <span class="n">introtext</span> <span class="k">LIKE</span> <span class="s1">&#39;%&lt;a href%&#39;</span> <span class="k">OR</span> <span class="n">introtext</span> <span class="k">LIKE</span> <span class="s1">&#39;%&lt;img src%&#39;</span> </span></pre></div> </td></tr></table>
mysql

Text only

guarantee failure

A now 'token' response to bunk management decisions: "I can think of cheaper ways to guarantee failure."
https://snipt.net/embed/fca9471142a26d31c5b96a6941783199/
/raw/fca9471142a26d31c5b96a6941783199/
fca9471142a26d31c5b96a6941783199
text
Text only
1
2019-06-23T08:09:47
True
False
False
/api/public/snipt/549/
guarantee-failure
<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>A now &#39;token&#39; response to bunk management decisions: &quot;I can think of cheaper ways to guarantee failure.&quot; </span></pre></div> </td></tr></table>
auto-response