Skip to content

Instantly share code, notes, and snippets.

@lancehudson
lancehudson / docker info
Last active February 18, 2016 03:01
docker compose 2.0 options and extends not working
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 1.10.1
Storage Driver: overlay
Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: json-file
@lancehudson
lancehudson / phantomjs_monitor.sh
Last active April 8, 2016 20:55
Kill stalled phantomjs processes
#!/bin/bash
# This script is created to handle buggy prerender where phantomjs hangs
PROCESS=phantomjs
LOGSERVER=local-hightailspaces.com
LOGSERVERPORT=6379
KEY=logstash
KEYTYPE=RPUSH
TYPE=phantomjs-monitor
KILL=false
@lancehudson
lancehudson / ffmpeg_monitor.sh
Created April 8, 2016 20:20
This script is created to handle stalled ffmpeg processes
#!/bin/bash
# This script is created to handle stalled ffmpeg processes
PROCESS=ffmpeg
USER=hightail
TIME=+5
#LOGSERVER=local-hightailspaces.com
LOGSERVERPORT=6379
KEY=logstash
KEYTYPE=RPUSH
@lancehudson
lancehudson / send.js
Created June 17, 2016 17:53
Starts a timer on the LAB's Alpha LED sign
var net = require('net');
var moment = require('moment');
var leftpad = require('leftpad');
var start = function() {
var client = net.connect({ host: '192.168.11.193', port: 10001 }, function() {
console.log('Server: connected');
client.on('data', function(data) {
console.log('----- NEW -----');
@lancehudson
lancehudson / sketch.ino
Created October 9, 2016 02:49
Steam Car Pump Controller
const int RelayPin = 4;
const int WaterSensorPin = A0;
const int SensorWet = 100;
const int MinimumRunTime = 2000;
const int MinimumWaitTime = 2000;
const bool RelayOn = LOW;
const bool RelayOff = HIGH;
bool relayState = false;
@lancehudson
lancehudson / crontab
Last active November 5, 2017 22:21
AWS Custom Metrics
*/5 * * * * /usr/local/bin/putMetrics.sh
@lancehudson
lancehudson / debug.log
Created May 10, 2018 21:31
Terraform Debug
$ TF_LOG=debug terraform apply
2018/05/10 17:27:28 [INFO] Terraform version: 0.11.7
2018/05/10 17:27:28 [INFO] Go runtime version: go1.10.1
2018/05/10 17:27:28 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.7/bin/terraform", "apply"}
2018/05/10 17:27:28 [DEBUG] Attempting to open CLI config file: /Users/XXX/.terraformrc
2018/05/10 17:27:28 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/05/10 17:27:28 [INFO] CLI command args: []string{"apply"}
2018/05/10 17:27:28 [INFO] command: empty terraform config, returning nil
2018/05/10 17:27:28 [DEBUG] command: no data state file found for backend config
2018/05/10 17:27:28 [DEBUG] New state was assigned lineage "8a3c07bb-2eda-9897-1d7c-cc6cd3073dfe"
@lancehudson
lancehudson / crash.log
Created May 10, 2018 21:33
Terraform crash
2018/05/10 17:27:28 [INFO] Terraform version: 0.11.7
2018/05/10 17:27:28 [INFO] Go runtime version: go1.10.1
2018/05/10 17:27:28 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.7/bin/terraform", "apply"}
2018/05/10 17:27:28 [DEBUG] Attempting to open CLI config file: /Users/XXX/.terraformrc
2018/05/10 17:27:28 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/05/10 17:27:28 [INFO] CLI command args: []string{"apply"}
2018/05/10 17:27:28 [INFO] command: empty terraform config, returning nil
2018/05/10 17:27:28 [DEBUG] command: no data state file found for backend config
2018/05/10 17:27:28 [DEBUG] New state was assigned lineage "8a3c07bb-2eda-9897-1d7c-cc6cd3073dfe"
2018/05/10 17:27:28 [INFO] command: backend initialized: <nil>
@lancehudson
lancehudson / crash.log
Created May 10, 2018 21:33
Terraform crash
2018/05/10 17:27:28 [INFO] Terraform version: 0.11.7
2018/05/10 17:27:28 [INFO] Go runtime version: go1.10.1
2018/05/10 17:27:28 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.7/bin/terraform", "apply"}
2018/05/10 17:27:28 [DEBUG] Attempting to open CLI config file: /Users/XXX/.terraformrc
2018/05/10 17:27:28 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/05/10 17:27:28 [INFO] CLI command args: []string{"apply"}
2018/05/10 17:27:28 [INFO] command: empty terraform config, returning nil
2018/05/10 17:27:28 [DEBUG] command: no data state file found for backend config
2018/05/10 17:27:28 [DEBUG] New state was assigned lineage "8a3c07bb-2eda-9897-1d7c-cc6cd3073dfe"
2018/05/10 17:27:28 [INFO] command: backend initialized: <nil>
@lancehudson
lancehudson / run.sh
Created February 11, 2019 18:04
aws unsubscribe
#!/bin/bash
# xargs -n 1 ./run.sh <list.txt
EMAIL=$1
if [ -z "$EMAIL" ]
then
echo "No email address supplied"
exit 1