Skip to content

Instantly share code, notes, and snippets.

@simonmcconnell
simonmcconnell / citect_updateallpages.py
Created July 9, 2018 00:30
Update pages for project and all includes
# it was discovered that Citect was not updating all the projects when running "Update project and all included projects"
import win32api
import time
import win32com.client as wc
from pywintypes import com_error
RUN_PROJECT = 'MNM_RUN'.upper()
SYSTEM_PROJECTS = {x.upper() for x in {
@simonmcconnell
simonmcconnell / citect_graphicsbuilder.py
Last active July 9, 2018 00:24
Citect Graphics Builder Automation with Python
# Citect Graphics Builder Automation with Python
#
# the object name was discovered from the file created by running PythonWin > Tools > COM Makepy utility.
#
# pip install -U pywin32
import win32com.client
# this seems to attach itself to an already running process also
try:
@simonmcconnell
simonmcconnell / getAllVersions.vb
Last active October 1, 2018 11:54
Maintain version history when upgrading from VSS to SVN version control in Proficy Change Management
'*********************************************************************************
' Product Module : Scheduler Scripts
' Script Name : getAllVersions.vb
' Function : Backup each version of a Machine Edition project and its history
' file. Designed to be used in conjunction with proficy_import.py
' script when migrating from VSS to SVN.
' retreives <projectname>_<version>.zip and <projectname>_history.xml
' for all projects selected in a manually triggered Scheduler Event.
'
' Change BackupFolder to the location of the project backup files.
@simonmcconnell
simonmcconnell / setup.yml
Created January 8, 2018 12:26
centos ansible playbook for python3.6 development
# centos version of: https://blog.jetbrains.com/pycharm/2017/12/developing-in-a-vm-with-vagrant-and-ansible/
---
- hosts: all
become: yes
vars:
venv_path: "/home/vagrant/venv"
requirements_path: "/vagrant/requirements.txt"
tasks:
- name: Install IUM repository
yum: name=https://centos7.iuscommunity.org/ius-release.rpm state=installed
# references
# https://wiki.manjaro.org/index.php?title=Configure_NVIDIA_(non-free)_settings_and_load_them_on_Startup
# https://wiki.manjaro.org/index.php?title=Configure_Graphics_Cards
# https://wiki.archlinux.org/index.php/Bumblebee
# installed configs
mhwd -li
# auto identify and install
sudo mhwd -a pci nonfree 0300
#Django command shortcuts
alias dj='python manage.py'
alias djr='dj runserver'
alias djdb='dj dbshell'
alias djs='dj shell'
alias djt='dj test'
alias djm='dj migrate'
alias djsm='dj migrate_schemas'
alias djsms='dj migrate_schemas --shared'