Skip to content

Instantly share code, notes, and snippets.

View joeblau's full-sized avatar
👨‍💻
https://bloxwap.com

Joe Blau joeblau

👨‍💻
https://bloxwap.com
View GitHub Profile
@joeblau
joeblau / subvox-prompt.md
Created November 1, 2026 00:06
subvox prompt

we want to build a prototype mac app with my airpods pros

For AirPods Pro 3, Apple exposes motion, audio, and heart-rate data to third-party developers, but not every sensor’s raw output.

1. Developer-accessible sensors

Sensor Developer access API Raw data?
Accelerometer (motion) ✅ Yes Core Motion Processed
Gyroscope / rotation ✅ Yes Core Motion Processed
@joeblau
joeblau / subscription.sol
Created November 13, 2024 20:42
Subscription NFT
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
contract SubscriptionNFT is ERC721 {
IERC20 public usdcToken;
address public owner;
@joeblau
joeblau / crypto_growth_2009_2023.csv
Created September 13, 2024 18:46
Crypto vs Internet
Year Number of Crypto Users
2009 1000
2010 5000
2011 20000
2012 100000
2013 1000000
2014 2000000
2015 5000000
2016 10000000
2017 35000000
@joeblau
joeblau / vocs-action.yml
Created July 14, 2024 16:57
vocs github pages action
name: "Install dependencies"
description: "Prepare repository and all dependencies"
inputs:
node-version:
description: "The node version to use"
required: false
default: "20"
package-manager:
description: "You may specify your preferred package manager (one of `npm | yarn | pnpm | bun` and an optional `@<version>` tag). Otherwise, the package manager will be automatically detected."
required: false
@joeblau
joeblau / SegmentPagesView.swift
Created September 21, 2021 20:48
Segment Control + Pages
//
// ContentView.swift
// SegPage
//
// Created by Joe Blau on 9/21/21.
//
import SwiftUI
enum Page: Identifiable, CaseIterable, CustomStringConvertible {

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@joeblau
joeblau / pre-commit
Created June 1, 2019 16:57
Pre commit git hook to run SwiftLint and SwiftFormat
#!/bin/bash
# Place this file in `.git/hooks/`
if which swiftlint >/dev/null; then
swiftlint autocorrect
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
git diff --diff-filter=d --staged --name-only | grep -e '\(.*\).swift$' | while read line; do
@joeblau
joeblau / app.plist
Created May 28, 2019 15:40
Apple enterprise app distribution
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>

Animated Transition

  • VC asks transitioningDelegate “do you have an animated transition for me?”
  • delegate says “yes here is an <AnimatedTransitioning> object”
  • framework says “hey <AnimatedTransitioning> object; perform the transition, and here’s the <ContextTransitioning> that defines the container view, the from vc, the to vc, the frames, etc. tell the context when you’re done”
  • <AnimatedTransitioning> value does the animation and tells the <ContextTransitioning> value when it’s done
  • fin

Interactive Transition

  • VC asks transitioningDelegate “do you have an interactive transition for me?”
  • delegate says “yes, here is an <InteractiveTransitioning> and an <AnimatedTransitioning>
@joeblau
joeblau / simrecord
Created March 16, 2018 22:06 — forked from JohnSundell/simrecord
🎥 Script that lets you start a video recording from the iOS simulator with one command
#!/bin/bash
ITERATION=1
EXTENSION="mp4"
FILENAME="$HOME/Desktop/Simulator Recording.$EXTENSION"
while [ -e "$FILENAME" ]
do
ITERATION=$((ITERATION+1))
FILENAME="$HOME/Desktop/Simulator Recording $ITERATION.$EXTENSION"