Skip to content

Instantly share code, notes, and snippets.

View dmtrmrv's full-sized avatar

Dmitry Mayorov dmtrmrv

  • 10up
View GitHub Profile
@dmtrmrv
dmtrmrv / avoid-console-errors.js
Created June 28, 2014 11:16
JavaScript - Avoid Errors in browsers that lack console.
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
@dmtrmrv
dmtrmrv / google-analytics.html
Last active August 29, 2015 14:03
HTML - Google Analytics.
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
</script>
@dmtrmrv
dmtrmrv / paragraph-medium.html
Last active August 29, 2015 14:03
HTML - Medium Paragraph
<p>A paragraph is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph has 5 types. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.</p>
@dmtrmrv
dmtrmrv / paragraph-long.html
Last active August 29, 2015 14:03
HTML - Long Paragraph
<p>In literary theory, a text is any object that can be read, whether this object is a work of literature, a street sign, an arrangement of buildings on a city block, or styles of clothing. It is a coherent set of signs that transmits some kind of informative message. This set of symbols is considered in terms of the informative message's content, rather than in terms of its physical form or the medium in which it is represented. Within the field of literary criticism, text also refers to the original information content of a particular piece of writing; that is, the text of a work is that primal symbolic arrangement of letters as originally composed, apart from later alterations, deterioration, commentary, translations, paratext, etc. Therefore, when literary criticism is concerned with the determination of a text, it is concerned with the distinguishing of the original information content from whatever has been added to or subtracted from that content as it appears in a given textual document (that is, a ph
@dmtrmrv
dmtrmrv / paragraph-short.html
Created June 29, 2014 07:24
HTML - Short Paragraph
<p>A sentence is a linguistic unit consisting of one or more words that are grammatically linked.</p>
@dmtrmrv
dmtrmrv / ul-short-items.html
Created June 30, 2014 01:12
HTML - Unordered List: Short Items
<ul>
<li>Americano</li>
<li>Cappuccino</li>
<li>Espresso</li>
<li>Decaf</li>
</ul>
@dmtrmrv
dmtrmrv / ul-long-items.html
Last active August 29, 2015 14:03
HTML - Unordered List: Long Items
<ul>
<li>Americano is a style of coffee prepared by adding hot water to espresso, giving a similar strength to but different flavor from regular drip coffee.</li>
<li>Cappuccino is a coffee-based drink prepared with espresso, hot milk, and steamed milk foam.</li>
<li>Espresso is a concentrated beverage brewed by forcing a small amount of nearly boiling water — about 86 to 95 °C (187 to 203 °F) — under pressure through finely ground coffee beans.</li>
<li>Decaf is a coffee beverage made with decaffeinated beans.</li>
</ul>
@dmtrmrv
dmtrmrv / html-ol-short-items.html
Created June 30, 2014 01:33
HTML - Ordered List: Short Items
<ol>
<li>Americano</li>
<li>Cappuccino</li>
<li>Espresso</li>
<li>Decaf</li>
</ol>
@dmtrmrv
dmtrmrv / html-ol-long-items.html
Created June 30, 2014 01:40
HTML - Ordered List: Long Items
<ol>
<li>Americano is a style of coffee prepared by adding hot water to espresso, giving a similar strength to but different flavor from regular drip coffee.</li>
<li>Cappuccino is a coffee-based drink prepared with espresso, hot milk, and steamed milk foam.</li>
<li>Espresso is a concentrated beverage brewed by forcing a small amount of nearly boiling water — about 86 to 95 °C (187 to 203 °F) — under pressure through finely ground coffee beans.</li>
<li>Decaf is a coffee beverage made with decaffeinated beans.</li>
</ol>
@dmtrmrv
dmtrmrv / index.html
Created July 5, 2014 07:07
HTML - Basic Tags from Theme Unit
<h2>Headings</h2>
<h1>Header one</h1>
<h2>Header two</h2>
<h3>Header three</h3>
<h4>Header four</h4>
<h5>Header five</h5>
<h6>Header six</h6>
<h2>Blockquotes</h2>
<p>Single line blockquote:</p>
<blockquote>