Skip to content

Instantly share code, notes, and snippets.

Gregg Roemhildt roemhildtg

Block or report user

Report or block roemhildtg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@roemhildtg
roemhildtg / diff.txt
Created Jan 7, 2020
ArcGIS Server Create Site Diff
View diff.txt
0a1,3
> A /home/arcgis/ArcGIS
> A /home/arcgis/ArcGIS/AddIns
> A /home/arcgis/ArcGIS/AddIns/Server10.8
210a214,2217
> A /home/arcgis/server/arcpy/arcpy/analysis.pyc
> A /home/arcgis/server/arcpy/arcpy/arcobjects/arcobjectconversion.pyc
> A /home/arcgis/server/arcpy/arcpy/arcobjects/arcobjects.pyc
> A /home/arcgis/server/arcpy/arcpy/arcobjects/_base.pyc
> A /home/arcgis/server/arcpy/arcpy/arcobjects/geometries.pyc
@roemhildtg
roemhildtg / pg-backup.ps1
Last active Sep 5, 2019
Powershell Backup Script for PostgreSQL
View pg-backup.ps1
# Backup postgres databases to s3
# requires AWS cli tools for windows to be initialized and installed
$transcripts = "C:\transcripts"
$s3Bucket = "s3://s3-bucket-name/s3-bucket-path/"
$csv = "output.csv"
$pguser = "postgres"
$pgpass = Get-Content "C:\Scripts\pg_pass.txt"
View config.js
// config.js
export default {
view: {
map: {...},
widgets: [{
type: 'layers',
options: {
// pass options to the layers list widget
// https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction
listItemCreatedFunction(item){
View test.js
/**
* The resolved tool component to render
*/
toolComponent: {
value({resolve, lastSet}) {
this.promise.then((Component)=> {
lastSet = lastSet.get();
if (lastSet) {
resolve(lastSet);
@roemhildtg
roemhildtg / content.js
Created Jan 11, 2019
Dynamic event delegation
View content.js
Component.extend({
tag: 'panel-component',
ViewModel: {
collapsed: 'boolean',
contentRenderer: {
default(){
return stache(`<p>Hello world</p>`);
}
}
},
@roemhildtg
roemhildtg / config.js
Last active Apr 25, 2018
A config for javascript
View config.js
import esriConfig = require("esri/config");
const DEFAULT_WORKER_URL = "https://js.arcgis.com/4.7/";
const DEFAULT_LOADER_URL = `${DEFAULT_WORKER_URL}dojo/dojo-lite.js`;
(esriConfig.workers as any).loaderUrl = DEFAULT_LOADER_URL;
esriConfig.workers.loaderConfig = {
baseUrl: `${DEFAULT_WORKER_URL}dojo`,
packages: [
{ name: "esri", location: DEFAULT_WORKER_URL + "esri" },
@roemhildtg
roemhildtg / AppViewModel.js
Created Mar 26, 2018
DoneJS app that renders dynamic components
View AppViewModel.js
componentProps: {
default: navigation,
serialize: false
},
flatComponentProps: {
get () {
return this.componentProps.reduce((links, link) => {
if (link.children) {
links = links.concat(link.children);
} else {
@roemhildtg
roemhildtg / arcgis-token.class.js
Created Mar 22, 2018
A NodeJS feathers api for arcgis tokens
View arcgis-token.class.js
const axios = require('axios');
const querystring = require('querystring');
/* eslint-disable no-unused-vars */
class Service {
constructor (options) {
this.options = options || {};
}
get (id, params) {
View genesis_public_key
0428ee62a43b190e18275d8d506c7af7e08810933b9cb8a3ea1eba8a3b02ba3ecc66f8bd40e60f79d1873cbd8aa33c5bebfd67b3dff48ca521f9aa160451c99df7
View System._traceData
{
"npm-utils": {
"npm": true,
"npm-load": true,
"npm-convert": true,
"npm-crawl": true,
"npm-extension": true
},
"npm-convert": {
"npm": true,
You can’t perform that action at this time.