Skip to content

Instantly share code, notes, and snippets.

View bradbrowne's full-sized avatar

Brad Browne bradbrowne

  • Melbourne, Australia
View GitHub Profile
@bradbrowne
bradbrowne / geocortex-file-upload-issue.xaml
Last active March 3, 2017 01:45
🐛 GeoCortex FilePicker uploads file multiple times if FileItem properties are accessed multiple times.
<Activity mc:Ignorable="sap sap2010 sads" x:Class="ActivityBuilder" this:ActivityBuilder.WorkflowContainerName="FileUploadIssue"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client"
xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client"
xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core"
xmlns:gcx="http://apis.geocortex.com/2009"
xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi"
xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi"
xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting"

Keybase proof

I hereby claim:

  • I am bradbrowne on github.
  • I am bradbrowne (https://keybase.io/bradbrowne) on keybase.
  • I have a public key ASBB3PWcONOrA8fyrstbdJItm_K6-Svpf4ThkpOgJv8q9wo

To claim this, I am signing this object:

@bradbrowne
bradbrowne / mapbox-vicmap-api.html
Created February 22, 2018 06:04
MapBox Example using VicMap API
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.37.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.37.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@bradbrowne
bradbrowne / ComboBoxSetParametersAtRuntime.xaml
Last active March 15, 2018 23:44
🐛 GeoCortex Setting ComboBox parameters in Runtime Modifications Sequence
<Activity mc:Ignorable="sads sap sap2010" x:Class="ActivityBuilder" mva:VisualBasic.Settings="{x:Null}" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client"
xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client"
xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core"
xmlns:gcx="http://apis.geocortex.com/2009"
xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi"
xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi"
xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting"
SELECT PFI,
SCHEME_CODE,
LGA_CODE,
LGA,
ZONE_NUM,
ZONE_STATUS,
ZONE_CODE,
ZONE_DESCRIPTION,
GAZ_BEGIN_DATE,
PFI_CREATED,
@bradbrowne
bradbrowne / using-command-line-to-kill-remote-desktop-session-on-windows-server-2012.md
Last active April 17, 2018 03:33
Windows 2012 has removed the Remote Desktop Services Manager tools that provide a GUI to view and kill user sessions connected to a server and so now you have to use the command line to perform this.
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> qwinsta
 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
 services                                    0  Disc
>rdp-tcp#30        bbrowne                   2  Active
                   otheruser                 4  Disc
 console admin 11 Active
EXEC dbo.Ogr2Ogr @arguments = N' -f "CSV" -overwrite "D:\Flux\Jobs\FluxAssetic\CSV" "MSSQL:server=.;database=Flux;trusted_connection=yes" -t_srs EPSG:4326 -sql "SELECT [Asset Category],[Asset ID],[Asset Name],[Asset Class],[Asset Sub Class],[Asset Type],[Asset Sub Type],[Maintenance Asset Type],[Maintenance Asset Sub Type],Responsibility,[Work Group],[Subdivision Name],[Subdivision Stage Number],[Plan Number],[Date of Construction],Locality,[General Comments],[Ownership Agreement],SP_GEOMETRY FROM [assetic].[Fences]" -lco GEOMETRY=AS_WKT -nln assetic.Fences'
@bradbrowne
bradbrowne / authenticode-code-sign-powershell-script.ps1
Created May 21, 2018 07:25
Signing a Powershell script with Authenticode code signing certificate so that execution policy can be set to AllSigned
Set-ExecutionPolicy AllSigned
$cert = Get-PfxCertificate -FilePath "mapdojo.p12"
Set-AuthenticodeSignature -FilePath "build.ps1" -Certificate $cert
@bradbrowne
bradbrowne / clam-powershell-iis-website-admin.ps1
Created May 30, 2018 02:03
Windows PowerShell IIS Administration using Powershell
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration")
$iis = New-Object Microsoft.Web.Administration.ServerManager
$iis.Sites
@bradbrowne
bradbrowne / clam-powershell-robocopy-loop-through-text-file-providing-path-names.ps1
Last active May 31, 2018 23:51
Loop through a text file containing file paths and use Robocopy to copy from source to destination using restartable and other options.
gc example.txt | % { robocopy $([System.IO.Path]::GetDirectoryName($_)) .\dst $([System.IO.Path]::GetFileName($_)) /z /w:20 /r:20 /j}