Skip to content

Instantly share code, notes, and snippets.

View tgodfrey's full-sized avatar

Tyler Godfrey tgodfrey

  • Twin Cities, MN
View GitHub Profile
@tgodfrey
tgodfrey / redix.ex
Last active June 5, 2020 15:30
Elixir Module for working with MessageBus
defmodule MyApp.Redix do
@pool_size 5
# How long, in seconds, to keep messages in the backlog
@max_backlog_age 604800
# How many messages may be kept in the global backlog
@max_global_backlog_size 2000
# How many messages may be kep in the per-channel backlog
@max_backlog_size 1000
@tgodfrey
tgodfrey / local_git_branch_cleanup.txt
Created July 3, 2018 19:47
clean up local git branches
http://erikaybar.name/git-deleting-old-local-branches/
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
=>(\S) with => $1
([^<\s])=> with $1 =>
(?<!:):([\w\d_]+)(\s*)=> with $1:

Keybase proof

I hereby claim:

  • I am tgodfrey on github.
  • I am tylerg (https://keybase.io/tylerg) on keybase.
  • I have a public key ASCA0iOc8Q7zaMYoLWaBVslV2M4rNJJ29eKR6rxd4HKufgo

To claim this, I am signing this object:

@tgodfrey
tgodfrey / rspec_rails_cheetsheet.rb
Created May 19, 2017 19:49 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet (include capybara matchers)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)