Skip to content

Instantly share code, notes, and snippets.

View lukecampbell's full-sized avatar

Luke Campbell lukecampbell

View GitHub Profile
@lukecampbell
lukecampbell / summary.sql
Created August 3, 2015 20:36
Summary query for cbibs
-- summary
SELECT
s.site_code,
s.description,
vg.group_name,
v.actual_name,
u.netcdf,
svo.last_update_ts,
svo.min_observation_ts,
svo.max_observation_ts,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukecampbell
lukecampbell / setenv.sh
Created June 11, 2015 15:16
Catalina setenv script example
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
netcdf examine {
dimensions:
time = 66 ;
variables:
int crs ;
crs:grid_mapping_name = "latitude_longitude" ;
crs:epsg_code = "EPSG:4326" ;
crs:semi_major_axis = 6378137.f ;
crs:inverse_flattening = 298.2572f ;
int platform ;
group_id site_code variable_name units start_time end_time
4 44043 grid_longitude 2007-04-25 16:00:00-04 9999-12-30 19:00:00-05
4 44043 wind_from_direction 2007-04-25 16:00:00-04 9999-12-30 19:00:00-05
4 44043 grid_latitude 2007-04-25 16:00:00-04 9999-12-30 19:00:00-05
4 44043 wind_speed_of_gust m/s 2007-04-25 16:00:00-04 9999-12-30 19:00:00-05
4 44043 relative_humidity % 2007-04-25 16:00:00-04 9999-12-30 19:00:00-05
4 44043 air_temperatu
@lukecampbell
lukecampbell / starting-point.md
Created May 20, 2015 18:11
Professional Programming Starting Point
@lukecampbell
lukecampbell / build_agg.py
Created May 1, 2015 16:49
Script to generate CBIBS catalog
#!/usr/bin/env python
'''
build_agg.py
Builds the catalog for the CBIBS Stations
'''
import sys
from jinja2 import Template
import os
@lukecampbell
lukecampbell / install.sh
Last active August 29, 2015 14:19
Binary wrapper for running the OTPS model
#!/bin/bash
set -x
OTPS_URL=ftp://ftp.oce.orst.edu/dist/tides/OTPS.tar.Z
TPXO_URL=ftp://ftp.oce.orst.edu/dist/tides/Global/tpxo.tar.Z
MODEL_RUN_URL=https://gist.githubusercontent.com/lukecampbell/832fd094d875e60a02c4/raw/eb86dfa1c7c0921fbb47236919592649235dba8b/model_run.py
wget $OTPS_URL
zcat OTPS.tar.Z | tar -xv
cd OTPS
make
diff --git a/migrations/2015-04-17-metadata.py b/migrations/2015-04-17-metadata.py
new file mode 100644
index 0000000..622dfac
--- /dev/null
+++ b/migrations/2015-04-17-metadata.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+'''
+migrations/2015-04-17-metadata.py
+
@lukecampbell
lukecampbell / CategoryItemView.js
Last active August 29, 2015 14:16
Example responses
TOCView ->
subviews : []
stationCollection,
categoryCollection
add: function(subview) { // CategoryItemView
subview.render(); // --> <li> {{ name }} <ul></ul> </li>
this.subviews.push(subview);
this.$el.find('ul').append(subview.el);