Skip to content

Instantly share code, notes, and snippets.

View andymason's full-sized avatar
🐱

Andrew Mason andymason

🐱
View GitHub Profile
var w = 960,
h = 550;
// Matrix Layout
// ------------
var Matrix = function() {
var width = 1,
height = 1,
cols = 4;
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="matrix.js"></script>
<style type="text/css">
rect {
fill: steelblue;
fill-opacity: .8;
@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/
define('nyt5/analytics',[],function() {
var canonical = document.querySelector("link[rel='canonical']").href,
pageview = ['_trackPageview'];
if (canonical) {
var a = document.createElement("a");
a.href = canonical;
if (a.pathname != document.location.pathname) pageview.push(a.pathname);
}
// Support: Firefox 18+
// Can't be in strict mode, several libs including ASP.NET trace
// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
//
var arr = [];
--
// Support: Android<4.1
// Make sure we trim BOM and NBSP
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
define([], function() {
// Test more
// now more
return {
boot: function(el) {
console.log('test');
console.log('test');
<div class="shareButtons">
{{#each media}}
<button on-click="share:{{this}}" class="share-{{this}}"></button>
{{/each}}
</div>
<style>
.shareButtons{
font-size:0;
}
@andymason
andymason / steam-game.html
Created June 13, 2015 12:06
Steam sale game 2015
<!DOCTYPE html>
<html class="wf-pressstart2p-n4-active wf-active">
<head>
<meta charset="UTF-8">
<title>Steam Community :: Monster Summer Sale</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link href="http://steamcommunity-a.akamaihd.net/public/shared/css/motiva_sans.css?v=F3z3QpekjE2f" rel="stylesheet" type="text/css">
<link href="http://steamcommunity-a.akamaihd.net/public/shared/css/buttons.css?v=4iAytERcUqWU" rel="stylesheet" type="text/css">
<link href="http://steamcommunity-a.akamaihd.net/public/shared/css/shared_global.css?v=XXN4vhirCNMy" rel="stylesheet" type="text/css">
@andymason
andymason / towerattack.js
Created June 13, 2015 12:10
Steam sale game 2015 - mini-game towerattack
// http://steamcommunity-a.akamaihd.net/public/javascript/minigame/towerattack.js
// <script>
"use strict"
window.k_ScreenWidth = 1280;
window.k_ScreenHeight = 720;
var g_JSCacheKey = 'as8wg42t0w';
var g_rgTextureCache = {
@andymason
andymason / running.js
Created June 13, 2015 12:16
Steam sale game 2015 - mini-game towerattack /towerattack/running.js
// <script>
"use strict";
window.k_ETowerAttackAbility_Invalid = 0;
window.k_ETowerAttackAbility_Attack = 1;
window.k_ETowerAttackAbility_ChangeLane = 2;
window.k_ETowerAttackAbility_Respawn = 3;
window.k_ETowerAttackAbility_ChangeTarget = 4;
window.k_ETowerAttackElement_Invalid = 0;