Skip to content

Instantly share code, notes, and snippets.

View megahall's full-sized avatar

Matthew Hall megahall

  • MV Security, LLC
  • San Jose, CA
View GitHub Profile
@megahall
megahall / watermark.bash
Created October 23, 2024 19:01
Watermark Your PDF With A Specific String In Linux
#!/bin/bash
watermark="${1}"
shift
wm_pdf="$(mktemp -t watermark_XXXXXX.pdf)"
convert -background none -fill "rgba(128, 128, 128, 0.7)" -gravity center -font Arial -pointsize 96 "label:${watermark}" -bordercolor none -border 10x10 "${wm_pdf}"
for input in "$@"; do
@megahall
megahall / # postgresql - 2016-11-22_17-02-15.txt
Created February 21, 2017 08:44
postgresql on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for postgresql on macOS 10.11.6
Build date: 2016-11-22 17:02:15
@megahall
megahall / .pythonrc
Last active November 11, 2015 23:24
# export PYTHONSTARTUP=~/.pythonrc
import atexit
import base64
import binascii
import json
import os
import re
import socket
import string
@megahall
megahall / ovftool-esxi-deploy.bash
Created October 21, 2015 01:52
deploys OVA files onto ESXi with high performance
#!/bin/bash
set -e -x
images=$(ls some_directories/*.ova)
suffix="test_A"
for image in ${images}; do
image_name=$(basename "${image}" ".ova")
count=1
@megahall
megahall / app.config.riak
Created September 30, 2015 23:23
Riak Configuration
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et
[
%% Riak Client APIs config
{riak_api, [
%% pb_backlog is the maximum length to which the queue of pending
%% connections may grow. If set, it must be an integer >= 0.
%% By default the value is 5. If you anticipate a huge number of
%% connections being initialised *simultaneously*, set this number
%% higher.