Skip to content

Instantly share code, notes, and snippets.

View LuisSevillano's full-sized avatar

Luis Sevillano LuisSevillano

View GitHub Profile
@jscarto
jscarto / gibbs_export.sh
Last active January 18, 2022 16:55
Export a single image from GIBBS tile server. // UNTESTED MAY NOT WORK
outformat=JPEG
category=best
layer=MODIS_Terra_CorrectedReflectance_TrueColor
caldate=2020-09-09
tileset=250m
ext=jpg
tilelevel=9
bands=3
tmp_image=output.jpg
@veltman
veltman / README.md
Last active April 19, 2023 16:32
Generating an SVG from a set of shapefiles

Generating an SVG from a set of shapefiles

The USGS provides detailed downloads of fire perimeters, with timestamped files that can be used to show the spread of a major fire over time.

Using the 2017 Thomas fire as an example, we'll process this data into a single SVG file with all the different perimeter measurements.

This index page contains links to a series of shapefiles of the fire boundary, each one with a timestamp:

https://rmgsc.cr.usgs.gov/outgoing/GeoMAC/2017_fire_data/California/Thomas/

@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@TheMapSmith
TheMapSmith / flights.js
Last active March 17, 2024 15:51
Fetching flight info
var fs = require('fs');
var request = require('request-promise');
var moment = require('moment')
// Globals
global.timestamp = moment().unix()
global.allPlaybacks = [];
global.geojson = {};
global.geojson['type'] = 'FeatureCollection';
global.geojson['features'] = [];
@martinruenz
martinruenz / ffmpeg-snippets.md
Last active November 15, 2022 06:39
ffmpeg snippets / cheatsheet
@thomasp85
thomasp85 / particles.R
Created February 26, 2018 19:33
Particles on CRAN
library(tidygraph)
library(particles)
library(jsonlite)
library(magick)
# Prepare text polygons
text <- read_json('text.json')
par_text <- text$layers[[3]]$paths
on_text <- text$layers[[2]]$paths
cran_text <- text$layers[[1]]$paths
library(tidycensus)
library(tidyverse)
library(extrafont)
city16 <- get_acs(geography = "place",
variables = "B01003_001",
survey = "acs1") %>%
filter(estimate > 500000) %>%
rename(estimate16 = estimate)
@ceejbot
ceejbot / esm_in_node_proposal.md
Last active July 17, 2023 02:45
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

@EfratVil
EfratVil / index.html
Last active January 19, 2018 14:06
highlight.js
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>highlight.js</title>
<script src="//d3js.org/d3.v4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/default.min.css" rel="stylesheet" />
<script>hljs.initHighlightingOnLoad();</script>
<style>
@Fil
Fil / .block
Last active January 1, 2020 16:12
Versor dragging with inertia
license: gpl-3.0