Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block drmikecrowe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
drmikecrowe /
Last active Jan 15, 2019
Bash Template
#!/usr/bin/env bash
function mainScript() {
debug "Arguments: $args"
# Options and Usage
# -----------------------------------
function usage() {
drmikecrowe / embed.js
Last active Jan 1, 2019
Embedding in your website
View embed.js
(function() {
var cx = '011275290256739755566:cwfn9qhuqkk';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = '' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
set -e
set -x
sudo apt-get update
sudo apt install git python2.7 build-essential python-virtualenv python-pip python-dev libcurl4-gnutls-dev libgnutls28-dev mysql-client awscli phantomjs
# Environment variables you need to set so you don't have to edit the script below.
export DOCKER_CHANNEL=stable
# Update the apt package index.
drmikecrowe /
Last active Aug 14, 2019
Bash Bootstrap
#!/usr/bin/env bash
function install {
wget $URL -O $FILE
sudo gdebi $FILE
rm $FILE
View make.log
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v1.2b1
loading pickled environment... done
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 4 changed, 0 removed
reading sources... [ 25%] leo.core
reading sources... [ 50%] leo.external
reading sources... [ 75%] leo.external.concurrent.futures
reading sources... [100%] leo.plugins
Can not import path from plugin leo.plugins.at_view
drmikecrowe /
Created Jan 24, 2018
Linux Mint 18.3 Cinnamon desktop debug info

$ cat /etc/lsb-release

DISTRIB_DESCRIPTION="Linux Mint 18.3 Sylvia"

$ ps faux | grep cinnamon

mcrowe    1811  0.0  0.0 438712 22488 ?        Ssl  05:55   0:01      \_ cinnamon-session --session cinnamon
drmikecrowe /
Created Oct 13, 2017
Search for the latest releases for a given search string. Assumes that vendors release in bulk, so it looks for over 2 images released in a day and shows those matches
if [ $# -ne 1 ];then
echo "Usage:"
echo " $0 keyword"
exit 1
drmikecrowe /
Last active Oct 13, 2017 — forked from antimius/
Script to find and print the latest stable, Ubuntu version
# prints latest, stable, HVM, EBS GP2 backed AMIs for major OSs
REGIONS="us-east-1 us-east-2 us-west-1 us-west-2"
for REGION in $REGIONS; do
echo -n "$REGION: "
aws ec2 describe-images --region=$REGION --owners $UBUNTU --filters 'Name=name,Values=*hvm-ssd*16.04*' --query 'Images[*].[ImageId,CreationDate,Name]' --output text | sort -k2 -r | head -n 1
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
drmikecrowe / Dockerfile
Created Jan 14, 2017
Working PHP Docker Compose System with PhantimJS testing
View Dockerfile
# Build using docker build -t php-drmikecrowe
FROM php:5.6-apache
MAINTAINER Emilien Kenler <>
RUN apt-get update && apt-get install -y git libpq-dev libmcrypt-dev zlib1g-dev libicu-dev g++ graphviz && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install pdo_pgsql pdo_mysql mbstring mcrypt zip sockets intl bcmath mysqli
RUN curl -o /usr/local/bin/composer && \
You can’t perform that action at this time.