Skip to content

Instantly share code, notes, and snippets.

View burtlo's full-sized avatar

Lynn Frank burtlo

View GitHub Profile
@burtlo
burtlo / superhero.rb
Created October 26, 2011 03:31
Superheroes In a Dish
Superhero = Struct.new :name, :origin, :nemesis, :nick_name
SUPERHEROES = [
Superhero.new("Batman", "Gotham City", "Joker", "Caped Crusader"),
Superhero.new("Robin", "Gotham City", "Joker", "Boy Wonder"),
Superhero.new("Superman", "Krypton", "Lex Luthor", "Kal El"),
Superhero.new("Supergirl", "Krypton", "Bizzaro", "Kara Zor-El") ]
def find_superheroes_with_nemesis(nemesis)
@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 / rails_features.md
Created February 17, 2013 06:39
Some common errors after finishing the Jumpstart Lab Blogger tutorial a number of times.

Rake Routes

Problem

Running rake routes with a new rails application displays no information.

Solution

@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
@burtlo
burtlo / proxy.rb
Created December 8, 2010 10:48
Allows
$ ruby proxy.rb
Proxy Object
Customer.create
Proxy Object
Customer.create
Proxy Object
Customer.create
@burtlo
burtlo / private.xml
Created September 26, 2012 13:30
TMUX: Rebinding CAPS LOCK to CTRL + B
<?xml version="1.0"?>
<root>
<appdef>
<appname>Terminal</appname>
<equal>com.apple.Terminal</equal>
</appdef>
<item>
<name>TMUX Key Remappings</name>
<item>
<name>TMUX: Right Control to Ctrl+B</name>
@burtlo
burtlo / README.md
Created July 29, 2011 18:52
Jenkins - JMeter Performance Test

Requirements

Jenkins Job

  • See the jenkins_job.sh defined below for the shell script that is executed.
@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