Skip to content

Instantly share code, notes, and snippets.

View burtlo's full-sized avatar

Lynn Frank burtlo

View GitHub Profile
@burtlo
burtlo / 00_README.md
Last active May 15, 2022 20:09
Remove SpellTable player and search bar from the window for cleaner recordings.

SpellTable Chromeless

When recording content over SpellTable the title bar with the player's name, commander, and life total are not wanting to be shown as that content is added in post-production.

  1. Open SpellTable link in spectate mode
  2. Right-click to open the context menu
  3. Select "Inspect"
  4. From the DevTools window, select the "Console" tab
  5. Copy and paste the JavaScript code
@burtlo
burtlo / doc_tester.rb
Last active February 8, 2018 19:49
A quick example InSpec docs tester!
require 'redcarpet'
require 'inspec'
require 'tempfile'
# TODO: eventually you would want to change the glob to all docs file
# doc_files = 'docs/resources/*.md.erb'
doc_files = 'docs/resources/file.md.erb'
class TestRenderer < Redcarpet::Render::Base
def block_code(code, language)
@burtlo
burtlo / learn-chef-rally.js
Last active November 7, 2017 22:53
Learn Chef Rally Presentation Mode. This script is designed to be used through TamperMonkey (https://tampermonkey.net/) a plugin for browsers.
// ==UserScript==
// @name Learn Chef Rally Presentation
// @namespace https://learn.chef.io/
// @version 0.1
// @description Present only the code windows
// @author Franklin Webber
// @match https://learn.chef.io/modules/*
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js
// ==/UserScript==
@burtlo
burtlo / habitat-version-manager.sh
Created October 20, 2017 16:40
Habitat Version Manager (hack)
#!/usr/bin/env bash
hab-get() {
local download_url="https://api.bintray.com/content/habitat/stable/darwin/x86_64/hab-%24latest-x86_64-darwin.zip?bt_package=hab-x86_64-darwin"
local tmpdir=$(mktemp -d)
pushd $tmpdir
echo "Moving to tmpdir $tmpdir"
echo "Downloading and extracting hab binary"
wget -qO- $download_url | tar xz --strip-components=1
@burtlo
burtlo / gist:89dc7d025d1ab484c2468740aadbe87e
Created October 18, 2017 15:56
A script to help run packages that are built within the Habitat Studio.
# run pkg_name HEAD
# run pkg_name HEAD~1
function run() {
local pkg_name=$1
local pkg_position=$2
local found_pkgs=( ./results/$HAB_ORIGIN-$pkg_name-*.hart )
local pkg_count=${#found_pkgs[@]}
declare -A indexed_pkgs
@burtlo
burtlo / .studiorc
Last active October 18, 2017 16:22
A script to help run packages that are built within the Habitat Studio.
# Usage
#
# run pkg_name # Run the latest
# run pkg_name HEAD # Run the latest
# run pkg_name HEAD~1 # Run the second to last
# run pkg_name ~1 # Run the second to last
#
function run() {
local pkg_name=$1
local pkg_position=$2
@burtlo
burtlo / census.json
Last active September 12, 2017 16:11
Web Application with a Load Balancer
{
"changed": true,
"census_groups": {
"haproxy.default": {
"service_group": "haproxy.default",
"election_status": "None",
"update_election_status": "None",
"leader_id": null,
"service_config": null,
"local_member_id": "67e892170b80482d98bb259389ce951d",
[ec2-user@ip-10-0-0-10 delivery-cluster-master]$ rake setup:cluster
-bash: rake: command not found
[ec2-user@ip-10-0-0-10 delivery-cluster-master]$ chef exec rake setup:cluster
Verifying ChefDK version
Running ChefDK version 0.10.0
Configuring the provisioner node
@burtlo
burtlo / Rakefile
Last active June 13, 2016 20:49
Using ERB
namespace :gsub do
desc 'populate a configuration'
task :populate do
content = File.read('config.yml')
content.gsub!('REPLACE_ME_KEY','REAL_KEY')
content.gsub!('REPLACE_ME_ID','REAL_ID')
puts content
end
@burtlo
burtlo / son_lint.rb
Created November 18, 2015 00:57
Find all the JSON files in the local directory and any subdirectories and attempt to parse them with a Ruby JSON parser. If any of them fail to load an error message will be displayed.
require 'json'
Dir["**/*.json"].each do |json_file|
JSON.parse(File.read(json_file))
end