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 Image | |
| import ImageDraw | |
| import ImageFont | |
| # string according to dokuwiki syntax for a table row | |
| data = "| # | 19.11.2011 | DARK TRANQUILLITY, ELUVEITIE, VARG, MERCENARY, GURD, OMNIUM GATHERUM | FZW, Dortmund |" | |
| # first band of the line up (to constrain text length) | |
| subject = data.split("|")[3].split(',')[0].strip() | |
| date = data.split("|")[2].strip() |
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
| try: | |
| response = conn.getresponse() # line 244 in original findBadTiles.py | |
| except: | |
| # re-open connection | |
| conn = httplib.HTTPConnection(parsedUrl.netloc) | |
| conn.request("GET", partTileURL, headers=txtheaders) | |
| response = conn.getresponse() |
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 | |
| import os.path | |
| # define local variables | |
| wrkspc = r'C:\data\service_definitions' | |
| arcpy.env.workspace = wrkspc | |
| con = 'GIS Servers/arcgis on localhost_6080 (admin).ags' | |
| for file in arcpy.ListFiles("*.mxd"): | |
| file = os.path.join(wrkspc, file) | |
| mapDoc = arcpy.mapping.MapDocument(file) |
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 time | |
| def log(message): | |
| print("%s | Python Shutdown | %s"%(time.asctime(),message)) | |
| with open(fme.logFileName,"a") as logfile: | |
| logfile.write("%s | Python Shutdown | %s\n"%(time.asctime(),message)) |
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
| arcpy.mapping.ListDataFrames(arcpy.mapping.MapDocument("CURRENT"))[0].extent.JSON |
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
| :: delete bad plugins from Google Chrome Browser | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\acbiaofoeebeinacmcknopaikmecdehl" /S /Q | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\alplpnakfeabeiebipdmaenpmbgknjce" /S /Q | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\bpconcjcammlapcogcnnelfmaeghhagj" /S /Q | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\deljjimclpnhngmikaiiodgggdniaooh" /S /Q | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\fbcgkphadgmbalmlklhbdagcicajenei" /S /Q | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\fedimamkpgiemhacbdhkkaihgofncola" /S /Q | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\gaoflciahikhligngeccdecgfjngejlh" /S /Q | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\gdocgbfmddcfnlnpmnghmjicjognhonm" /S /Q | |
| RMDIR "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\giaoehhefkmchjbbdnahgeppblbdejmj" /S /Q |
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
| # Define the set of extension names to uninstall | |
| $extensionNames = @( | |
| "equinusocio.vsc-material-theme", | |
| "equinusocio.moxer-theme", | |
| "equinusocio.vsc-material-theme-icons", | |
| "equinusocio.vsc-community-material-theme", | |
| "equinusocio.moxer-icons" | |
| ) | |
| # Loop through each extension name and uninstall it if installed |
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
| ####################################################################### | |
| # Dateien die gestern geändert wurden | |
| # | |
| # Mit dem Parameter $daysDelta = -1 festlegen, welcher Tag (von heute | |
| # gesehen) ausgegeben werden soll. | |
| # | |
| # zb. Gestern $daysDelta = -1 | |
| # Vorgestern $daysDelta = -2 | |
| # Heute $daysDelta = 0 | |
| ####################################################################### |
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
| # finde Text in einem Haufen Logdateien | |
| $suchstring = "java.lang.NullPointerException: null" | |
| $suchstring = "Während der Verarbeitung kam es zu einem unerwarteten Serverfehler" | |
| $suchstring = "Hier könnte ihr Suchstring stehen" | |
| cd $PSScriptRoot | |
| foreach ($f in Get-ChildItem -Filter "*.log") | |
| { |
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
| $configFiles=get-childitem -Include *.html,*.xml -Recurse -Path C:\data\myproject | |
| foreach ($file in $configFiles) | |
| { | |
| (Get-Content $file.PSPath) | | |
| Foreach-Object {$_ -replace "server.invalid.com", "new.example.org"} | | |
| Foreach-Object {$_ -replace "/OldFolder/", "/NewFolder/"} | | |
| Set-Content $file.PSPath | |
| Write-Output $file.PSPath | |
| } |