Skip to content

Instantly share code, notes, and snippets.

View andrewkatz's full-sized avatar

Andrew Katz andrewkatz

  • Los Angeles, CA
View GitHub Profile
alias gphu='gph -u origin'
gpqt()
{
last_commit=$(git log -1 --pretty=%B)
message=${1:-$last_commit}
echo "$message\n@trobrock" | gpq -F -
}
xpq()
@andrewkatz
andrewkatz / csrf.js
Created April 14, 2021 19:03
Fetch Turbo stream
export default function () {
const token = document.querySelector('meta[name="csrf-token"]')
return token ? token.getAttribute('content') : null
}
# frozen_string_literal: true
# Easier access to components in templates. So instead of doing:
#
# <%= render SectionComponent.new(title: 'Foo') do |c| %>
# <p>My content</p>
#
# <% c.subsection do %>
# <p>Cool</p>
# <% end %>

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@andrewkatz
andrewkatz / carbonfox
Created May 6, 2025 02:14
Ghostty carbonfox theme
palette = 0=#282828
palette = 1=#dc5e95
palette = 2=#5cbb72
palette = 3=#56bab9
palette = 4=#82a8f8
palette = 5=#b897f8
palette = 6=#5baff8
palette = 7=#dfdfe0
palette = 8=#484848
palette = 9=#e175a4