Skip to content

Instantly share code, notes, and snippets.

JeffJacobson / index.html
Created Jun 21, 2022
MapImageLayer Clipping Sample
View index.html
<link rel="stylesheet" href="min.css">
<meta charset="utf-8" />
ArcGIS API for JavaScript,
JeffJacobson / Extensions.cs
Last active Jan 29, 2019
ArcObjects extension methods
View Extensions.cs
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Wsdot.ArcGis.Extensions
public static class Extensions
JeffJacobson / prepare.js
Last active Nov 15, 2018
Generate both an mjs (es6 module) and js file using TypeScript
View prepare.js
const fs = require("fs");
const { exec } = require("child_process");
* Response from exec
* @typedef ExecResponse
* @type {object}
* @property {?Error} error - If the operation resulted in an error, this will have a value.
* @property {string} stdout - Text written to stdout
View BikePedOpenDataUrl.arcade.js
// Gets the Open Data portal URL filtered to just this location
"" + $feature.LocationID + "%27"
JeffJacobson / wsdot.less
Created Mar 6, 2018
fonts and colors from WSDOT style guide
View wsdot.less
@import (inline,once) "|Lato";
/* Colors from WSDOT Style Guide */
@wsdotStdPms0433: #1E252B;
@wsdotStdPms0433_80: lighten(@wsdotStdPms0433, 80%, relative);
@wsdotStdPms0433_60: lighten(@wsdotStdPms0433, 60%, relative);
@wsdotStdPms0433_40: lighten(@wsdotStdPms0433, 40%, relative);
@wsdotStdPms7722: #004f50;
@wsdotStdPms7722_80: lighten(@wsdotStdPms7722, 80%, relative);
JeffJacobson / New-PipIndex.ps1
Created Nov 6, 2017
Utility for generating an index for pip
View New-PipIndex.ps1
Creates an index HTML page listing Python packages in the current directory.
Creates an index HTML page listing Python packages in the current directory.
PS C:\> .\New-Index.ps1
Creates the index file and saves it to index.html
Inputs (if any)
JeffJacobson / Find-SDKTool.ps1
Created Aug 22, 2017
A script that finds different versions of Windows .NET SDK tools in expected directories.
View Find-SDKTool.ps1
Finds an SDK tool in .NET SDK folders
Name of tool (exe filename) to search for. (E.g., svcutil.exe)
Outputs a list of matching filenames along with properties about the directories
* Windows SDK version
* .NET version
* 32- or 64-bit exe
JeffJacobson /
Last active Mar 19, 2022
Python script to dump ArcGIS ID messages

This is a python script to dump ArcGIS ID messages.

JeffJacobson / GetArcGis-Token.ps1
Last active Mar 19, 2022
ArcGIS Online / Portal Powershell scripts
View GetArcGis-Token.ps1
class Token {
[string] $token
[System.DateTimeOffset] $expires
Token($response) {
$this.token = $response.token;
$this.expires = [System.DateTimeOffset]::FromUnixTimeMilliseconds($response.expires)
$rootUri = ""
JeffJacobson / Run-PythonUnitTests.ps1
Last active Feb 23, 2017
Runs Python unittests against multiple Python environments
View Run-PythonUnitTests.ps1
<# Runs Python unit tests in multiple environments #>
# Get python.exe paths.
$pyenvs = Get-ChildItem -Path "C:\Python*\" -Filter "python.exe" -Recurse
$pyenvs += Get-ChildItem -Path "C:\Program Files\ArcGIS" -Filter "python.exe" -Recurse
# Build the list of modules that will be tested.
$modules_to_test = [string]::Join(" ", @(