This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<rss version="2.0"> | |
<channel> | |
<title>Title of your Feed</title> | |
<link>http://www.yourwebsite.com/</link> | |
<description>This is the description of your Feed. | |
Keep it to one or two sentences.</description> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<item> | |
<title>Content Title</title> | |
<link>Direct URL to content</link> | |
<guid>Unique ID for content. Copy the URL again</guid> | |
<pubDate>Wed, 27 Nov 2013 15:17:32 GMT | |
(Note: The date must be in this format)</pubDate> | |
<description>Description for your content.</description> | |
</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<rss version="2.0"> | |
<channel> | |
<title>My Cool Blog</title> | |
<link>http://www.yourwebsite.com/</link> | |
<description>My latest cool articles</description> | |
<item> | |
<title>Article 3</title> | |
<link>example.com/3</link> | |
<guid>example.com/3</guid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom"> | |
<title>Example Feed</title> | |
<subtitle>A subtitle.</subtitle> | |
<link href="http://example.org/feed/" rel="self" /> | |
<link href="http://example.org/" /> | |
<id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id> | |
<updated>2003-12-13T18:30:02Z</updated> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* QuadTree object. | |
* | |
* The quadrant indexes are numbered as below: | |
* | | |
* 1 | 0 | |
* —-+—- | |
* 2 | 3 | |
* | | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Critical Path: Measure</title> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<link href="style.css" rel="stylesheet"> | |
<script> | |
function measureCRP() { | |
var t = window.performance.timing, | |
interactive = t.domInteractive - t.domLoading, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
li { | |
list-style-type: none; | |
position: relative; | |
margin: 2px; | |
padding: 0.5em 0.5em 0.5em 2em; | |
background: lightgrey; | |
font-family: sans-serif; | |
} | |
li.done { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
replace = require('gulp-replace'), | |
fs = require('fs'); | |
// in your task | |
return gulp.src(...) | |
.pipe(replace(/<link href="style.css"[^>]*>/, function(s) { | |
var style = fs.readFileSync('style.css', 'utf8'); | |
return '<style>\n' + style + '\n</style>'; | |
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elem.addEventListener('click', (function(numCopy) { | |
``` | |
return function() { | |
alert(numCopy) | |
}; | |
``` | |
})(num)); |
OlderNewer