Skip to content

Instantly share code, notes, and snippets.

View strzibny's full-sized avatar
🏠
Working from home

Josef Strzibny strzibny

🏠
Working from home
View GitHub Profile
@strzibny
strzibny / hotwire-native-oauth.md
Created March 1, 2026 05:02 — forked from yshmarov/hotwire-native-oauth.md
hotwire-native-oauth.md

OAuth in Hotwire Native iOS apps

Google and Apple block OAuth from embedded web views (WKWebView) with disallowed_useragent. This guide shows how to make OAuth work in a Hotwire Native iOS app using ASWebAuthenticationSession — Apple's purpose-built API for OAuth — with a path configuration rule and token handoff.

The approach uses zero bridge components. It works with any OmniAuth provider (Google, Apple, Facebook, etc.) and extends to social account linking (YouTube, TikTok, etc.) where the user is already signed in.

How it works

┌─────────────┐     ┌──────────────────────────┐     ┌─────────┐     ┌──────────┐
@strzibny
strzibny / keymap.json
Created June 21, 2024 07:21 — forked from joeldrapper/keymap.json
My Zed Config
[
{
"context": "Editor",
"bindings": {
"alt-up": "editor::SelectLargerSyntaxNode",
"alt-down": "editor::SelectSmallerSyntaxNode",
"ctrl-cmd-up": "editor::MoveLineUp",
"ctrl-cmd-down": "editor::MoveLineDown"
}
}
https://jennamolby.com/how-to-use-cookies-to-capture-url-parameters/
// Parse the URL
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
var results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
import { Controller } from 'stimulus';
import React from 'react';
import ReactDOM from 'react-dom';
import AppContainer from 'components/core/AppContainer';
export default class extends Controller {
connect() {
const Component = window.ReactComponents[this.data.get('component')];
let props = this.data.get('props') || {};
if (typeof props === 'string') {
@strzibny
strzibny / job_scheduler_using_ractor.rb
Created September 25, 2020 11:34 — forked from GustavoCaso/job_scheduler_using_ractor.rb
Simple implementation for a job scheduler using ruby Ractor primitive
require 'optparse'
require 'json'
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'redis'
gem 'oj'
end
@strzibny
strzibny / Gemfile
Created June 25, 2020 03:48 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@strzibny
strzibny / stimulus.md
Created October 26, 2018 17:33 — forked from mrmartineau/stimulus.md
Stimulus cheatsheet
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans
@strzibny
strzibny / README.md
Created July 15, 2016 11:45 — forked from hofmannsven/README.md
My simply Git Cheatsheet