Skip to content

Instantly share code, notes, and snippets.

@skeemer
skeemer / pint-diff
Last active January 18, 2026 04:42
Run pint in DDEV on files specified from git comparisons
#!/usr/bin/env bash
## Description: Run pint on branch/commit changed or dirty files
## Usage: pint-diff {diff?} [--help|-h] [--dirty|-d] [--pint "pint args"] [--list]
## Example: "ddev pint-diff", "ddev pint-diff alternate-branch", "ddev pint-diff --dirty"
# Default values
DIFF="origin/main"
HELP=false
DIRTY=false
@skeemer
skeemer / intercom.blade.php
Created September 15, 2023 21:34
Example of Livewire's wire:navigate working with Intercom
<?php
/**
* The key to getting Intercom to work with wire:navigate is using an undocumented but well supported feature.
* My source for how I know they are supporting it: https://github.com/intercom/intercom-rails/issues/336
**
@if (config('intercom.app_id'))
<script>
// From Intercom docs
const APP_ID = "{{ config('intercom.app_id') }}";
@skeemer
skeemer / Gemfile
Created May 7, 2014 18:48
ruby infusionsoft test
source 'https://rubygems.org'
gem 'infusionsoft'
@skeemer
skeemer / deposit.html.haml
Created February 14, 2012 18:51
Nested form failure
= semantic_form_for [@user, @transaction], url: url, style: "width: inherit;" do |f|
= f.semantic_fields_for :transfers do |g|
= g.inputs do
= g.input :amount
%li
%label
= "(#{Transfer::TRANSFER_FEE.format :symbol} transaction fee will be added)"
= g.inputs do
%li
%label
@skeemer
skeemer / contest_filter.rb
Created October 12, 2011 08:13
virtual search/filter model start
class ContestFilter
BIG_HASH = {
prize: {
option0: {
name: 'Free',
where: 'prize_cents = 0' },
option1: {
name: '$',
where: 'prize_cents > 0 AND prize_cents <= 500' },
option2: {