Skip to content

Instantly share code, notes, and snippets.

View pdbartsch's full-sized avatar

Paul Bartsch pdbartsch

  • UC Santa Barbara
  • 93455
View GitHub Profile
@andymason
andymason / Landsat 8 gdal processing
Last active June 19, 2017 13:08
Added projection wrap correction
#! /bin/bash
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs.
#
# Requirements:
# * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/
# * convert (image-magick)
#
# Reference info:
# http://www.mapbox.com/blog/putting-landsat-8-bands-to-work/
@thalesmello
thalesmello / thales.ahk
Last active July 22, 2022 17:51
This is the Autohotkey script I use on a daily basis. I use it to play/pause my webplayers, move and resize my windows, add new tasks to Any.do and toggle my windows in fullscreen mode.
#NoEnv
#Include %A_ScriptDir%
#Include VA.ahk
#SingleInstance force
SetTimer,UPDATEDSCRIPT,1000
OnExit, EXITSCRIPT
HomePath = C:\Users\ThalesErnesto
; Media control
(function (j) {
function O(o, q) {
var A = o[0] - q[0],
g = o[1] - q[1];
return A * A + g * g
}
function Na(o) {
for (var q = 0, A = 0, g = 0, i = o.length - 3; g < i; g += 2) {
q += o[g];
A += o[g + 1]
// The name of the spreadsheet from the browser location bar.
// Copy after 'key=' until before the next URL parameter beginning w/&
var SPREADSHEET_ID = 'YOUR_SPREADSHEET_ID';
// The name of the sheet, displayed in a tab at the bottom of the spreadsheet.
// Default is 'Sheet1' if it's the first sheet.
var SHEET_NAME = 'YOUR_SHEET_NAME';
function doGet(request) {
var callback = request.parameters.jsonp;
@mjrich
mjrich / google-refine-geocoding
Created July 15, 2012 21:13
Google Refine Geocoding
Step One
Fetch URL based on column:
'http://www.datasciencetoolkit.org/maps/api/geocode/json?sensor=false&address=' + escape(value, 'url')'
Step Two
Parse Json for longitude:
value.parseJson()["results"][0]["geometry"]["location"]["lng"]
@oeon
oeon / overpass_windows_guide.md
Last active October 6, 2015 18:28
using cURL or Wget in Windows to download from OSM Overpass API

###This guide will give you the tools and show you how to download from the OpenStreetMap Overpass API on Windows. These steps were documented while setting up a Windows 7 64-bit machine.###

cURL and Wget are similar utilities to help you download things from the Command Prompt, either one will work - I think cURL might be easier to setup, but depending on your IT restrictions, etc. one or the other might work. You DO NOT need to do both steps A and B, one or the other. But if one method fails, try the other!

@oeon
oeon / gist:3035057
Last active April 11, 2016 21:45
buildings in SLO County since, Overpass query, Wget Windows
wget -O bldgs_since_july2012.osm http://www.overpass-api.de/api/xapi?way[building=*][bbox=-121.34792,34.89752,-119.47262,35.79522][@newer=2012-07-01T00:00:00Z][@meta]
@djq
djq / gist:2846196
Last active September 27, 2022 04:12 — forked from rolo/gist:1481128
Install Postgres 9.1, PostGIS 2.0.2 and PG Routing on Ubuntu 12.04 (Precise Pangolin)
#!/bin/bash
#
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit)
# updated to PostGIS 2.0.1
# basics
apt-get install python-software-properties
apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3
# install the following pacakages
@mourner
mourner / TileLayer.Common.js
Created February 11, 2012 23:11
Leaflet shortcuts for common tile providers
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core?
L.TileLayer.Common = L.TileLayer.extend({
initialize: function (options) {
L.TileLayer.prototype.initialize.call(this, this.url, options);
}
});
(function () {
@nimbupani
nimbupani / index.html
Created December 2, 2011 05:00
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>