Skip to content

Instantly share code, notes, and snippets.

# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "rails"
# If you want to test against edge Rails replace the previous line with this:
# gem "rails", github: "rails/rails", branch: "main"
# frozen_string_literal: true
require 'bundler/inline'
gemfile(true, quiet: true) do
source 'https://rubygems.org'
gem 'grape', path: '.'
gem 'zeitwerk'
end
@fixlr
fixlr / README.md
Last active August 20, 2020 13:39
Copy failed test files from CircleCI

Bookmarklet - CircleCI failures

Copy the full list of failures from a CircleCI build with one click!

To Install

Create a new bookmark in your browser, and use the minified cci_failures.min.js code as the bookmark's URL.

To Use

@fixlr
fixlr / unused-ruby-versions.sh
Created March 16, 2017 17:46
Find unused versions of ruby
comm -23 <(rbenv versions --bare) <(find . -name '.ruby-version' -exec cat {} \; | cut -d'@' -f1 | sort | uniq)
cask 'firefox-45esr' do
version '45.4.0'
sha256 '4e40d588b838709822bd3ccc1edbd13f055df8daf73d1024bcc6c9cbe07ef1e9'
url "https://download-installer.cdn.mozilla.net/pub/firefox/releases/#{version}esr/mac/en-US/Firefox%20#{version}esr.dmg"
name 'Mozilla Firefox'
homepage 'https://www.mozilla.org/en-US/firefox/organizations/'
license :mpl
app 'Firefox.app'
agvim () {
ag -l $* | xargs -o vim
}
let g:vroom_write_all = 1
let g:vroom_bundle_exec = 0
let g:vroom_use_binstubs = 1
let g:vroom_spec_command = 'rspec --format d'
@fixlr
fixlr / README.md
Last active August 29, 2015 14:04
Universal Ruby Debugger

universal_debugger

Usage

With bundler:

gem 'universal_debugger', git: 'https://gist.github.com/fixlr/5b8f963400342996fe45'
@fixlr
fixlr / set-unset.sh
Created July 10, 2014 17:56
Shell alias to toggle an environment variable. All variable names have been changed to protect the innocent.
alias toggle_my_env_variable='[ -z "$MY_ENV_VARIABLE" ] \
&& export MY_ENV_VARIABLE=true \
|| unset MY_ENV_VARIABLE; \
[ -z "$MY_ENV_VARIABLE" ] \
&& echo "MY_ENV_VARIABLE if OFF" \
|| echo "MY_ENV_VARIABLE is ON"'
# 3.2.17
MyModel.new(start_date: '12/03/09')
=> #<MyModel id: nil, start_date: "2009-12-03'>
# 4.0.4
MyModel.new(start_date: '12/03/09')
=> #<MyModel id: nil, start_date: "0012-03-09">