This file contains 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
# generate a data dictionary from an ArcGIS feature class | |
# tested with ArcGIS Pro/Python3 | |
# Run from command prompt in ArcGIS Pro environment | |
# Takes 2 arguments: 1) path to feature class 2) path for output CSV file | |
# Example: python C:\arcpy_data_dictionary.py C:\yourgeodatabase.gdb\featureclassname C:\output.csv | |
import arcpy | |
import sys | |
import csv |
This file contains 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
#!python2 | |
# Example 1a adapted from https://www.reddit.com/r/gis/comments/4rhvhh/map_automation_arcpymapping_make_lyr/ | |
# | |
# Reference: 1) http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/layer-class.htm | |
# 2) https://docs.python.org/2/library/json.html | |
import arcpy | |
import json | |
lyr = # Layer object, typically from arcpy.mapping.ListLayers (arcpy._mapping.Layer) |
This file contains 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 | |
# Usage: | |
# ./git-move.sh path/to/file/or/dir path/to/destination/repo | |
echo "creating patch for path ${1}" | |
git log --name-only --pretty="format:" --follow "${1}" \ | |
| sort -u | \ | |
xargs git log --pretty=email --patch-with-stat --reverse --full-index --binary -m --first-parent -- > "${2}/_patch_" \ | |
&& echo "moving to destination repo at ${2}" \ | |
&& cd "${2}" \ | |
&& echo "applying patch" \ |
My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.
My solution is to make a general .gitignore
file and add .gitignore.branch_name
files for the branches I want to add specific file exclusion.
I'll use post-checkout hook to copy those .gitignore.branch_name in place
of .git/info/exclude
each time I go to the branch with git checkout branch_name
.
This file contains 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
:: --{ Remove-Win10-nag.bat }-- | |
:: http://superuser.com/questions/955444/i-cancelled-microsoft-10-reservation-and-uninstalled-kb3035583-but-window-10-is | |
:: must be run from elevated command prompt (Run As Administrator) | |
for %%a in (3035583 3022345 3068708 3075249 3080149 2990214 3012973 2952664 2976978) do ( | |
wusa /uninstall /kb:%%a /norestart /quiet | |
) | |
echo Windows Registry Editor Version 5.00 >> "%temp%\disable-win10-upgrade.txt" | |
echo. >> "%temp%\disable-win10-upgrade.txt" | |
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade] >> "%temp%\disable-win10-upgrade.txt" |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ContentApp"> | |
<Id>00000000-0000-0000-0000-000000000000</Id> | |
<Version>1.5.0.0</Version> | |
<ProviderName>e2d3.org</ProviderName> | |
<DefaultLocale>en-US</DefaultLocale> | |
<DisplayName DefaultValue="E2D3" /> | |
<Description DefaultValue="Dynamic, interactive, and more interesting graphing from your Excel!" /> | |
<IconUrl DefaultValue="http://e2d3.org/wp-content/uploads/2015/05/logo.png" /> | |
<SupportUrl DefaultValue="http://www.e2d3.org/" /> |
This file contains 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
<?xml version="1.0" encoding="UTF-16"?> | |
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Date>2015-10-27T04:32:20.2209506</Date> | |
<Author>localhost\Matt</Author> | |
<Description>Workaround for the capture service halting on suspend/hibernate and resume (https://github.com/codebox/bitmeteros/issues/30). Fires on Startup (30s delay), Logon and Workstation Unlock.</Description> | |
</RegistrationInfo> | |
<Triggers> | |
<SessionStateChangeTrigger> | |
<Enabled>true</Enabled> |
This file contains 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
from setuptools import setup | |
long_description = '''Simple usercustomize.py to keep separate site.USER_BASE/USER_SITE directories for 32 and 64bit | |
python installs on Windows. | |
Only required if you're installing extension modules (compiled pyd/dll) to the user site-packages directory, i.e.: | |
python setup.py install --user | |
pip install --user somepackage |
This file contains 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
# PS-BGInfo | |
# Powershell script that updates the background image with a random image from a folder and writes out system info text to it. | |
# run as a lower priority task | |
[System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal' | |
# Configuration: | |
# Font Family name | |
$font="Input" |