Skip to content

Instantly share code, notes, and snippets.

View jedschneider's full-sized avatar

Jed Schneider jedschneider

View GitHub Profile
@havenwood
havenwood / build.rb
Created May 29, 2024 19:29 — forked from jedschneider/build.rb
build script for terraform deploys
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'optparse'
require 'fileutils'
require 'open3'
module TerraformExecutor
Config = Struct.new(:parallelism, :init, :vault, :tag, keyword_init: true)
@havenwood
havenwood / inline_runner.rb
Created September 28, 2022 20:32
A little script to run RuboCop on a Ruby String from within Ruby
require 'rubocop'
require 'tempfile'
class InlineRunner
DEFAULT = RuboCop::Runner.new({}, RuboCop::ConfigStore.new)
def initialize(runner: DEFAULT, filename: 'runner.rb')
@runner = runner
@file = Tempfile.new(filename)
end
@rynbyjn
rynbyjn / email_validator
Created April 24, 2014 23:27
Simple regex email validator
/(.+)@(.+)\.([a-z]{2,})/