Skip to content

Instantly share code, notes, and snippets.

View arubis's full-sized avatar

Dylan Fitzgerald arubis

View GitHub Profile
@arubis
arubis / _etc_salt_cloud.profiles
Last active November 13, 2023 20:22
Salt doesn't see individual values in 'roles' grain
base_ec2_private:
provider: my-ec2-us-east-private-ips
image: ami-018c9568
size: Micro Instance
ssh_username: ubuntu
base_ec2_public:
provider: my-ec2-us-east-public-ips
image: ami-018c9568
size: Micro Instance
@arubis
arubis / script.md
Last active February 4, 2022 20:35
SFBT script

Them knowing the answers to their questions is helpful

For new visits/clients:
Beginning
How do you want things to be when this gets better? (What do you want?)

For follow-up visits:
So what’s better?
How did you manage?
How did you keep things from getting worse?

@arubis
arubis / brew-list.txt
Created November 17, 2017 22:30
Installed Homebrew packages
adns
ant
apr
apr-util
argtable
asciinema
autoconf
automake
autossh
awscli
@arubis
arubis / factorybot_trait_exploration.rb
Created March 25, 2020 19:58
Asking for a friend!
FactoryBot.define do
factory :car_communication_rule do
rule_id { SecureRandom.uuid }
end
trait :tire_pressure do
transient do
tp_code { "FR" }
tp_name { "Front right" }
end
for vol_id in $(aws ec2 describe-volumes --filters="Name=status,Values=['available']" | jq '.Volumes[12].VolumeId' | sed 's/\"//g');
do aws ec2 create-snapshot --volume-id ${vol_id}
# do aws ec2 create-snapshot --volume-id ${vol_id} --tag-specifications="[{\"ResourceType\":\"snapshot\",\"Tags\":$(aws ec2 describe-volumes --volume-ids ${vol_id} | jq '.Volumes[].Tags' -c)}]"
done
(defconst crosshairs-packages
'(
(vline :location (recipe
:fetcher github
:repo "emacsmirror/emacswiki.org"
:files ("vline.el")))
(col-highlight :location (recipe
:fetcher github
:repo "emacsmirror/emacswiki.org"
:files ("col-highlight.el")))
require "rails_helper"
describe "index issue" do
with_model :MidsizeNameChild do
table do |t|
t.belongs_to :midsize_name_parent,
index: { name: "shorter_index_name" }
end
model do
# frozen_string_literal: true
# source: https://github.com/rails-api/active_model_serializers/blob/v0.10.6/docs/howto/upgrade_from_0_8_to_0_10.md#2-add-activemodelv08serializer
module ActiveModel::V08
class Serializer < ActiveModel::Serializer
include Rails.application.routes.url_helpers
# AMS 0.8 would delegate method calls from within the serializer to the
# object.
(defconst crosshairs-packages
'(
(vline :location (recipe
:fetcher github
:repo "emacsmirror/emacswiki.org"
:branch "master"
:files ("vline.el")))
(col-highlight :location (recipe
:fetcher github
:repo "emacsmirror/emacswiki.org"
@arubis
arubis / foo.brew-cask-list.txt
Created November 17, 2017 22:48
Brew cask list
amethyst
armory
audacity
bitcoin-core
calibre
corectl-app
cuda
dayone-cli
dnscrypt
emacs