Skip to content

Instantly share code, notes, and snippets.

View amchelmer's full-sized avatar

Alexander Helmer amchelmer

View GitHub Profile
# Install GCC compiler
# Download, install and open xcode
xcode-select --install
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Source profile
source ~/.profile
#!/bin/sh -e
# /etc/rc.local
### BEGIN INIT INFO
# Provides: vmbootstrap
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: vmbootstrap
# TITLE
echo "DIGITAL OCEAN BOOTSTRAP"
# ENV VARS CHECK
if [ -z "$1" ] ; then
echo "DOMAIN arg1 is not set" >&2
exit 1
fi
if [ -z "$2" ] ; then
echo "INFRAMAIL arg2 is not set" >&2
@amchelmer
amchelmer / headtail.sh
Created July 15, 2020 08:23
head/tail equivalent for parquet files
function phead {
python3 -c "import pandas as pd; pd.set_option('display.max_columns', 30); pd.options.display.width = 300; print(pd.read_parquet('$1').head($2))"
}
function ptail {
python3 -c "import pandas as pd; pd.set_option('display.max_columns', 30); pd.options.display.width = 300; print(pd.read_parquet('$1').tail($2))"
}