Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
cd app
# Count JavaScript and JSX files
js_files=$(find . -type f \( -name "*.js" -o -name "*.jsx" \))
js_count=$(echo "$js_files" | wc -l)
# Count TypeScript and TSX files
ts_files=$(find . -type f \( -name "*.ts" -o -name "*.tsx" \))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vgeorge
vgeorge / gist:92a82ffd88d5256b6aef84b982751ae9
Created September 8, 2020 12:26
Rezoning LCOE request example
curl 'https://cb1d9tl7ve.execute-api.us-east-2.amazonaws.com/v1/zone/?filters=0,1000000%7C10000,1000000%7C0,1000000%7C0,1000000%7C0,5000' \
-H 'authority: cb1d9tl7ve.execute-api.us-east-2.amazonaws.com' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36' \
-H 'content-type: text/plain;charset=UTF-8' \
-H 'accept: */*' \
-H 'origin: http://localhost:9000' \
-H 'sec-fetch-site: cross-site' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
-H 'referer: http://localhost:9000/explore?areaId=BRA&resourceId=Solar%20PV' \
@vgeorge
vgeorge / app-index.js
Created November 11, 2019 16:41
Test GEP cache load
const config = require('config');
const _ = require('lodash');
const qs = require('qs');
const boom = require('boom');
const Hapi = require('@hapi/hapi');
const Joi = require('joi');
const { delay } = require('./utils');
const db = require('./db');
const riseIndicatorsData = require('./rise-indicators.json');
@vgeorge
vgeorge / release-template.txt
Last active September 23, 2019 16:33
release-changelog-template
# Changelog
## 🎉 Features
-
## 🚀 Improvements
-
@vgeorge
vgeorge / sample.csv
Last active September 10, 2018 14:30
Ghana_daily_VIIRS_values_sample.csv
id x y DIST2010 prp_sets prp_sets_dist1 prp_sets_dist3 rade9 rad li month day time lc_type total_hh e_hh e_rate
n1 -0.27409247 11.16748391 0 -0.04964601 8.10352039 0 1 1 127 14
n1 -0.27409247 11.16748391 0 -0.17295066 8.07504368 0 1 2 110 14
n1 -0.27409247 11.16748391 0 -0.31150097 7.88156223 0 1 3 46 14
n1 -0.27409247 11.16748391 0 0.06185319 7.91588974 0 1 4 211 14
n1 -0.27409247 11.16748391 0 -0.07150976 8.00716877 0 1 5 154 14
n1 -0.27409247 11.16748391 0 -0.00411528 8.08011532 0 1 6 131 14
n1 -0.27409247 11.16748391 0 0.02438001 8.3578558 1.5466e-4 1 7 113 14
n1 -0.27409247 11.16748391 0 1.52626657 8.0379858 0.01078093 1 8 56 14
n1 -0.27409247 11.16748391 0 0.9792859 7.52463436 0.0086789 1 9 215 14
@vgeorge
vgeorge / OSRM profile generator prototype
Last active September 7, 2018 15:20
OSRM profile generator prototype
Why this file was generated:
- https://github.com/WorldBank-Transport/ram-backend/issues/228
Why this file exists:
- https://stackoverflow.com/questions/19896900/how-to-change-the-name-of-a-gist-in-github#20949455
@vgeorge
vgeorge / geo_files_sizes
Created November 10, 2017 04:37 — forked from diogok/geo_files_sizes
Comparing file size for geospatial data for GeoJSON, TopoJSON, KML, CSV with WKT, SQLite/Spatialite and original shapefile. All with and without compression, none simplified.
88K ucs_mma_28012015.attributes.csv.gz
352K ucs_mma_28012015.topo.json.gz
460K ucs_mma_28012015.attributes.csv
2,8M ucs_mma_28012015.topo.json
16M ucs_mma_28012015.spatial.deflate.db
26M ucs_mma_28012015.spatial.db
31M ucs_mma_28012015.wkt.csv.gz
31M ucs_mma_28012015.kml.gz
31M ucs_mma_28012015.geo.json.gz
38M ucs_mma_28012015.wkb.db
@vgeorge
vgeorge / README.md
Last active August 2, 2016 14:10
Como baixar geojson transporte sobre trilhos de uma cidade no OpenStreetMap

A consulta a seguir busca relações do tipo "route"="train" e "route"="subway" na área identificada como geocodeArea:SP:

[out:json][timeout:900];
{{geocodeArea:SP}}->.searchArea;
(
  relation["route"="train"](area.searchArea);
  relation["route"="subway"](area.searchArea);
);
out body;
@vgeorge
vgeorge / index.html
Last active April 14, 2016 17:10
An example of using esri-leaflet plugin to display a map from a MapService
<html>
<head>
<meta charset=utf-8 />
<title>Example</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/1.0.0-beta.2/leaflet.css" />
<script src="https://cdn.jsdelivr.net/leaflet/1.0.0-beta.2/leaflet.js"></script>