Skip to content

Instantly share code, notes, and snippets.

View ivanmalagon's full-sized avatar

Ivan Malagon ivanmalagon

View GitHub Profile
@ivanmalagon
ivanmalagon / post.md
Last active August 17, 2024 16:06
El mayor cambio al convertirte en manager

¿Es que las meetings crecen como setas? ¿Que tu lienzo de trabajo es casi siempre un spreadsheet en vez de un editor de código? Todo eso es cierto, pero el mayor cambio es el ciclo de recompensas.

Cuando programas estás acostumbrado, seguramente sin saberlo, a un ciclo de feedback con mucha inmediatez. Pongamos que te pones a desarrollar una nueva feature. Has estimado que te llevará unas tres semanas terminarla. Va a haber varios momentos durante ese tiempo en el que te vas a desesperar porque no te sale lo que quieres, porque hay un melón y te está costando más de lo que creías. Va a haber momentos de euforia. Al final has domado ese melón. Esos tests pasan todos en verde. Acabas de tachar una epic.

Cuando te conviertes en manager, tu foco sobre las personas crece. Dependiendo del puesto, un engineering manager, por ejemplo, la gente es tu principal trabajo. Aún programas algo, pero no es el uso más efectivo de tu tiempo y, además, tienes que dejar que tu gente crezca y tome posiciones más fuertes en lo t

Props tips
https://codesandbox.io/s/sc-props-ppsij
const Paragraph2 = styled.p(
props => css`
width: 400px;
margin: auto;
/* props can be accessed from the above props */
color: ${props.color};
@ivanmalagon
ivanmalagon / index.js
Created June 7, 2018 09:49
UID GENERATOR
function S4 () {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
@ivanmalagon
ivanmalagon / bundle.js
Created June 6, 2018 16:33
Madrid commuting - Hackarto VL
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
@ivanmalagon
ivanmalagon / index.js
Created April 2, 2018 20:53
BICIMAD AND SQL API
const axios = require('axios');
const CLIENT_ID = 'YOUR_BICIMAD_CLIENT_ID';
const PASSKEY = 'YOUR_BICIMAD_PASSKEY';
const USERNAME = 'YOUR_USERNAME';
const TABLE_NAME = 'YOUR_TABLE_NAME';
const API_KEY = 'YOUR_CARTO_API_KEY';
const BICIMAD_URL = `https://rbdata.emtmadrid.es:8443/BiciMad/get_stations/${CLIENT_ID}/${PASSKEY}/`;
const BATCH_QUERY_URL = `https://${USERNAME}.carto.com/api/v2/sql/job?api_key=${API_KEY}`;
const MAX_JOB_SIZE = 16000;
@ivanmalagon
ivanmalagon / index.html
Last active March 12, 2018 10:12
Get bounds in CARTO.js
<!DOCTYPE html>
<html>
<head>
<title>Bounds example | CARTO</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<!-- Include Leaflet -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<link href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" rel="stylesheet">
<!-- Include CARTO.js -->
@ivanmalagon
ivanmalagon / index.html
Created January 12, 2018 16:40
MapboxGL with CARTO MVT
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Carto - Windshaft Aggregation API - Mapbox GL example</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.css' rel='stylesheet' />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
@ivanmalagon
ivanmalagon / index.html
Last active January 12, 2018 16:37
OpenLayers
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>OpenLayers – Vector tiles – Points aggregation | CARTO</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.4/css/ol.css" type="text/css">
<script src="https://openlayers.org/en/v4.6.4/build/ol.js"></script>
<script src="https://openlayers.org/en/v4.6.4/examples/resources/mapbox-streets-v6-style.js"></script>
<style>
@ivanmalagon
ivanmalagon / index.html
Last active November 21, 2017 12:12
HaCkARTO.js boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CARTO.js App</title>
<!-- Include Leaflet 1.2.0 Library -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script>
<!-- Include cartodb.js Library -->
<script src="https://rawgit.com/CartoDB/cartodb.js/dist/carto.js"></script>
@ivanmalagon
ivanmalagon / README.md
Last active November 27, 2024 10:24
Manhattan Tax Lot Map - Carto challenge

USAGE

Press keys WASD to pan, keys PL or icons to zoom.

ABOUT

I'm Ivan Malagon, developer with 10+ years of professional experience. I don´t have any background in map rendering but back in the day, in my university time I programmed a 3D object viewer from scratch. Not a single graphic library, not even for drawing a line. The test published by @javisantana remind me of that so I thought I could tackle this challenge as something similar to a rendering pipeline: get objects with world coordinates, transform then according to a camera and paint the resulting pixels in a surface. It's been a little harder than that ;)

email: hacheka[a]gmail[dot]com

source code: https://github.com/hacheka/carto