Skip to content

Instantly share code, notes, and snippets.

View davecoutts's full-sized avatar

Dave Coutts davecoutts

View GitHub Profile
@davecoutts
davecoutts / dell_getdriversbyproduct.py
Last active September 2, 2024 14:49
Python script for collecting and displaying Dell Laptop/PC driver release information
DESCRIPTION = \
'''
#--------------------------------------------------------------------------------------------------
Collect and display Dell Laptop/PC driver release information.
#--------------------------------------------------------------------------------------------------
'''
EPILOG = \
'''
#--------------------------------------------------------------------------------------------------
@davecoutts
davecoutts / jupyterlab_launcher.bat
Created August 31, 2020 17:21
Launch Anaconda installed JupyterLab in Windows. Specify the Browser and Working directory. Add JupyterLab Right-Click launch in Windows Explorer.
@echo off
rem ---------------------------------------------------------------------------
rem Launch Anaconda installed JupyterLab from Windows
rem ---------------------------------------------------------------------------
rem Author: Dave Coutts
rem License: Apache
rem Version: 1.0.0
rem Maintainer: https://github.com/davecoutts
@davecoutts
davecoutts / microsoft_doc_converter.py
Created May 3, 2020 15:45
Python script to convert Microsoft Word and Excel files from one file format to another
DESCRIPTION = \
'''
#--------------------------------------------------------------------------------------------------
Convert Microsoft Word and Excel files from one file format to another.
#--------------------------------------------------------------------------------------------------
'''
EPILOG = \
'''
#--------------------------------------------------------------------------------------------------
@davecoutts
davecoutts / unifi_ubuntu_2004.sh
Last active October 22, 2024 16:08
Install Ubiquiti Unifi Controller on Ubuntu 20.04
# Install Ubiquiti Unifi Controller on Ubuntu 20.04.
# As tested on a fresh install of ubuntu-20.04.1-live-server, August 22nd 2020.
# Thanks to https://gist.github.com/tmuncks for posting the updated install steps.
sudo apt update
sudo apt install --yes apt-transport-https
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
@davecoutts
davecoutts / fahclientinfo.py
Created April 19, 2020 21:19
Python Folding@home FAHClient info data extractor. Useful for Folding job progress data collection into influxdb via the telegraf inputs.exec collector.
DESCRIPTION = \
'''
#--------------------------------------------------------------------------------------------------
Python Folding@home FAHClient info data extractor.
#--------------------------------------------------------------------------------------------------
'''
EPILOG = \
'''
#--------------------------------------------------------------------------------------------------
@davecoutts
davecoutts / anaconda_offline_package_bundler.py
Last active September 13, 2021 12:13
Create offline package install bundles for Continuum Analytics Anaconda
DESCRIPTION = \
"This script builds a tar'd bundle of Anaconda packages and their dependencies suitable for installing on an offline server."
EPILOG = \
'''
The basic work flow is as follows,
- The user manually runs a conda 'dry-run' install command on an online server to generate a json file containing the required packages and their dependency packages.
- The script loads the 'dry-run' json file(s) and performs the following actions,
- Create a 'channel' directory per online channel, as discovered from the json file(s).
- Download the packages and their dependency packages into the channel directory.
@davecoutts
davecoutts / make_netatalk-3.1.11_deb.sh
Created May 6, 2018 21:51
Install Netatalk 3.1.11 on Ubuntu 18.04 Bionic
# This gist gives instructions to build a basic deb package of netatalk-3.1.11 using checkinstall on Ubuntu 18.04.
# With the idea being that you build the deb on your build server and install from the resulting deb in production.
# Given that the deb is packaged using checkinstall with basic options, think home use, not real production.
# Note that this build does not provide the spotlight feature.
# The tracker packages have been left out as the intent was to provide TimeMachine functionality only.
#------------------------------------------------------------
# STEP ONE - Make the Netatalk deb on a build machine
@davecoutts
davecoutts / cx_oracle-5.2.1-py35_0_build.sh
Last active April 2, 2018 12:47
Build Python 3.5 conda package for cx_oracle 5.2.1 on Linux
# Build Python 3.5 conda package for cx_oracle 5.2.1 on Linux
# Currently(2016-07-09) only cx_oracle-5.1.2-py27 is avalible in the conda repository.
#
# Based on http://conda.pydata.org/docs/build_tutorials/pkgs.html
#
# Build environment: Ubuntu 16.04 with Anaconda3-4.1.1-Linux-x86_64 installed in $HOME/anaconda3
#
# Download from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
# - instantclient-basic-linux.x64-12.1.0.2.0.zip
# - instantclient-sdk-linux.x64-12.1.0.2.0.zip
@davecoutts
davecoutts / word_doc_to_docx.py
Last active March 28, 2023 05:01
Convert Word 'doc' files to 'docx' format using win32com to automate Microsoft Word
# Convert Microsoft Word 'doc' files to 'docx' format by opening and
# saving Word files using win32com to automate Microsoft Word.
#
# The script walks a directory structure and converts all '.doc' files found.
# Original 'doc' and new 'docx' files are saved in the same directory.
#
# This Word automation method has been found to work where OFC.exe and
# wordconv.exe do not.
#
# Tested using Windows 7, Word 2013, python 2.7.10, pywin32-219.win-amd64-py2.7
@davecoutts
davecoutts / gist:b33a4d9447e470c0af46
Last active June 29, 2018 03:27
Install Greenplum 4.3.2.0 on Centos 6.5 and run in two segment single node mode
su - root
# gpinitsystem fails to change the postgresql.conf port setting without ed
yum install ed unzip -y
groupadd -g 8000 gpadmin
useradd -m -s /bin/bash -d /home/gpadmin -g gpadmin -u 8000 gpadmin
passwd gpadmin
mkdir -p /data/master