Skip to content

Instantly share code, notes, and snippets.

View Alevale's full-sized avatar
🚀
Focused building stuff

Alejandro Vales Alevale

🚀
Focused building stuff
View GitHub Profile
@Alevale
Alevale / kk.js
Created August 7, 2017 12:52
SHIT CODE, PLEASE DON'T DO IT!! (I can explain you why)
// NOTE: THIS IS NOT MY CODE, it's just a cry because of the crap I see around... 20170807:Alevale
const allQuickReplies = [];
let newResult;
// TODO: sort / merge reply blocks
newResult = result.reduce((arr, res) => {
if (res.hasOwnProperty('quick_replies')) {
Array.prototype.push.apply(allQuickReplies, res.quick_replies);
} else {
arr.push(res);
@Alevale
Alevale / TreeSearch with Callback
Created September 11, 2015 18:10
TreeSearch over a javascript object
console.log('Those are the paths that have your objects as names.')
function callback(res){
console.log(res);
}
function DPSearch(parent, callB, superParentArray, searchedChild){
for(var child in parent){
if(typeof parent[child] === "object"){
@Alevale
Alevale / designer.html
Created November 3, 2014 22:19
designer
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@Alevale
Alevale / designer.html
Created October 30, 2014 09:13
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@Alevale
Alevale / designer.html
Created October 23, 2014 16:41
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@Alevale
Alevale / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@Alevale
Alevale / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
@Alevale
Alevale / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<polymer-element name="my-element">
<template>
@Alevale
Alevale / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../topeka-elements/category-images.html">
<polymer-element name="my-element">
<template>
@Alevale
Alevale / designer.html
Created October 15, 2014 21:01
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">