This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var d3 = require('d3') | |
var grid = require('d3-grid-layout')(d3) | |
var layout = grid() | |
.width(window.innerWidth - 40) | |
.height(window.innerHeight - 40) | |
.radius(80) | |
.align(0) | |
.ease('back', 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Vue = require('vue') | |
var domify = require('domify') | |
var template = '<div id="demo">' | |
+ '<p>{{message}}</p>' | |
+ '<input v-model="message">' | |
+ '</div>' | |
var templateEl = domify(template) | |
document.body.appendChild(templateEl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.mapbox.com/blog/processing-landsat-8/ | |
task :landsat_2014 => :environment do | |
dirs = Dir["#{Rails.root.to_s}/db/initial/raster/*"].reject {|q| q =~ /tar\.gz/ } | |
dirs.each do |dir| | |
scene_id = dir.split("/")[-1] | |
[4,3,2].each do |band| | |
`gdalwarp -t_srs EPSG:3857 #{dir}/#{scene_id}_B#{band}.TIF #{dir}/#{scene_id}_B#{band}-projected.tif` | |
end | |
`convert -combine #{dir}/#{scene_id}_B{4,3,2}-projected.tif #{dir}/#{scene_id}_RGB-projected.tif && \ | |
convert -channel B -gamma 0.925 -channel R -gamma 1.03 -channel RGB -sigmoidal-contrast 50x16% #{dir}/#{scene_id}_RGB-projected.tif #{dir}/#{scene_id}_RGB-projected-corrected.tif && \ |