Skip to content

Instantly share code, notes, and snippets.

@unusorin
unusorin / rgb_bigtiff_cogs_notes.md
Created March 30, 2022 14:57 — forked from palmerj/rgb_bigtiff_cogs_notes.md
Creating BigTiff COGS for raster RGB photos from a tile mosaic directory using GDAL

Creating a Cloud Optimised Geotiffs (COGs) for raster photo imagery

This process outlines the process for creating Cloud Optimised Geotiffs suitable for hosting in services such as AWS S3. COGs enables more efficient workflows use cases such as fast access from Functions as a Services (E.g AWS Lambda), or comsumption into client desktop GIS systems (e.g QGIS). For more details on COGs please see https://www.cogeo.org/in-depth.html

1. Create a mosaic

#!/usr/bin/env php
<?php
require 'SebastianBergmann/FinderFacade/autoload.php';
require 'TheSeer/fDOMDocument/autoload.php';
use SebastianBergmann\FinderFacade\FinderFacade;
use TheSeer\fDOM\fDOMDocument;
$input = new FinderFacade(array($argv[1]), array(), array('*.xml'));
$output = $argv[2];
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "raring64"
config.vm.hostname = "docker"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"
#!/bin/sh
AGENT_URL=http://puppetlabs.com/downloads/puppet/puppet-2.7.14.tar.gz
FACTER_URL=http://puppetlabs.com/downloads/facter/facter-1.6.9.tar.gz
apt-get update
apt-get -y install ruby rake rubygems
cd /tmp
wget ${FACTER_URL} -O /tmp/facter.tar.gz
@unusorin
unusorin / clear.sh
Created February 26, 2014 08:31 — forked from Zuckonit/clear.sh
#!/usr/bin/env bash
printf "\033c"

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@unusorin
unusorin / MultiCurl.class.php
Created September 19, 2012 13:03
MultiCurl class PHP
<?php
/**
* MultiCurl class library is a PHP solution for work with MULTI CURL extension.
* It provides to execute some parallel HTTP requests with limit of downloaded
* size. Example: start 100 downloads with 2 parallel sessions, and get only
* first 100 Kb per session.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@unusorin
unusorin / imdb.php
Created September 19, 2012 13:02 — forked from silalahi/imdb.php
IMDb Wrapper Class PHP
<?php
/**
* IMDB Wrapper API
* Wrapper class to retrieve data from IMDB
* http://jogisilalahi.com/blog/imdb-api-wrapper-class-php
* @author Jogi Silalahi <silalahi.jogi@gmail.com>
*/
class IMDB