Skip to content

Instantly share code, notes, and snippets.

View brucecrevensten's full-sized avatar

Bruce Crevensten brucecrevensten

View GitHub Profile
@brucecrevensten
brucecrevensten / pysar_object_analysis.py
Created December 16, 2010 04:18
thinking about oo-style reroll of ray's cudasar
# analysis of implicit object hierarchy for rayjanwilson/cudasar, with an eye towards creating a runtime-swappable algorithm for sar processing.
# basic idea here is that we'll use Builder pattern to assemble a SarProcessor,
# and make each distinct algorithm a little object hierarchy so that we can mix'n'match
# standard + cuda + other approaches for more interesting benchmarking
# the builder patterns
class SarProcessor:
def process(SarImage):
return self.azimuthCompression( self.RangeCompression( SarImage ), SarImage.metadata ) # need to pass the whole SarImage to get the L0
@brucecrevensten
brucecrevensten / gist:1412279
Created December 1, 2011 00:36
Trying to make a map file work
MAP
NAME "WMSSNAPTest"
STATUS ON
EXTENT -2183223.206 158412.933 4280776.794 2556412.933
UNITS METERS
WEB
IMAGEPATH "/tmp/"
METADATA
"wms_title" "Testing"
@brucecrevensten
brucecrevensten / sketch
Created December 14, 2011 18:19
backbone-jasmine
Model = Backbone.Model.extend({
url: '/something'
});
aModel = new Model({ id: 'else' });
FixturesSync = function(method, model, options) {
var url = model.url || model.collection.url;
switch (method) {
case "read":
<target name="jasmine" description="Run unit tests with Jasmine">
    <exec executable="${basedir}/tests/js/jasmine-reporters/test/phantomjs.runner.sh">
        <env key="DISPLAY" value=":0" />
        <arg line="${basedir}/tests/js/jasmine-reporters/test/JUnitRunner.html"/>
    </exec>
    <copy todir="${basedir}/build/test-results">
        <fileset dir="${basedir}/tests/js/jasmine-reporters/test">
            <include name="**/TEST*" />
        </fileset>
="'" & B4 & " to " & C4 & "' : '#" & DEC2HEX(D4, 2) & DEC2HEX(E4,2) & DEC2HEX(F4, 2) & "',"
@brucecrevensten
brucecrevensten / oscon.md
Created July 19, 2012 18:30
OSCON notes
@brucecrevensten
brucecrevensten / gist:3177782
Created July 25, 2012 18:36
snap apache conf
snap:
<VirtualHost *:80>
Redirect permanent / http://www.snap.uaf.edu
ServerName snap.uaf.edu
</VirtualHost>
www.snap:
<VirtualHost *:80>
Redirect /home http://www.snap.uaf.edu
ServerAdmin webmaster@dev.www.snap.uaf.edu
@brucecrevensten
brucecrevensten / unboxing.md
Created August 1, 2012 22:22
Unboxing PostgreSQL - OSCON 2012 - Notes

Postgres configuration and ops considerations -- notes taken during OSCON 2012

Presented by Christophe Pettus.

Authors site: thebuild.com

Nomenclature

  • database is set of tables & schema objects,
  • mysql "databases" === postgres "Schema"
@brucecrevensten
brucecrevensten / gist:3828043
Created October 3, 2012 16:25
example of markdown syntax

About using Markdown

Hi -- when composing documents that are in a plain-text format, we occasionally want to use symbols to indicate formatting even when the document is likely to often be rendered as plain text. In this case, it can be useful to use a structured markup language that isn't as verbose or intrusive as HTML. One popular syntax is called Markdown, and it's used in a number of CMS systems and is widely supported by various programming tools. For example, it's used pretty much anywhere you can enter text in Github.

This syntax has some good benefits:

  • It's easy to learn and to type.
  • It's readable in plain text format, especially compared to HTML documents.
  • Lots of tools will transform it to good looking HTML if it's being viewed on a web site.
  • It's hard to be consistent when doing ad-hoc formatting in plain text documents, and this is a consistent syntax that works well.
[root@icarus gdal-1.10.1]# gdalinfo "PG:host=hermes.snap.uaf.edu port=5432 dbname='sea_ice_atlas' user='sea_ice_atlas_user' password='' schema='public' table='example'"
Warning 1: Cannot find information about public.example table in raster_columns view. The raster table loading would take a lot of time. Please, execute AddRasterConstraints PostGIS function to register this table as raster table in raster_columns view. This will save loading time.
Driver: PostGISRaster/PostGIS Raster driver
Files: none associated
Size is 241, 161
Coordinate System is:
PROJCS["NAD83 / Alaska Albers",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.257222101,