Skip to content

Instantly share code, notes, and snippets.

View nodomain's full-sized avatar

Fabian Fischer nodomain

View GitHub Profile
@LewisMcMahon
LewisMcMahon / gist:3d4612201159a4a42d43
Last active July 25, 2018 05:22
AWS Cloudwatch metric for postfix queue length
aws cloudwatch put-metric-data --metric-name "Mail Queue" --dimensions InstanceId=$(ec2metadata --instance-id) --namespace "EC2" --value $(echo $(($(mailq | grep -Po "(?<=in )([0-9]+)"| paste -sd+ | bc)+0)))

These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):

  1. Install Raspbian - http://www.raspberrypi.org/downloads

  2. Install the necessary dependecies:

sudo apt-get install git-core build-essential

(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)