Skip to content

Instantly share code, notes, and snippets.

Hex Opacity Values
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
@rafagarcia
rafagarcia / jsbin.kejufac.js
Last active August 4, 2018 09:12
private-public-methods-exposure
var module = (function(){
/* simple método privado */
var privateMethod = function(){
console.log("soy un método privado");
};
/* retornando un objeto literal */
return{
publicMethod : function(){
privateMethod();
@rafagarcia
rafagarcia / getEngineersAge.js
Created August 1, 2018 13:32
Little js katah
/* Dado el siguiente array de objetos, queremos que se muestre
en consola el valor agregado de las edades de todos los
empleados con el valor de position 'engineer'.
*/
let employees = [
{
'fullName': 'Andres Urquía',
'age': 25,
'position': 'engineer'
@rafagarcia
rafagarcia / JS Quiz Answer Explanations.md
Created August 30, 2017 06:47 — forked from MattSurabian/JS Quiz Answer Explanations.md
My attempt to explain the answers for David Shariff's feelings hurting JS quiz found at: davidshariff.com/js-quiz/

Are your feelings hurt?

If you rushed through David Shariff's JS Quiz or are just new to JS they might be. I know mine were. After I dried my eyes, I took the quiz again, this time very slowly trying to get at the meat behind each answer. Below is my attempt to explain each question's answer and offer some interesting permutations so that others can move beyond their hurt feelings and come out the other side better JS developers.

I initially thought I'd turn this into a blog post but think it's probably better as a gist.

Question #1

Don't over think it.

var foo = function foo() {
@rafagarcia
rafagarcia / JS Quiz Answer Explanations.md
Created August 30, 2017 06:47 — forked from MattSurabian/JS Quiz Answer Explanations.md
My attempt to explain the answers for David Shariff's feelings hurting JS quiz found at: davidshariff.com/js-quiz/

Are your feelings hurt?

If you rushed through David Shariff's JS Quiz or are just new to JS they might be. I know mine were. After I dried my eyes, I took the quiz again, this time very slowly trying to get at the meat behind each answer. Below is my attempt to explain each question's answer and offer some interesting permutations so that others can move beyond their hurt feelings and come out the other side better JS developers.

I initially thought I'd turn this into a blog post but think it's probably better as a gist.

Question #1

Don't over think it.

var foo = function foo() {
@rafagarcia
rafagarcia / employee.json
Created February 27, 2017 15:29
Employee.json
{
"index": 0,
"firstName": "Ignacio",
"lastName": "Cimadevilla",
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/enda/73.jpg",
"position": "Animation architect"
},
{
"index": 1,
@rafagarcia
rafagarcia / employee.html
Last active February 28, 2017 08:56
Employee.html con elemento polymaiap-employee
<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
@rafagarcia
rafagarcia / my-app.html
Last active February 28, 2017 08:57
Código de my-app.html incluyendo el custom-element polymaiap-app
<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
@rafagarcia
rafagarcia / employee.html
Last active February 28, 2017 08:58
código completo de la página employee.html incluyendo el elemento polymaiap-employee
<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->