Skip to content

Instantly share code, notes, and snippets.

View benjamintd's full-sized avatar
🌍

Benjamin Tran Dinh benjamintd

🌍
View GitHub Profile
@ryanbaumann
ryanbaumann / 34M_17.gltf
Last active April 23, 2023 20:29
Mapbox Custom Layers - Add a 3D GLTF model to a map with Three.js
{
"accessors" : [
{
"bufferView" : 0,
"componentType" : 5123,
"count" : 4320,
"max" : [
1439
],
"min" : [
@perrygeo
perrygeo / ogrcat
Last active August 1, 2018 22:54
ogrcat: make line-delimited geojson features to stdout from any ogr vector datasource
#!/bin/bash
#
# ogrcat
# produces line-delimited geojson features
# Like `fio cat` but uses ogr2ogr under the hood
ECHO_FEATURES=""
ogr2ogr -f GeoJSON /vsistdout/ "$@" | while read line
@ronaldsmartin
ronaldsmartin / GoogleSheetJson.md
Last active August 21, 2024 06:04
Google Spreadsheet JSON Queries

SheetAsJSON + Filtering

This is an extension of DJ Adams' excellent SheetAsJSON Google Apps Script, which provides a way to GET a published Google Spreadsheet as a JSON feed. This version allows generic filtering for terms, more specific control over which rows to parse, and correct MIME type for JSONP output.

Minimal Usage

The following parameters are required for the script to work.

https://script.google.com/macros/s/AKfycbzGvKKUIaqsMuCj7-A2YRhR-f7GZjl4kSxSN1YyLkS01_CfiyE/exec?
+ id=<spreadsheet key>
+ sheet=<sheet name on spreadsheet>
@paulkaplan
paulkaplan / colorTempToRGB.js
Last active March 4, 2024 10:29
Color Temperature to RGB
// From http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
// Start with a temperature, in Kelvin, somewhere between 1000 and 40000. (Other values may work,
// but I can't make any promises about the quality of the algorithm's estimates above 40000 K.)
function colorTemperatureToRGB(kelvin){
var temp = kelvin / 100;