snipt

Ctrl+h for KB shortcuts

CSS

css clearfix

1
2
3
4
5
6
.clearfix:after {content: "."; display: block; height: 0; clear: both; visibility: hidden;}
.clearfix {display: inline-block;}
/* \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* */
https://snipt.net/embed/bfa696b8d476ed26288efb5aa41af154/
/raw/bfa696b8d476ed26288efb5aa41af154/
bfa696b8d476ed26288efb5aa41af154
css
CSS
6
2019-06-22T07:14:50
True
False
False
/api/public/snipt/35/
css-clearfix
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nc">.clearfix</span><span class="nd">:after</span> <span class="p">{</span><span class="nb">content</span><span class="o">:</span> <span class="s2">&quot;.&quot;</span><span class="p">;</span> <span class="nb">display</span><span class="o">:</span> <span class="nb">block</span><span class="p">;</span> <span class="nb">height</span><span class="o">:</span> <span class="m">0</span><span class="p">;</span> <span class="nb">clear</span><span class="o">:</span> <span class="nb">both</span><span class="p">;</span> <span class="nb">visibility</span><span class="o">:</span> <span class="nb">hidden</span><span class="p">;}</span> </span><span id="L-2"><a name="L-2"></a><span class="nc">.clearfix</span> <span class="p">{</span><span class="nb">display</span><span class="o">:</span> <span class="nb">inline</span><span class="o">-</span><span class="nb">block</span><span class="p">;}</span> </span><span id="L-3"><a name="L-3"></a><span class="c">/* \*/</span> </span><span id="L-4"><a name="L-4"></a><span class="o">*</span> <span class="nt">html</span> <span class="nc">.clearfix</span> <span class="p">{</span><span class="nb">height</span><span class="o">:</span> <span class="m">1%</span><span class="p">;}</span> </span><span id="L-5"><a name="L-5"></a><span class="nc">.clearfix</span> <span class="p">{</span><span class="nb">display</span><span class="o">:</span> <span class="nb">block</span><span class="p">;}</span> </span><span id="L-6"><a name="L-6"></a><span class="c">/* */</span> </span></pre></div> </td></tr></table>
css

CSS

css reset

1
2
3
4
5
6
7
8
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline;}
:focus {outline: 0;}
body {line-height: 1; color: black; background: white;}
ol, ul {list-style: none;}
table {border-collapse: separate; border-spacing: 0;}
caption, th, td {text-align: left; font-weight: normal;}
blockquote:before, blockquote:after, q:before, q:after {content: "";}
blockquote, q {quotes: "" "";}
https://snipt.net/embed/87e715ec82ab19a75e811e2481e94b56/
/raw/87e715ec82ab19a75e811e2481e94b56/
87e715ec82ab19a75e811e2481e94b56
css
CSS
8
2019-06-24T05:41:30
True
False
False
/api/public/snipt/31/
css-reset
<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="nt">html</span><span class="o">,</span> <span class="nt">body</span><span class="o">,</span> <span class="nt">div</span><span class="o">,</span> <span class="nt">span</span><span class="o">,</span> <span class="nt">applet</span><span class="o">,</span> <span class="nt">object</span><span class="o">,</span> <span class="nt">iframe</span><span class="o">,</span> <span class="nt">h1</span><span class="o">,</span> <span class="nt">h2</span><span class="o">,</span> <span class="nt">h3</span><span class="o">,</span> <span class="nt">h4</span><span class="o">,</span> <span class="nt">h5</span><span class="o">,</span> <span class="nt">h6</span><span class="o">,</span> <span class="nt">p</span><span class="o">,</span> <span class="nt">blockquote</span><span class="o">,</span> <span class="nt">pre</span><span class="o">,</span> <span class="nt">a</span><span class="o">,</span> <span class="nt">abbr</span><span class="o">,</span> <span class="nt">acronym</span><span class="o">,</span> <span class="nt">address</span><span class="o">,</span> <span class="nt">big</span><span class="o">,</span> <span class="nt">cite</span><span class="o">,</span> <span class="nt">code</span><span class="o">,</span> <span class="nt">del</span><span class="o">,</span> <span class="nt">dfn</span><span class="o">,</span> <span class="nt">em</span><span class="o">,</span> <span class="nt">font</span><span class="o">,</span> <span class="nt">img</span><span class="o">,</span> <span class="nt">ins</span><span class="o">,</span> <span class="nt">kbd</span><span class="o">,</span> <span class="nt">q</span><span class="o">,</span> <span class="nt">s</span><span class="o">,</span> <span class="nt">samp</span><span class="o">,</span> <span class="nt">small</span><span class="o">,</span> <span class="nt">strike</span><span class="o">,</span> <span class="nt">strong</span><span class="o">,</span> <span class="nt">sub</span><span class="o">,</span> <span class="nt">sup</span><span class="o">,</span> <span class="nt">tt</span><span class="o">,</span> <span class="nt">var</span><span class="o">,</span> <span class="nt">dl</span><span class="o">,</span> <span class="nt">dt</span><span class="o">,</span> <span class="nt">dd</span><span class="o">,</span> <span class="nt">ol</span><span class="o">,</span> <span class="nt">ul</span><span class="o">,</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">fieldset</span><span class="o">,</span> <span class="nt">form</span><span class="o">,</span> <span class="nt">label</span><span class="o">,</span> <span class="nt">legend</span><span class="o">,</span> <span class="nt">table</span><span class="o">,</span> <span class="nt">caption</span><span class="o">,</span> <span class="nt">tbody</span><span class="o">,</span> <span class="nt">tfoot</span><span class="o">,</span> <span class="nt">thead</span><span class="o">,</span> <span class="nt">tr</span><span class="o">,</span> <span class="nt">th</span><span class="o">,</span> <span class="nt">td</span> <span class="p">{</span><span class="nb">margin</span><span class="o">:</span> <span class="m">0</span><span class="p">;</span> <span class="nb">padding</span><span class="o">:</span> <span class="m">0</span><span class="p">;</span> <span class="nb">border</span><span class="o">:</span> <span class="m">0</span><span class="p">;</span> <span class="nb">outline</span><span class="o">:</span> <span class="m">0</span><span class="p">;</span> <span class="nb">font-weight</span><span class="o">:</span> <span class="nb">inherit</span><span class="p">;</span> <span class="nb">font-style</span><span class="o">:</span> <span class="nb">inherit</span><span class="p">;</span> <span class="nb">font-size</span><span class="o">:</span> <span class="m">100%</span><span class="p">;</span> <span class="nb">font-family</span><span class="o">:</span> <span class="nb">inherit</span><span class="p">;</span> <span class="nb">vertical-align</span><span class="o">:</span> <span class="nb">baseline</span><span class="p">;}</span> </span><span id="L-2"><a name="L-2"></a><span class="nd">:focus</span> <span class="p">{</span><span class="nb">outline</span><span class="o">:</span> <span class="m">0</span><span class="p">;}</span> </span><span id="L-3"><a name="L-3"></a><span class="nt">body</span> <span class="p">{</span><span class="nb">line-height</span><span class="o">:</span> <span class="m">1</span><span class="p">;</span> <span class="nb">color</span><span class="o">:</span> <span class="nb">black</span><span class="p">;</span> <span class="nb">background</span><span class="o">:</span> <span class="nb">white</span><span class="p">;}</span> </span><span id="L-4"><a name="L-4"></a><span class="nt">ol</span><span class="o">,</span> <span class="nt">ul</span> <span class="p">{</span><span class="nb">list-style</span><span class="o">:</span> <span class="nb">none</span><span class="p">;}</span> </span><span id="L-5"><a name="L-5"></a><span class="nt">table</span> <span class="p">{</span><span class="nb">border-collapse</span><span class="o">:</span> <span class="nb">separate</span><span class="p">;</span> <span class="nb">border-spacing</span><span class="o">:</span> <span class="m">0</span><span class="p">;}</span> </span><span id="L-6"><a name="L-6"></a><span class="nt">caption</span><span class="o">,</span> <span class="nt">th</span><span class="o">,</span> <span class="nt">td</span> <span class="p">{</span><span class="nb">text-align</span><span class="o">:</span> <span class="nb">left</span><span class="p">;</span> <span class="nb">font-weight</span><span class="o">:</span> <span class="nb">normal</span><span class="p">;}</span> </span><span id="L-7"><a name="L-7"></a><span class="nt">blockquote</span><span class="nd">:before</span><span class="o">,</span> <span class="nt">blockquote</span><span class="nd">:after</span><span class="o">,</span> <span class="nt">q</span><span class="nd">:before</span><span class="o">,</span> <span class="nt">q</span><span class="nd">:after</span> <span class="p">{</span><span class="nb">content</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">;}</span> </span><span id="L-8"><a name="L-8"></a><span class="nt">blockquote</span><span class="o">,</span> <span class="nt">q</span> <span class="p">{</span><span class="nb">quotes</span><span class="o">:</span> <span class="s2">&quot;&quot;</span> <span class="s2">&quot;&quot;</span><span class="p">;}</span> </span></pre></div> </td></tr></table>
css

Bash

checkout drupal

cvs -d:pserver:anonymous:[email protected]:/cvs/drupal checkout -d ./trunk -r DRUPAL-6 drupal
https://snipt.net/embed/5aa852d9efe290b545b826e532ce5750/
/raw/5aa852d9efe290b545b826e532ce5750/
5aa852d9efe290b545b826e532ce5750
bash
Bash
1
2019-06-24T06:47:06
True
False
False
/api/public/snipt/8/
checkout-drupal
<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>cvs -d:pserver:anonymous:[email protected]:/cvs/drupal checkout -d ./trunk -r DRUPAL-6 drupal </span></pre></div> </td></tr></table>
drupal

Bash

checkout drupal module

cvs -d:pserver:anonymous:[email protected]:/cvs/drupal-contrib checkout -d image -r DRUPAL-5--1-6 contributions/modules/image
https://snipt.net/embed/6107868c9b290c8a9de903fdf1aea37c/
/raw/6107868c9b290c8a9de903fdf1aea37c/
6107868c9b290c8a9de903fdf1aea37c
bash
Bash
1
2019-06-16T17:03:03
True
False
False
/api/public/snipt/7/
checkout-drupal-module
<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>cvs -d:pserver:anonymous:[email protected]:/cvs/drupal-contrib checkout -d image -r DRUPAL-5--1-6 contributions/modules/image </span></pre></div> </td></tr></table>
drupal

MySQL

setup email forwarding in mysql

INSERT INTO forwards (source, destination) 
VALUES ('[email protected]', '[email protected]');
https://snipt.net/embed/ececc5f5260b4684af760ce9678f74b6/
/raw/ececc5f5260b4684af760ce9678f74b6/
ececc5f5260b4684af760ce9678f74b6
mysql
MySQL
2
2019-06-22T03:46:06
True
False
False
/api/public/snipt/6/
setup-email-forwarding-in-mysql
<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">INSERT</span> <span class="k">INTO</span> <span class="nf">forwards</span> <span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">destination</span><span class="p">)</span> </span><span id="L-2"><a name="L-2"></a><span class="k">VALUES</span> <span class="p">(</span><span class="s1">&#39;[email protected]&#39;</span><span class="p">,</span> <span class="s1">&#39;[email protected]&#39;</span><span class="p">);</span> </span></pre></div> </td></tr></table>
email, mysql

MySQL

create mysql user and database

1
2
3
4
5
CREATE DATABASE my_database;
GRANT ALL PRIVILEGES ON my_database.* 
TO 'my_user'@'localhost'
IDENTIFIED BY 'my_password' 
WITH GRANT OPTION;
https://snipt.net/embed/7d12b7be7b5e54c74315562b5ce2749e/
/raw/7d12b7be7b5e54c74315562b5ce2749e/
7d12b7be7b5e54c74315562b5ce2749e
mysql
MySQL
5
2019-06-23T11:53:14
True
False
False
/api/public/snipt/1/
create-mysql-user
<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><span class="k">CREATE</span> <span class="k">DATABASE</span> <span class="n">my_database</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="k">GRANT</span> <span class="k">ALL</span> <span class="n">PRIVILEGES</span> <span class="k">ON</span> <span class="n">my_database</span><span class="p">.</span><span class="o">*</span> </span><span id="L-3"><a name="L-3"></a><span class="k">TO</span> <span class="s1">&#39;my_user&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span> </span><span id="L-4"><a name="L-4"></a><span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">&#39;my_password&#39;</span> </span><span id="L-5"><a name="L-5"></a><span class="k">WITH</span> <span class="k">GRANT</span> <span class="k">OPTION</span><span class="p">;</span> </span></pre></div> </td></tr></table>
mysql