Skip to content

Instantly share code, notes, and snippets.

View VictorVelarde's full-sized avatar
🚀

Víctor Velarde VictorVelarde

🚀
View GitHub Profile
@VictorVelarde
VictorVelarde / cloudSettings
Last active February 14, 2021 19:04
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-10-27T15:42:13.826Z","extensionVersion":"v3.4.3"}
@VictorVelarde
VictorVelarde / index.html
Created October 24, 2018 08:02
[CARTO VL - viewportFeatures]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../dist/carto-vl.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.css' rel='stylesheet' />
@VictorVelarde
VictorVelarde / stats.sh
Created October 24, 2018 08:01
[GIT - stats from current branchn (vs master)] git
git diff --stat master -- src/
@VictorVelarde
VictorVelarde / index.html
Last active April 9, 2019 17:49
[CARTO VL - blend vs bucket]
<!DOCTYPE html>
<html>
<head>
<title>carto-vl</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="https://libs.cartocdn.com/carto-vl/v0.9.1/carto-vl.min.js"></script>
@VictorVelarde
VictorVelarde / index.html
Last active October 11, 2018 09:45
Mapbox Isochrone API + CARTO VL
<!DOCTYPE html>
<html>
<head>
<title>carto-vl</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="https://libs.cartocdn.com/carto-vl/v0.9.1/carto-vl.min.js"></script>
@VictorVelarde
VictorVelarde / reproject.sh
Created October 1, 2018 08:46
[Reproject geotiff to Mercator] gdal, geotiff
./gdalwarp -t_srs EPSG:3857 -r near -ot Float32 -of GTiff /Users/victor/Downloads/SkySat_Freeport_s03_20170831T162740Z3.tif /Users/victor/CARTO/carto-vl/examples/raster/photo_3857.tif
@VictorVelarde
VictorVelarde / geo.tiff
Last active November 27, 2018 22:09
[WebGL - Squares] #webgl
II*Z>@@  �RS� N�� f��0��� ���m��N            @ {�#�?�[�w�;�[�{��� �<�X<GDALMetadata>
<Item name="GRIB_COMMENT" sample="0">Geopotential height [gpm]</Item>
<Item name="GRIB_ELEMENT" sample="0">HGT</Item>
<Item name="GRIB_FORECAST_SECONDS" sample="0">626400 sec</Item>
<Item name="GRIB_PDS_PDTN" sample="0">0</Item>
<Item name="GRIB_PDS_TEMPLATE_NUMBERS" sample="0">3 5 2 0 96 0 0 0 1 0 0 0 174 100 0 0 1 76 8 255 0 0 0 0 0</Item>
<Item name="GRIB_REF_TIME" sample="0">1469491200 sec UTC</Item>
<Item name="GRIB_SHORT_NAME" sample="0">85000-ISBL</Item>
<Item name="GRIB_UNIT" sample="0">[gpm]</Item>
<Item name="GRIB_VALID_TIME" sample="0">1470117600 sec UTC</Item>
@VictorVelarde
VictorVelarde / index.html
Last active November 27, 2018 22:10
[WebGL - Basic triangle] #webgl
<html>
<head>
<title>Basic 101</title>
<!-- Based on https://webglfundamentals.org/webgl/lessons/webgl-fundamentals.html -->
<script>
// UTILS
// 1. Create a shader
function createShader(gl, type, source) {
var shader = gl.createShader(type);
gl.shaderSource(shader, source);
@VictorVelarde
VictorVelarde / index.html
Created August 21, 2018 21:25
carto-vl style issue
<!DOCTYPE html>
<html>
<head>
<title>Interactive based styling | CARTO</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="https://libs.cartocdn.com/carto-vl/v0.6.2/carto-vl.min.js"></script>
<!-- Include Mapbox GL JS -->
<script src="https://libs.cartocdn.com/mapbox-gl/v0.45.0-carto1/mapbox-gl.js"></script>
@VictorVelarde
VictorVelarde / index.html
Last active October 22, 2018 10:40
carto vl - template
<!DOCTYPE html>
<html>
<head>
<title>carto-vl</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="https://libs.cartocdn.com/carto-vl/v0.9.1/carto-vl.min.js"></script>