Skip to content

Instantly share code, notes, and snippets.

View bnjamin's full-sized avatar

Benjamin French bnjamin

View GitHub Profile
@bnjamin
bnjamin / virtual_column.rb
Created September 19, 2021 17:40
Virtual column rails
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails", branch: "main"
@bnjamin
bnjamin / bare_transitions.js
Created June 23, 2020 10:28
Transitions stolen from alpine.js
export function transitionIn (el, show = () => {}) {
const attrs = getXAttrs(el, 'transition')
// If any transition attrs.
if (attrs.filter(attr => ['enter', 'enter-start', 'enter-end'].includes(attr.value)).length > 0) {
transitionClassesIn(el, attrs, show)
} else {
// If not, just show that damn thing.
show()
}

Keybase proof

I hereby claim:

  • I am bnjamin on github.
  • I am bnjamin (https://keybase.io/bnjamin) on keybase.
  • I have a public key ASCRKX3jfqv8WWsU6RE6jWm9wMIVO66EB0aaQZCEhJibZwo

To claim this, I am signing this object: