Skip to content

Instantly share code, notes, and snippets.

View stjohnjohnson's full-sized avatar

St. John Johnson stjohnjohnson

View GitHub Profile

Keybase proof

I hereby claim:

  • I am stjohnjohnson on github.
  • I am stjohnjohnson (https://keybase.io/stjohnjohnson) on keybase.
  • I have a public key whose fingerprint is BFAF F4DB DD92 967A DB02 EA0B 4783 E8EF 5AA5 A659

To claim this, I am signing this object:

@stjohnjohnson
stjohnjohnson / Gemfile
Last active September 1, 2015 06:50
2015-08-30 Blog post on stj.me
source 'https://rubygems.org'
ruby '2.2.3'
# JavaScript Exec tool
gem 'therubyracer'
# Jekyll and plugins
gem 'jekyll'
gem 'jekyll-timeago'
gem 'jekyll-gist'
@stjohnjohnson
stjohnjohnson / Gemfile
Last active September 1, 2015 06:51
2015-09-01 Blog post on stj.me Raw
source 'https://rubygems.org'
ruby '2.2.3'
# JavaScript Exec tool
gem 'therubyracer'
# Jekyll and plugins
gem 'jekyll'
gem 'jekyll-timeago'
gem 'jekyll-gist'
@stjohnjohnson
stjohnjohnson / apt-get
Last active October 28, 2015 21:36
2015-10-28 Blog post on stj.me
sudo apt-get install gstreamer1.0-alsa gstreamer1.0-clutter gstreamer1.0-doc gstreamer1.0-fluendo-mp3 \
gstreamer1.0-gnonlin gstreamer1.0-libav gstreamer1.0-nice gstreamer1.0-omx \
gstreamer1.0-packagekit gstreamer1.0-plugins-bad gstreamer1.0-plugins-base-apps \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-vaapi gstreamer1.0-x \
libgstreamer1.0-0 libgstreamer1.0-0-dbg libgstreamer1.0-dev
<!--
Copyright 2013, Opscode, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
input_binary:
scene_thing:
name: Night Mode
initial: off
icon: mdi:car
automation:
- alias: Go to night mode
trigger:
platform: state
- platform: mqtt
name: "Office Lights"
state_topic: "smartthings/Office Lights/switch"
command_topic: "smartthings/Office Lights/switch"
brightness_state_topic: "smartthings/Office Lights/level"
brightness_command_topic: "smartthings/Office Lights/level"
brightness_scale: 99
payload_on: "on"
payload_off: "off"
apiVersion: batch/v1
kind: Job
metadata:
generateName: sd-
spec:
completions: 1
template:
spec:
restartPolicy: Never
containers:
@stjohnjohnson
stjohnjohnson / Dockerfile
Created October 15, 2016 16:21
Screwdriver API Dockerfile
FROM node:6
# Create our application directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install Screwdriver API
COPY package.json /usr/src/app/
RUN npm install --production
#!/usr/bin/env python
# coding=utf-8
import socket
from string import Template
from subprocess import check_output, call, STDOUT, PIPE
dockerTemplate = '''
version: '2'
services:
api: