Skip to content

Instantly share code, notes, and snippets.

View area73's full-sized avatar
🎯
Building Particle System

Rodrigo area73

🎯
Building Particle System
View GitHub Profile
@area73
area73 / global-variables-are-bad.js
Created June 15, 2018 22:32 — forked from hallettj/global-variables-are-bad.js
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
@area73
area73 / browserlist
Created June 9, 2018 23:48 — forked from stramel/browserlist
Polymer Gulp multiple builds
last 3 versions
not Explorer < 11
not ExplorerMobile < 11
@area73
area73 / download_egghead_videos.md
Created December 6, 2017 10:54 — forked from ldong/download_egghead_videos.md
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});
@area73
area73 / animLoopX.js
Created September 7, 2017 07:54 — forked from louisremi/animLoopX.js
Animation loop with requestAnimationFrame
// Cross browser, backward compatible solution
(function( window, Date ) {
// feature testing
var raf = window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame;
window.animLoop = function( render, element ) {
var running, lastFrame = +new Date;
@area73
area73 / protips.js
Created August 29, 2017 17:15 — forked from nolanlawson/protips.js
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@area73
area73 / css_regression_testing.md
Created August 18, 2017 23:13 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@area73
area73 / css_regression_testing.md
Created August 18, 2017 23:13 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@area73
area73 / css_regression_testing.md
Created August 18, 2017 23:13 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@area73
area73 / debug.js
Created October 19, 2016 10:33
Trace all vars from console
for(var b in window) {
if(window.hasOwnProperty(b)) console.log(b);
}
@area73
area73 / update-fork-from-master.md
Last active October 18, 2016 09:30
Update Branch from master