This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
Import-Module WebAdministration | |
$definitionFile = "C:\temp\IIS_Definition.json" | |
# import JSON definition file | |
$definitions = Get-Content -Raw -Path $definitionFile | ConvertFrom-Json | |
$baseDirectory = $definitions.baseDirectory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Notifying Jenkins Server | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
echo "== $branch ==" | |
curl -s "https://myJenkins.com/git/notifyCommit?url=https://myGitServer.com/MyGitRepository.git&branches=$branch" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy, codecs, csv, os, shutil | |
os.system("cls") | |
origFgdbLocation = r"\\Server\Share" | |
origFgdbNames = ["MyFileGeodatabase1", "MyFileGeodatabase2", "MyFileGeodatabase3"] | |
csvFilePath = r"C:\temp\members.csv" | |
elements = [] | |
for fgdbName in origFgdbNames: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy, os, shutil | |
os.system("cls") | |
origFgdbLocation = r"\\Server\Share" | |
origFgdbNames = ["myFileGeodatabase"] # DON'T append the suffix ".gdb" | |
newFgdbLocation = r"\\OtherServer\OtherShare" | |
resolution = "0.00005 Meters" | |
tolerance = "0.0001 Meters" | |
newCrs = arcpy.SpatialReference(2056) # EPSG code of "CH1903+ LV95" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy, logging, math, os, shutil, sys | |
def GetCharDigitSum(s): | |
if s is None: | |
return 0 | |
sum = 0 | |
for c in s: | |
sum = sum + ord(c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy | |
servers = ['myServer1', 'myServer2', 'myServer3'] | |
outdir = 'GIS Servers' # using 'GIS Servers' results in creating the AGS files in the 'GIS Servers' section of ArcCatalog (equivalent to '%appdata%\ESRI\Desktop10.5\ArcCatalog') | |
username = '' | |
password = '' | |
for server in servers: | |
out_name = server + ' (admin).ags' | |
server_url = 'https://' + server + '/arcgis/admin' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy, codecs, csv, os | |
mxd_folder = "C:\\temp\\MXD" | |
output = "C:\\temp\\results.csv" | |
f = codecs.open(output, "w", encoding="utf-8") | |
f.write("MXD;Layer;Result\n") | |
for file in os.listdir(mxd_folder): | |
if file.endswith(".mxd"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy, os | |
os.system('cls') | |
mxd = arcpy.mapping.MapDocument(r"\\Server\Share\MyMap.mxd") | |
tolerateFieldWhenDisabled = True | |
for layer in arcpy.mapping.ListLayers(mxd): | |
print "Checking Layer '" + layer.name + "'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy, codecs, csv, os | |
mxd_folder = "C:\\temp\\MXDs" | |
output = "C:\\temp\\dataSources.csv" | |
f = codecs.open(output, "w", encoding="utf-8") | |
f.write("MXD;Layer;Data Source\n") | |
for file in os.listdir(mxd_folder): | |
if file.endswith(".mxd"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy, codecs, csv, os, shutil | |
os.system("cls") | |
origFgdbLocation = r"\\Server\Share" | |
origFgdbNames = ["A", "B", "C"] | |
csvFilePath = r"C:\temp\members.csv" | |
elements = [] | |
for fgdbName in origFgdbNames: |