Skip to content

Instantly share code, notes, and snippets.

View gordyt's full-sized avatar

Gordon Tillman gordyt

  • Rebellion Defense
  • Houston, Texas
View GitHub Profile
#!/usr/bin/env bash
# Prerequisites (all can be brew installed):
# pdf2image tesseract
usage() {
cat << EOF
usage: $0 file1 ...
Extract text from each (pdf) file and save it to a file with the same
name as the source file but with a .txt extension
#!/usr/bin/env bash
# Prerequisites (all can be brew installed):
# pdf2image qpdf tesseract
replace=false
usage() {
cat << EOF
usage: $0 [-r] file1 ...

Keybase proof

I hereby claim:

  • I am gordyt on github.
  • I am gordyt (https://keybase.io/gordyt) on keybase.
  • I have a public key ASDc0DqPx3A1N1Uc1wJK4ftuG9DQYja_itghTjOEJZDwyQo

To claim this, I am signing this object:

@gordyt
gordyt / get_service_ip
Created April 24, 2020 19:39
tiny script to get the k8s ip address of the specified service
#!/bin/bash
name=$1
namespace=${2:-default}
kubectl -n $namespace get services | grep $name | awk '{print $3}'
@gordyt
gordyt / oracle-ctl
Created March 26, 2020 01:53
Script that allows developers to control their development machine in oracle
#!/bin/bash
# Convenience Wrapper arounds the oracle CLI commands needed
# to query/stop/start your development machine in oracle
#
# 1. You must have the OCI CLI tools installed and configured.
# 2. Create $HOME/.oracle-ctl file and add the following:
#
# PROFILE_NAME=<your-desired-profile-name>
# INSTANCE_ID=<the-ocid-of-your-instance>
@gordyt
gordyt / test-soap-affinity.sh
Created March 20, 2020 23:23
test-soap-affinity, version 2
#!/bin/bash
# ************************************************************************
# Script requirements:
# - xmlstarlet
# - jsonpp
# Deployment requirements
# - You must have DEBUG logging enabled for the zmc-mls service
# ************************************************************************
VERSION=2
@gordyt
gordyt / 2020-03-20_sanity-tests_develop_one_mbox_pod.txt
Created March 20, 2020 17:32
2020-03-20_sanity-tests_develop_one_mbox_pod.txt
Buildfile: /opt/soap/zm-soap-harness/build.xml
[echo] Using version from /opt/soap/zimbra-package-stub/version, 8.8.0_BETA1_${zimbra.buildinfo.buildnum}.root
build-init:
download-ivy:
init-ivy:
resolve:
@gordyt
gordyt / check-users-affinity
Created January 30, 2020 21:50
An easy way to check mailbox affinity assignment for users in Zimbra-X
#!/bin/bash
prefix="test"
domain="zmc.com"
ilen=1
mls=$(kubectl get services | grep zmc-mls | awk '{print $3}')
declare -A mboxes
for pinfo in $(kubectl get pods -o wide | grep zmc-mailbox | awk '{printf("%s:%s\n", $6, $1)}'); do
IFS=: read ip host <<< $pinfo
mboxes["$ip"]="$host"
@gordyt
gordyt / create-users
Created January 30, 2020 21:49
Easy way to provision a lot of users in Zimbra-X. Run with -h option for help.
#!/bin/bash
prefix="test"
domain="zmc.com"
ilen=1
pw=test123
function usage {
echo "usage: $0 -p <prefix> -d <domain> -w <password> [-z] <num-users>"
echo "defaults:"
echo "- prefix=$prefix"
@gordyt
gordyt / zm-docker_git_log.txt
Last active October 25, 2019 17:17
zm-docker commits between 1.4.355 and 1.5
* fd64986 [Gordon Tillman] (tag: prod-1.5.0, tag: 1.5.0, tag: 1.4.402, tag: 1.4.401) fix lmtp build
* 151bf1c [Travis McLane] Merge branch 'feature/ZCS-7558' into develop
|\
| * e950302 [Travis McLane] (feature/ZCS-7558) ZCS-7558 return nil if file won't open
| * 39f426e [Travis McLane] ZCS-7558 use temp file for large emails
| * 1e3cdff [Travis McLane] ZCS-7664 precompile regexes
| * 8078236 [Travis McLane] ZCS-7664 handle leading whitespace in RCPT TO
| * 64faa82 [Travis McLane] ZCS-7664 fix multiple accounts with same affinity (bug)
| * 10f2d8c [Travis McLane] ZCS-7664 allow '.' and '+' in email FROM
|/