Skip to content

Instantly share code, notes, and snippets.

View djch's full-sized avatar

Dan Charlesworth djch

  • Getbusi
View GitHub Profile
# Setting up pipenv for MacOS
1. Install homebrew.
2. `brew install python3`
3. `pip3 install pipenv`
4. Change to your project directory
5. `pipenv --three`
6. `pipenv install`
@djch
djch / tceo-gsuite-support-duties.md
Created April 19, 2017 05:55
Baseline G Suite support duties

Generally speaking, the administrative procedures are more streamlined for G suite than for Zimbra so we can expect less admin busy work but more direct support for TCEO staff.

  • Account provisioning is now automated through the TCEO staging database. Although we no longer need to provision accounts directly like in Zimbra, there will be occasional coordination with TCEO staff required to provision a new account such as letting them know when a new account is ready or creating a generic account.
  • Password resets, another common support activity for Zimbra, can now be self-supported by TCEO staff. Therefore there will be less doing it for them, but more showing them how. In rare cases we will have to reset passwords if a user forgets their security questions.
  • Google Groups creation is to be managed Getbusi in order to keep the usage and naming consistent. However the members of the groups can be managed directly by the school, so less day-to-day work will be required to maintain them.
  • **G Su
@djch
djch / replace-haskey.md
Last active July 8, 2016 01:49
Find and replace lines for python's deprecated dict.has_key(k)
@djch
djch / looper.sh
Created May 31, 2016 07:06
Rsync 3 script for migrating one Time Machine drive to another
#!/usr/bin/env bash
# Inspired by: http://nicolasgallagher.com/mac-osx-bootable-backup-drive-with-rsync/
# --acls update the destination ACLs to be the same as the source ACLs
# --archive turn on archive mode (recursive copy + retain attributes)
# --delete delete any files that have been deleted locally
# --delete-excluded delete any files (on DST) that are part of the list of excluded files
# --exclude-from reference a list of files to exclude
# --hard-links preserve hard-links
#!/bin/bash
# Let's get some color going!
red=$'\e[1;31m'
grn=$'\e[1;32m'
end=$'\e[0m'
# cd to cwd of the script (presumably in it's proper location)
cd "$(dirname "$0")"
printf "\nInstalling Sketch templates..."
@djch
djch / python-modulename.spec
Last active August 29, 2015 14:10
Spec file template for python packages
Name: python-modulename
Version: 0.0.0
Release: 1%{?dist}
License: BSD # Will vary between each package
Summary: Short summary from the project URL
Url: https://github.com/user/reponame
Group: Development/Libraries/Python
Source: modulename-%{version}.tar.gz # Must match your downloaded archive
BuildRequires: python-devel, python-distribute
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@djch
djch / Objective-C.gitignore
Last active August 29, 2015 14:09
A .gitignore spec for Getbusi's Objective-C projects
# Numerous always-ignore extensions
*.diff
*.err
*.log
*.orig
*.rej
*.swo
*.swp
*.vi
*.zip
@djch
djch / logmon.sh
Last active November 1, 2017 03:00
Monitor a log for a thing which triggers another thing
#!/bin/sh
#
# You can start the script on boot, in the background, by adding it to /etc/rc.local:
# echo -e "/path/to/logmon.sh &\n" >> /etc/rc.local
#
tail -Fn0 /path/to/that/logfile.log | \
while read line ; do
echo "$line" | grep "thing"
if [ $? = 0 ]