Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@gabrieldance
gabrieldance / keybase.md
Created January 10, 2019 22:40
keybase public gist

Keybase proof

I hereby claim:

  • I am gabrieldance on github.
  • I am gabrieldance (https://keybase.io/gabrieldance) on keybase.
  • I have a public key ASAg765fFB_Kj4Nj7jgbj_u--eMizlIftSw3ckrT64kk4Ao

To claim this, I am signing this object:

@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
@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
/* 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;
<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%;
<!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>
this.breakScale=chroma.scale([lowColor,'#ff0b3a'])
.domain([1, 114, 258, 481, 2105])
.correctLightness(true)
@gabrieldance
gabrieldance / l8get
Last active August 29, 2015 14:12 — forked from briantjacobs/l8get
# This is a shell function to quickly grab the data for a given Landsat 8 tile ID from Google's servers
# For example:
# l8get LC81690352014169LGN00
# The echo at the end is to remind myself of the syntax for extracting bands 8, 4, 3, and 2. (Pansharp, Red, Green, Blue)
# On OSX this would go into your ~/.bash_profile file.
# Requires gsutil from https://developers.google.com/storage/docs/gsutil_install
# Most useful in conjunction with USGS' Earth Explorer: http://earthexplorer.usgs.gov/