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 Benchmark = require('benchmark'); | |
Benchmark.prototype.setup = function() { | |
l = 100000; | |
s = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtestyyyyyyyyyyyyyyyyyyyyy'; | |
re1 = /te[xs]t/; | |
re2 = new RegExp('te[xs]t'); | |
re3 = new RegExp('te[xs]t'); | |
re3.compile(); | |
re4 = new RegExp(); | |
re4.compile('te[xs]t'); |
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
function rssPipesFilterFunction(articles) { | |
var promises = []; | |
articles.forEach(function(article) { | |
var maxRedirects = 5; | |
var loop = function() { | |
var promise = getRedirectURL(article.link).then(function(link) { | |
if (article.link === link || --maxRedirects < 0) { | |
return article; | |
} else { | |
article.link = link; |
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>famo.us circles sample</title> | |
<link type="text/css" href="//code.famo.us/famous/0.2/famous.css" rel="stylesheet" /> | |
<script type="text/javascript" src="//code.famo.us/lib/require.js"></script> | |
<script type="text/javascript" src="//code.famo.us/famous/0.2/famous.js"></script> | |
<script type="text/javascript"> | |
require(['famous/core/Engine', 'famous/core/Surface', 'famous/core/Transform', 'famous/core/Modifier', 'famous/physics/PhysicsEngine', 'famous/physics/bodies/Circle', 'famous/physics/constraints/Collision', 'famous/physics/constraints/Walls'], function() { | |
var Engine = require('famous/core/Engine'); | |
var Surface = require('famous/core/Surface'); |
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 ng-app="MyApp"> | |
<head> | |
<title>famo.us angular sample</title> | |
<link type="text/css" href="//code.famo.us/famous/0.2/famous.css" rel="stylesheet" /> | |
<link type="text/css" href="//cdn.rawgit.com/Famous/famous-angular/fee2b717a53ad762c9e3157580ce255901f4ccad/dist/famous-angular.min.css" rel="stylesheet" /> | |
<script type="text/javascript" src="//code.famo.us/lib/require.js"></script> | |
<script type="text/javascript" src="//code.famo.us/famous/0.2/famous.js"></script> | |
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js"></script> | |
<script type="text/javascript" src="//cdn.rawgit.com/Famous/famous-angular/fee2b717a53ad762c9e3157580ce255901f4ccad/dist/famous-angular.min.js"></script> | |
<script type="text/javascript"> |
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>famo.us circles 3d sample</title> | |
<link type="text/css" href="//code.famo.us/famous/0.2.2/famous.css" rel="stylesheet" /> | |
<script type="text/javascript" src="//code.famo.us/lib/require.js"></script> | |
<script type="text/javascript" src="//code.famo.us/famous/0.2.2/famous.js"></script> | |
<script type="text/javascript"> | |
require(['famous/core/Engine', 'famous/core/Surface', 'famous/core/Transform', 'famous/core/Modifier', 'famous/physics/PhysicsEngine', 'famous/physics/bodies/Circle', 'famous/physics/constraints/Distance', 'famous/physics/forces/Repulsion', 'famous/physics/forces/Drag'], function() { | |
var Engine = require('famous/core/Engine'); | |
var Surface = require('famous/core/Surface'); |
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>famo.us example for #173</title> | |
<link type="text/css" href="//code.famo.us/famous/0.3.0/famous.css" rel="stylesheet" /> | |
<script type="text/javascript" src="//code.famo.us/famous/0.3.0/famous-global.js"></script> | |
<script type="text/javascript"> | |
var Engine = famous.core.Engine; | |
var Surface = famous.core.Surface; | |
var PhysicsEngine = famous.physics.PhysicsEngine; |
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>famo.us example for #165</title> | |
<link type="text/css" href="//code.famo.us/famous/0.2.2/famous.css" rel="stylesheet" /> | |
<script type="text/javascript" src="//code.famo.us/lib/require.js"></script> | |
<script type="text/javascript" src="//code.famo.us/famous/0.2.2/famous.js"></script> | |
<script type="text/javascript"> | |
require(['famous/core/Engine', 'famous/core/Surface', 'famous/core/Modifier', 'famous/physics/PhysicsEngine', 'famous/physics/bodies/Circle', 'famous/physics/forces/Force'], function() { | |
var Engine = require('famous/core/Engine'); | |
var Surface = require('famous/core/Surface'); |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>slides</title> | |
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/css/reveal.min.css" /> | |
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/css/theme/default.css" id="theme" /> | |
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/lib/css/zenburn.css" /> | |
</head> | |
<body> |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>slides</title> | |
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/css/reveal.min.css" /> | |
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/css/theme/default.css" id="theme" /> | |
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/lib/css/zenburn.css" /> | |
</head> | |
<body> |
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>famo.us example for #448</title> | |
<link type="text/css" href="//code.famo.us/famous/0.3.0/famous.css" rel="stylesheet" /> | |
<script type="text/javascript" src="//code.famo.us/famous/0.3.0/famous-global.js"></script> | |
<script type="text/javascript"> | |
var Engine = famous.core.Engine; | |
var Surface = famous.core.Surface; | |
var Modifier = famous.core.Modifier; |