Skip to content

Instantly share code, notes, and snippets.

@tcannonfodder
tcannonfodder / example.txt
Last active August 13, 2025 14:48
Median Barcode Scanner cannot be closed on Google Pixel 7
This is a placeholder file so that the image can be uploaded
@tcannonfodder
tcannonfodder / UrlNavigation.java
Created August 13, 2025 15:25
Median: Android Deep Linking causes infinite loop on launch
// java/co/median/android/UrlNavigation.java
// Around line 255
public boolean shouldOverrideUrlLoadingNoIntercept(final GoNativeWebviewInterface view, final String url,
@SuppressWarnings("SameParameterValue") final boolean noAction) {
// Called as part of the Intent fired from the App Launch, the `url` is: https://btvfit.stagepunchpass.com/classes
// ..
//
// check redirects
@tcannonfodder
tcannonfodder / pull-to-refresh.js
Last active August 16, 2025 10:42
Pull to Refresh + Web Awesome workaround for iOS
import PullToRefresh from 'pulltorefreshjs';
var drawerOrPageShown = false
function afterShowEvent(event){
const element = event.target
if(element.tagName != "WA-PAGE" && element.tagName != "WA-DRAWER") {
return
}
@tcannonfodder
tcannonfodder / herb-components.md
Created October 24, 2025 20:30
Herb Components draft

A component starts out as an ERB file.

Take text_field.component.erb

<% attr_accessor: :value %>
<input type="text" value="<%= value %>" %>

Herb then compiles this into a class, which can be instantiated and called to render ERB:

@tcannonfodder
tcannonfodder / cable_car_template.rb
Created January 12, 2026 00:26
CableCar template renderer
# frozen_string_literal: true
class CableCarTemplate
attr_accessor :source
def initialize(&block)
self.source = block
end
def render_in(view_context)