Skip to content

Instantly share code, notes, and snippets.

View meetar's full-sized avatar

Peter Richardson meetar

View GitHub Profile
@meetar
meetar / tangram-halftone.glsl
Last active August 29, 2015 14:05
Halftone shader example for Tangram
# Adapted from Stefan Gustavson's GLSL halftone shader demo for WebGL
# http://webstaff.itn.liu.se/~stegu/webglshadertutorial/shadertutorial.html
globals: |
uniform float dot_frequency;
uniform float dot_scale;
uniform bool true_color;
// Antialiasing
float aastep(float threshold, float value) {
@meetar
meetar / gist:76d9b6f0eebd0973917b
Created June 27, 2015 03:46
undistort gopro hero4 wide-angle images
# requires Imagemagick - can be installed with 'brew install Imagemagick'
convert G0040300.JPG -distort barrel "0.10,-0.32,0" output.jpg
@meetar
meetar / gist:629d8caa286b9d1ef3b0
Created July 16, 2015 20:48
citygml-to-obj converter log
Building has already been converted: output/BLDG_000300090026bde5.obj
Building has already been converted: output/BLDG_0003000e006e7101.obj
Building has already been converted: output/BLDG_0003000e00094924.obj
Building has already been converted: output/BLDG_000300000019db81.obj
Building has already been converted: output/BLDG_00030009004875e1.obj
Building has already been converted: output/BLDG_000300060008057f.obj
Building has already been converted: output/BLDG_00030000001a5b8c.obj
Building has already been converted: output/BLDG_00030009006919e4.obj
Building has already been converted: output/BLDG_000300000019d1ca.obj
Building has already been converted: output/BLDG_000300000019cd4d.obj
cameras:
perspective:
type: perspective
vanishing_point: [0, -500]
lights:
directional1:
type: directional
direction: [.5, .1, -1]
diffuse: .2
ambient: 0.8
@meetar
meetar / hi8-anim-howto.md
Created November 29, 2015 18:39 — forked from celoyd/hi8-anim-howto.md
A way to make Himawari-8 animations

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work
#!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008
# Global Map Tiles Classes
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326,
# generate a simple HTML viewers based on Google Maps and OpenLayers
# Author: Klokan Petr Pridal, klokan at klokan dot cz
# Web: http://www.klokan.cz/projects/gdal2tiles/
@meetar
meetar / msort.py
Created January 1, 2013 06:07 — forked from anonymous/msort.py
def scan_forward( fp ):
for line in fp:
if line==[]:
return True
return False
def rowcmp(a,b):
if a==[]:
return 1
if b==[]:
Delivered-To: xxxxxxxxxxx@gmail.com
Received: by 10.49.71.51 with SMTP id r19csp39572qeu;
Sat, 9 Feb 2013 23:07:38 -0800 (PST)
X-Received: by 10.220.241.80 with SMTP id ld16mr14012352vcb.5.1360480058553;
Sat, 09 Feb 2013 23:07:38 -0800 (PST)
Return-Path: <conftech@oreilly.com>
Received: from n25.mail01.mtsvc.net (mailout34.mail01.mtsvc.net. [216.70.64.74])
by mx.google.com with ESMTPS id p6si34997071vdv.19.2013.02.09.23.07.38
(version=TLSv1 cipher=RC4-SHA bits=128/128);
Delivered-To: xxxxxxxxxxx@gmail.com
Received: by 10.49.71.51 with SMTP id r19csp39572qeu;
Sat, 9 Feb 2013 23:07:38 -0800 (PST)
X-Received: by 10.220.241.80 with SMTP id ld16mr14012352vcb.5.1360480058553;
Sat, 09 Feb 2013 23:07:38 -0800 (PST)
Return-Path: <conftech@oreilly.com>
Received: from n25.mail01.mtsvc.net (mailout34.mail01.mtsvc.net. [216.70.64.74])
by mx.google.com with ESMTPS id p6si34997071vdv.19.2013.02.09.23.07.38
(version=TLSv1 cipher=RC4-SHA bits=128/128);
# include: transit.yaml
scene:
background:
color: red
sources:
mapzen:
type: TopoJSON
url: http://vector.mapzen.com/osm/all/{z}/{x}/{y}.topojson?api_key=vector-tiles-HqUVidw