Skip to content

Instantly share code, notes, and snippets.

New Glasses. Who dis?

Alex Lovell-Troy alexlovelltroy

New Glasses. Who dis?
Block or report user

Report or block alexlovelltroy

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
alexlovelltroy / DaemonSet.yaml
Last active May 6, 2019
DaemonSet for controling the light rings on NUCs. Kubernetes running on debian stretch
View DaemonSet.yaml
apiVersion: apps/v1
kind: DaemonSet
name: nuc-light-control
name: nuc-light-control
View Dockerfile
from debian:stretch-slim as builder
RUN apt-get -y update
RUN apt-get -y install build-essential linux-headers-$(uname -r)
RUN apt-get -y install debhelper dkms kmod unzip
RUN curl -LO && unzip
RUN cd intel_nuc_led-master && make clean && make dkms-install
from alpine as base
RUN apk update --no-cache && apk add kmod --no-cache
alexlovelltroy /
Created Feb 21, 2019
Create, Load, and Start a bunch of simple firecracker vms
echo "Bash version ${BASH_VERSION}..."
echo -n "Jailer version "
echo -n "Firecracker version "
alexlovelltroy /
Created Sep 6, 2018
Given a son file, reformat it as one data element per line
#!/usr/bin/env python3
import json
import sys
if __name__ == "__main__":
program_name = sys.argv[0]
arguments = sys.argv[1:]
count = len(arguments)
alexlovelltroy /
Created Sep 6, 2018
Bash snippet I use to create a temporary GCP project for doing datalab stuff
set -e
PROJECT_SUFFIX=$(cat /dev/random | LC_CTYPE=C tr -dc "a-z0-9" | head -c 5)
# Update gcloud
alexlovelltroy /
Last active Aug 30, 2016
Python can reload the nginx config file faster than I can write a new one
#!/usr/bin/env python
import time
import psutil
import os
import signal
alexlovelltroy / pre-commit
Created Sep 24, 2015
A very simple pre-commit hook for continuous docker build
View pre-commit
# Add this locally to your repo as .git/hooks/pre-commit and make sure it is executable
# This does not actually get synced when you push to remote
docker build -t "hello_world" . && docker images hello_world && echo "Docker built properly"
# install cowsay and fortune
sudo apt-get install cowsay fortune
# install lolcat
sudo gem install lolcat
# be more wonderful
fortune |cowsay|lolcat
alexlovelltroy / custom.json
Created Apr 18, 2015
geoip and statsd example
View custom.json
"logstash": {
"version": "1.4.4",
"server": {
"enabled": true,
"inputs": [
"rabbitmq": {
"exchange": "logstash",
"user": "username",
"password": "password",
View test.rb
# use this file to run chef locally on an opsworks instance
# You'll need to put it in /opt/aws/opsworks/current <-- it should contain a bin/ subdir
# to use it, find reasonable paths for substitution and call your recipe like this:
# bin/chef-solo -o <cookbook>::<recipe> -c test.rb -j /var/lib/aws/opsworks/chef/<date>.json -l info
# The next line is the only thing you really need in this file. The rest is documentation
cookbook_path ["/opt/aws/opsworks/current/merged-cookbooks"]
You can’t perform that action at this time.