Skip to content

Instantly share code, notes, and snippets.

View gavinr's full-sized avatar

Gavin Rehkemper gavinr

View GitHub Profile
@gavinr
gavinr / troubleshooting-esri-resource-proxy.md
Last active June 28, 2017 18:55
Troubleshooting steps to review and try when you're having problems with the Esri Resource Proxy (https://github.com/Esri/resource-proxy)

Note: In general the below steps are assuming the .NET (.ashx) proxy. Some of the steps may also apply to the Java or PHP proxies.

Proxy is not working

  1. Read through the instructions/troubleshooting on both the main proxy page as well as the specific readme for your particular proxy.
  2. Try the proxy against a known working url (like http://esri.com) and make sure the page comes back (the page may look weird but as long as you don't get an error and get something back, you know the proxy is at least working for that URL.)
  3. Try turning logging off.
  4. Test if setting mustMatch to false makes it work. If so, see mustMatch=false works but not when I set to true below.
  5. Are there outbound firewall settings on your machine that are preventing the pro
@gavinr
gavinr / index.html
Last active November 22, 2017 21:12
<html><body><p>If you're a JavaScript developer, you may be interested in TypeScript, a typed superset of JavaScript that compiles to plain JavaScript. If you're also creating Web AppBuilder widgets, using TypeScript in a widget is a great way to get started with TypeScript. Here are a few notes and tips that I've discovered while using TypeScript within a Web AppBuilder custom widget development workflow.</p>
<p></p>
<h3>Background</h3>
<p></p>
<p>My usual Web AppBuilder development workflow is to have my widget code in its own code repository, and use a task runner like Grunt or Gulp to automatically compile and copy my code to the correct places (The stemapp directory and optionally the server directory of the app that I'm currently working on). Within this context, TypeScript fills the "transpiler" role where Babel might currently be in your stack.</p>
<p></p>
<h3>tsconfig.json&nbsp;file</h3>
<p></p>
<p>Many aspects of your tsconfig.json file are on a per-project basis, but there are a few things that you
@gavinr
gavinr / vim-notes.md
Last active February 13, 2018 03:50
VIM notes

Reminders

  • daw = delete the word under the cursor ("delete a word")

  • caw = delete the word under the cursor and put you in insert mode ("change a word")

  • f<character> = put the cursor on the next character ("find")

  • ^ = go to beginning of text on line (compare to 0)

  • <SHIFT>i = go to beginning of test on line and insert mode.

  • * = search for word in whole doc

  • di" = delete inside quotes

@gavinr
gavinr / locations.geojson
Created February 12, 2018 18:19
Create a pull request with your location!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gavinr
gavinr / geojson-to-esri-json-polygons-nodejs.js
Last active July 2, 2018 16:24
Script to covert a file of GeoJSON to Esri JSON in NodeJS utilizing the `arcgis-to-geojson-utils` package.
const esriUtils = require('@esri/arcgis-to-geojson-utils');
const fs = require('fs');
const inGeoJson = JSON.parse(fs.readFileSync('FILENAME.json', 'utf8'));
console.log('inGeoJson', inGeoJson);
const result = esriUtils.geojsonToArcGIS(inGeoJson);
let outFeatureSet = {

Create a new ArcGIS Python API Environment

First Time

  1. Install conda with Anaconda for Python Distribution. Conda is a python package manager that will install python 3.x and other packages listed in the environment.yml file.
    • Choose the 3.x version
    • Note: Make sure to check "Add to PATH environment variable"
  2. Restart your computer. Because you added conda to the PATH variable, you should be able to use the conda command in any terminal (Windows command prompt, Powershell, etc). Open a terminal and type conda to make sure the conda command is recognized.
  3. In the terminal, navigate to the location of your code repository.
  4. Create a new environment with Conda (more info) > conda env create --name projectname
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.