Skip to content

Instantly share code, notes, and snippets.

Strava

  • mean segment time

    • array, list
  • median segment time

    • sorted
  • leaderboard, one entry per athlete

  • ??

@jkburges
jkburges / useful_commands.md
Last active August 29, 2015 14:27
Useful PR related commands

Get some data from the GitHub Search API:

PRs merged within the last fortnight:

FROM_DATE=`date --date='2 weeks ago' '+%Y-%m-%d'`
curl -G "https://api.github.com/search/issues" \
     --data-urlencode "q=user:aodn type:pr is:merged closed:>${FROM_DATE}" \
     --data-urlencode "sort=updated"
http://yolo.aodn.org.au:8080/aodn-portal/home?uuid=d4f0c06d-0dd3-42ed-a0f1-7504e419e59a
@jkburges
jkburges / active_deployments_nsw.sql
Last active August 29, 2015 14:25
Active deployments NSW
set search_path to 'aatams', 'public';
select
project.name as project_name,
installation.name as installation_name,
installation_station.name as station_name,
receiver_name,
trunc(st_x(installation_station.location)::numeric, 2) as longitude,
trunc(st_y(installation_station.location)::numeric, 2) as latitude,
depth_below_surfacem,
@jkburges
jkburges / getFilters
Last active August 29, 2015 14:25
Issue #1835
Request URL:
https://imos.aodn.org.au/imos123/layer/getFilters?serverType=ncwms&server=http%3A%2F%2Frs-data1-mel.csiro.au%2FncWMS%2Fwms&layer=oc.SO-Johnson.chl.8d.aqua/chlorophyll&_dc=1437608429135
Response:
HTTP/1.1 500 Internal Server Error
Date: Wed, 22 Jul 2015 23:40:29 GMT
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
Via: 1.1 imos.aodn.org.au
http://131.217.38.76:8080/aatams
* receiver 6666
* highlight invalid + extra columns
* create a new deployment (2020)
https://drive.google.com/file/d/0B2O98aeavvGgMUViVktuMWQ2dFE/view?usp=sharing
http://bit.ly/1HJGk6T
@jkburges
jkburges / gist:85014d561393e1427e0a
Created June 17, 2015 02:04
Check duplicate counting
select * from (
select count(*), d.timestamp, d.receiver_name, d.transmitter_id from detection d
join (
select timestamp, receiver_name, transmitter_id from detection
where receiver_download_id = 127971115
and duplicate = true
) dups
on d.timestamp = dups.timestamp
and d.receiver_name = dups.receiver_name
set search_path to 'aatams', 'public';
select transmitter_id, scientific_name from animal_release
join project on project_id = project.id
join surgery on animal_release.id = surgery.release_id
join device tag on surgery.tag_id = tag.id
join sensor on tag.id = sensor.tag_id
join animal on animal_id = animal.id
join species on animal.species_id = species.id
https://aatams.emii.org.au/aatams/receiverDownloadFile/show/126773613
http://jkburges.emii.org.au:8080/aatams/detection/list