Skip to content

Instantly share code, notes, and snippets.

View steveoh's full-sized avatar
🚀

steveoh steveoh

🚀
View GitHub Profile

Spatial Filters

Introduction

Create a set of spatial filters based on OGC spatial functions.

Proposal

Example Objects

services.AddMediatR(typeof(Startup));
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(PerformanceLogger<,>));
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
services.AddSingleton(new Lazy<NaicsProvider>(() => new NaicsProvider()));
services.AddScoped<IHasOwnership, OwnershipResolver>();
// add context for computations
services.AddDbContext<AppDbContext>(
options => options
@steveoh
steveoh / module-main.tf
Last active November 24, 2021 19:11
GitHub Workflow Identity Federation Terraform module
module "gcp_services" {
source = "../gcp-services"
project_id = var.project_id
services = [
"cloudresourcemanager.googleapis.com",
"iam.googleapis.com",
"iamcredentials.googleapis.com",
"sts.googleapis.com"
]
'''
AGOLPallet.py
A module that contains a pallet definition for the data that gets pushed to AGOL.
'''
import re
import traceback
from datetime import timedelta
from os import mkdir, rename
from os.path import basename, dirname, join
@steveoh
steveoh / address systems.js
Created January 10, 2023 18:02
arcade expression to assign address systems
var layerName = 'Address Systems';
var set = FeatureSetByName($datastore, layerName);
function getAttributeFromLargestArea(feat, set, field) {
var items = intersects(set, feat);
var counts = count(items);
if (counts == 0) {
return { 'errorMessage': 'No intersection found' };
{
"lighthouseVersion": "9.6.8",
"requestedUrl": "https://plss.utah.gov/",
"finalUrl": "https://plss.utah.gov/",
"fetchTime": "2023-01-19T16:49:35.063Z",
"gatherMode": "navigation",
"runWarnings": [
"There may be stored data affecting loading performance in this location: IndexedDB. Audit this page in an incognito window to prevent those resources from affecting your scores."
],
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
@steveoh
steveoh / main.py
Last active May 4, 2023 20:56
Sending email with SendGrid
#!/usr/bin/env python
# * coding: utf8 *
"""
main.py - A script that send an email with sendgrid
"""
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
from_address = 'no-reply@utah.gov'