Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>GIA Button Example</title>
<link rel="stylesheet" type="text/css" href="gia-tabbed-buttons.css">
</head>
<body>
<h1>GIA Button Example</h1>
;(function() {
'use strict';
var giahost = 'http://gia.guim.co.uk';
var giaIframe = document.getElementById('gia-iframe');
if (giaIframe) {
if (giaIframe.dataset.src) {
giaIframe.src = [giaIframe.dataset.src, window.location.hash].join('');
<!DOCTYPE html>
<html>
<head>
<title>GIA Button Example</title>
<link rel="stylesheet" type="text/css" href="gia-tabbed-buttons.css">
</head>
<body>
<h1>GIA Button Example</h1>
<style type="text/css">
#gia-header div,
#gia-header h1,
#gia-header p,
#gia-header ul,
#gia-header li {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
/* all single-instance buttons get the .gia-button class */
.gia-button {
display: inline-block;
padding: 8px 22px;
color: #fff;
font-size: 14px;
font-family: Helvetica, Arial, sans-serif;
font-weight: 200;
line-height: 1em;
@gabrieldance
gabrieldance / ffmpeg to webm
Created October 31, 2013 19:41
bash script to encode two-pass WEBM video.
#!/bin/bash
for file in *.mov; do
ffmpeg -i ${file} -pass 1 -video_size 640x360 -c:v libvpx -qmin 0 -qmax 50 -b:v .325M -f webm -y /dev/null
ffmpeg -i ${file} -pass 2 -video_size 640x360 -c:v libvpx -qmin 0 -qmax 50 -b:v .325M -c:a libvorbis -q:a 6 -y ../../640x360/FINAL_WEBM/${file%%mov}webm
done
@gabrieldance
gabrieldance / ffmpeg to OGV
Created October 31, 2013 19:42
ffmpeg to OGV
#!/bin/bash
for file in *.mov; do
ffmpeg2theora -v 9 -a 6 --max_size 640x360 -o ../640x360/${file}.ogv $file
done
We can't make this file beautiful and searchable because it's too large.
NAME,NAMEASCII,SOV0NAME,SOV_A3,ADM0NAME,ADM0_A3,ADM1NAME,ISO_A2,LATITUDE,LONGITUDE,POP_MAX,POP_MIN,POP_OTHER,LS_NAME
Colonia del Sacramento,Colonia del Sacramento,Uruguay,URY,Uruguay,URY,Colonia,UY,-34.4799990054,-57.8400024734,21714,21714,0,NULL
Trinidad,Trinidad,Uruguay,URY,Uruguay,URY,Flores,UY,-33.5439989374,-56.9009965602,21093,21093,0,NULL
Fray Bentos,Fray Bentos,Uruguay,URY,Uruguay,URY,Ro Negro,UY,-33.1389990288,-58.3039974719,23279,23279,0,NULL
Canelones,Canelones,Uruguay,URY,Uruguay,URY,Canelones,UY,-34.5380040067,-56.2840014932,19698,19698,0,NULL
Florida,Florida,Uruguay,URY,Uruguay,URY,Florida,UY,-34.0990020052,-56.214998448,32234,32234,0,NULL
Bassar,Bassar,Togo,TGO,Togo,TGO,Kara,TG,9.26100006832,0.78900357378,61845,61845,0,NULL
Sotouboua,Sotouboua,Togo,TGO,Togo,TGO,Centre,TG,8.55700213306,0.98499646233,21054,21054,0,NULL
Medenine,Medemine,Tunisia,TUN,Tunisia,TUN,Mdenine,TN,33.3999990025,10.4166995576,61705,61705,0,NULL
Kebili,Kebili,Tunisia,TUN,Tunisia,TUN,Kebili,TN,33.6899970349,8.9710025379,19875
We can't make this file beautiful and searchable because it's too large.
ST_FIPS,SFIPS,COUNTY_FIP,CFIPS,PL_FIPS,ID,NAME,ELEVATION,POP_1990,POPULATION,ST,STATE,WARNGENLEV,WARNGENTYP,WATCH_WARN,ZWATCH_WAR,PROG_DISC,ZPROG_DISC,COMBOFLAG,LAND_WATER,RECNUM,LON,LAT
50,50,023,023,NULL,1457265,East Calais,850,0.0,NULL,VT,VERMONT,3,NULL,3,0.0,50,50.0,0.0,NULL,0.0,-72.4303,44.3664
50,50,023,023,NULL,15000150000,Exit 9 I89,NULL,0.0,NULL,VT,VERMONT,3,NULL,3,0.0,125,125.0,0.0,NULL,0.0,-72.6851,44.2982
50,50,023,023,NULL,1919082,Exit 10 I89,459,0.0,NULL,VT,VERMONT,3,NULL,3,0.0,125,125.0,0.0,NULL,0.0,-72.7513,44.3427
50,50,023,023,NULL,1457229,Duxbury,420,0.0,NULL,VT,VERMONT,2,NULL,2,0.0,100,100.0,0.0,NULL,0.0,-72.7531,44.3269
50,50,023,023,NULL,1460076,Waterbury Center,725,0.0,NULL,VT,VERMONT,2,NULL,2,0.0,125,125.0,0.0,NULL,0.0,-72.7164,44.3781
50,50,023,023,NULL,1460309,Woodbury,1197,0.0,NULL,VT,VERMONT,3,NULL,3,0.0,100,100.0,0.0,NULL,0.0,-72.42,44.43
50,50,023,023,NULL,1461796,Exit 8 I89,550,0.0,NULL,VT,VERMONT,3,NULL,3,0.0,125,125.0,0.0,NULL,0.0,-72.5963,44.2507
50,50,023,023,NULL,1457248,Ea
# These are shell functions to quickly create pansharpened RGB images ready for color correction
# from a set of raw Landsat 8 TIF files in a given directory.
# For example:
# l8_pansharp LC81690352014169LGN00
# Creates:
# LC81690352014169LGN00_rgb_pansharp.tif
# l8_rush_pansharp downloads a L8 tile from Google Storage (if they have it), extracts the relevant bands, then creates the pansharpened output.