Skip to content

Instantly share code, notes, and snippets.

View wiringa's full-sized avatar

Peter Wiringa wiringa

  • Minnesota, USA
View GitHub Profile
@wiringa
wiringa / Add_COG.pyt
Created January 23, 2023 16:44 — forked from lpinner/Add_COG.pyt
Add remote COG to ArcGIS Pro by URL
# -*- coding: utf-8 -*-
import os
import arcpy
from osgeo import gdal
class Toolbox(object):
def __init__(self):
self.label = "AddCOG Toolbox"
@wiringa
wiringa / gr
Last active July 18, 2022 16:32
Open a GitHub repo origin in browser using macOS `open`
#!/bin/zsh
export TEMPURL=$(git remote get-url origin | sed 's/:/\//g' | sed 's/git@/https:\/\//g' | sed 's/\.git$//') && open -u "$(echo $TEMPURL)" && unset TEMPURL
@wiringa
wiringa / README.md
Created December 13, 2020 21:30 — forked from akashnimare/README.md
A Beginners Guide to writing a Kickass README ✍

Project title

A little info about your project and/ or overview that explains what the project is about.

Motivation

A short description of the motivation behind the creation and maintenance of the project. This should explain why the project exists.

Build status

Build status of continus integration i.e. travis, appveyor etc. Ex. -

Build Status

@wiringa
wiringa / postgres_queries_and_commands.sql
Created January 29, 2019 22:29 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@wiringa
wiringa / postgis-to-geojson-feature-collection.sql
Created August 14, 2018 14:46 — forked from brambow/postgis-to-geojson-feature-collection.sql
PostGIS query to build a GeoJSON FeatureCollection
SELECT json_build_object(
'type', 'FeatureCollection',
'crs', json_build_object(
'type', 'name',
'properties', json_build_object(
'name', 'EPSG:4326'
)
),
'features', json_agg(
json_build_object(
@wiringa
wiringa / 01-directory-structure.md
Created May 17, 2018 01:57 — forked from tracker1/01-directory-structure.md
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used