Skip to content

Instantly share code, notes, and snippets.

View noodle71's full-sized avatar

Angel Fernandez Camba noodle71

View GitHub Profile
@noodle71
noodle71 / unicornio.md
Last active November 19, 2021 08:19
Logtrust => Devo => Unicornio

Seguramente os haya explotado el LinkedIn y Twitter de noticias sobre Devo, el nuevo unicornio de ciberseguridad.

No quiero hacer más prensa de eso, lo que me apetece es comentar cómo han sido estos 9 años que llevo allí. Seguramente mi forma de explicarlo parezca un poco caótica pero me servirá para recordarlo en un futuro.

Me considero afortunado de haber entrado en 2012 en Logtrust (ahora Devo), siendo menos de 10 personas en la empresa, sin ser fundador, y haber tenido la oportunidad de aprender de grandes profesionales como (en orden alfabético): Daniel García Morán, Joaquin Diez, Juana Nuñez, Pablo Carretero, Pedro Castillo, Pedro Palao... Añadiría una larga lista de nombres pero ellos fueron los que más me "sufrieron" recién salido de la carrera.

Ver la palabra "unicornio" al lado del nombre de tu empresa es un privilegio y un sueño para muchos pero el camino hasta llegar aquí no fue fácil para nadie.

Nada mas entrar, recibí mi primera nómina con mas de 2 meses de demora porque no estaba automatiza

@noodle71
noodle71 / abUtils.js
Last active January 28, 2021 10:40
Activeboards utils
(async function(){
const wu = require('@devo/webutils');
await load();
const EMPTY = {"name":"Empty","description":"","settings":"{\"extra\":{\"favourites\":{\"widgets\":\"Line\",\"inputs\":\"Input\",\"containers\":\"Grid\"},\"config\":{\"theme\":{}},\"autoRefreshPeriod\":null},\"type\":\"container\",\"subtype\":\"Grid\",\"settings\":{\"layout\":{},\"header\":false},\"children\":null,\"date\":null}"};
async function load(){
const all = await getIndex();
const summary = all.map(({id, name, owner}) => ({id, name, owner: owner.email}));
window.abUtils = {
all, // [Property] List of all ABs
summary, // [Property] List (with less info) of all ABs
@noodle71
noodle71 / JS_allocate_one_GB.js
Created June 5, 2019 09:35
Allocate more than one GB is possible
const createGB = () => (new Uint8Array(1024*1024*1024)).map(i => i);
@noodle71
noodle71 / string_template_builder.js
Created April 4, 2019 17:47
String template builder
function reverse(...a){
let res = '';
const templates = Array.isArray(a) && a.length > 0 ? a[0]:null;
if(templates){
for(let i = 0; i < templates.length; i++) {
const placeholder = a[i+1];
res+=templates[i];
if(placeholder) res+=`${placeholder} :: ${placeholder.split('').reverse().join('')}`
}
}
@noodle71
noodle71 / closure_class_method_bindings.js
Created April 3, 2019 12:50
Trying to call a method within a closure without binding the initial context can lead to change the value of "this"
//////////////////////// NOT WORKING: CASE 1 ////////////////////////
class ClosureMethodWithoutBind{
constructor(prop){
this.prop = prop;
}
changeAfter(cb, milis){
setTimeout(cb,milis);
<head>
<script>
!function(a,b,c,d,e,f){function g(a,b){return function(){return a.call(this,b.apply(this,arguments))}}function h(a){return function(b){return b[a]}}function i(a,b){return b.apply(f,a)}function j(a){var b=a.length-1,d=c.prototype.slice;if(0==b)return function(){return a.call(this,d.call(arguments))};if(1==b)return function(){return a.call(this,arguments[0],d.call(arguments,1))};var e=c(a.length);return function(){for(var c=0;b>c;c++)e[c]=arguments[c];return e[b]=d.call(arguments,b),a.apply(this,e)}}function k(a){return function(b,c){return a(c,b)}}function l(a,b){return function(c){return a(c)&&b(c)}}function m(){}function n(){return!0}function o(a){return function(){return a}}function p(a,b){return b&&b.constructor===a}function q(a){return a!==f}function r(a,c){return c instanceof b&&y(function(a){return a in c},a)}function s(a,b){return[a,b]}function t(a){return A(a.reduce(k(s),X))}function u(a){return w(function(a,b){return a.unshift(b),a},[],a)}function v(a,b){return b?s(a(Y(b)),v(a,Z