Skip to content

Instantly share code, notes, and snippets.

View DrewFitz's full-sized avatar
🥪
what is this feature for

Drew Fitzpatrick DrewFitz

🥪
what is this feature for
View GitHub Profile
@DrewFitz
DrewFitz / ContentView.swift
Last active February 24, 2023 17:54
Corrected Geometry for SwiftUI UnitPoint Gradient Rotation by _DavidSmith -> https://gist.github.com/UnderscoreDavidSmith/fd77499b3ca791093abeb58407683f8b
//
// ContentView.swift
// GradientComponenet
//
// Created by David Smith on 2/21/23.
// Updaetd by Drew Fitzpatrick on 2/24/23.
//
import SwiftUI
@DrewFitz
DrewFitz / GroupActivityStuff.swift
Last active November 21, 2021 18:54
SharePlay in Unity
//
// GroupActivityStuff.swift
// GroupActivityStuff
//
// Created by Drew Fitzpatrick on 7/29/21.
//
import GroupActivities
import Combine
import Foundation
@DrewFitz
DrewFitz / mathcaps.c
Last active August 29, 2015 14:10
Who likes unicode allcaps???
/*
Compile: make mathcaps
Usage: ./mathcaps "the string to convert"
*/
#include <stdio.h>
#include <string.h>
int main(int argc, char** argv) {
@DrewFitz
DrewFitz / puddle.py
Last active December 27, 2015 02:49
Twitter Interview Solution Problem described here: http://qandwhat.apps.runkite.com/i-failed-a-twitter-interview/ It's messy, but it solves it in one pass
def puddle(xs):
result = 0
unresolved = []
for i in range(len(xs)):
y = xs[i]
if len(unresolved) > 0:
while y > unresolved[-1][0]:
z = unresolved.pop()[0]
if len(unresolved) == 0:
break