I hereby claim:
- I am rotated8 on github.
- I am rotated8 (https://keybase.io/rotated8) on keybase.
- I have a public key ASDpj-G-2NBq9PodXpuW687eplx8AUXEzle110v33PN3Ogo
To claim this, I am signing this object:
gmail_username = 'username@gmail.com' | |
recipients = 'recipient@example.com' | |
# https://en.wikipedia.org/wiki/List_of_SMS_gateways | |
# 10DigitNumber@text.att.net for AT&T | |
# 10DigitNumber@vtext.com for Verizon | |
from email.mime.text import MIMEText | |
msg = MIMEText('This is the body of the message.') | |
msg['Subject'] = 'Blank subject lines look like spam.' | |
msg['From'] = gmail_username |
" Bad whitespace shows up in red. | |
highlight BadWhitespace ctermbg=1 guibg=Red | |
" This function will clear bad whitespace highlighting in help files. | |
" It is needed because Filetype events fire after BufEnter ones. See below. | |
function! IgnoreHelpFiles() | |
if &filetype ==? 'help' | |
call clearmatches() | |
endif | |
endfunction | |
" Match whenever we enter a buffer. (These happen in order) |
I hereby claim:
To claim this, I am signing this object:
import cx_Oracle as oracle | |
import argparse, csv, json, os, os.path | |
QUERY = 'SELECT * FROM ESDV.V_ETD_EMPE' | |
ROW_KEY = 'ETD Record Key' | |
def from_database(credentials): | |
data = {} | |
with oracle.connect(credentials) as conn: | |
cursor = conn.cursor() |
# Which version of Solr to download. 6.6.2 is known good with Hyrax. | |
version: 6.6.2 | |
# Download from Princeton, because their mirror is more stable than Apache's, and we have permission. | |
mirror_url: 'http://lib-solr-mirror.princeton.edu/dist/' | |
checksum: 'http://lib-solr-mirror.princeton.edu/dist/lucene/solr/6.6.2/solr-6.6.2.zip.sha1' | |
ignore_checksum: 'true' | |
# Where to download things. | |
download_dir: '/var/tmp' | |
# Where to put Solr. NOTE: This is relative to where you run solr_wrapper! | |
instance_dir: 'solr-dev' |
# If AWS credentials have been updated in the last 12 hours, TKI is probably ok. | |
CHECK_TKI=false # Change to 'true' to enable the check. | |
function warn_tki { | |
if [[ -e "$HOME/.aws/credentials" && $CHECK_TKI == 'true' ]]; then | |
date_format="%Y%m%d%H%M%S" # Reduces time to a comparable number, not epoch dependant. | |
mod_time=$(date --reference="$HOME/.aws/credentials") # Time AWS creds were modified. | |
expire_time=$(date --date="$mod_time + 43200 seconds" +"$date_format") # Add 12 hours. | |
if [[ "$expire_time" -ge "$(date +$date_format)" ]]; then | |
echo -e '\033[0;32mTKI:✓ ' # Green |
<< //// | |
This function will ssh into a EC2 based on Name tags. You can ssh in via public or private IP This function requires awscli to work | |
There are several optional environment variables: | |
AWS_PROFILE = Control which profile is active with this variable, if this is unset the function will use AWS_DEFAULT_PROFILE instead | |
SSH_EC2_KEY_FILE = path to the key file for the user | |
SSH_EC2_USER = name of the user that logs in, if this variable is unset the value is ec2-user | |
To use this function do the following commands | |
(from command line) |
# Drupal with PostgreSQL | |
# Adapted from https://hub.docker.com/_/drupal/ | |
# | |
# Access via "http://localhost:8080" | |
# (or "http://$(docker-machine ip):8080" if using docker-machine) | |
# | |
# Database type: PostgreSQL | |
# Database name: postgres | |
# Database username: postgres | |
# Database password: example |
#!/usr/bin/env bash | |
# Set repo_dir to folder this script lives in. | |
repo_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) | |
if [[ $# -eq 1 && -n "$1" && -d "$1" ]]; then | |
# Script was called with an argument that is a path to a directory. | |
repo_dir="$1" | |
fi | |
# Get tags for HEAD. |