Skip to content

Instantly share code, notes, and snippets.

View PhantomKnight287's full-sized avatar
:shipit:
In Love With Terminal

Gurpal Singh PhantomKnight287

:shipit:
In Love With Terminal
View GitHub Profile
@alfonsusac
alfonsusac / slide-in-transition.tsx
Last active October 26, 2023 06:01
Component Snippet to allow progressing forward and backward with slide-in animation like in iOS.
function Flow() {
const steps = ['new account', 'enter OTP', 'add pfp', 'add bio...' ] // The names doesn't matter, as long as its an array
const [step, setStep] = useState(0)
const handleNextStep = () => {
if(step < steps.length - 1) // limit max steps
setStep(prev => prev + 1)
}
const handlePrevStep = () => {
@whiplashoo
whiplashoo / AppDelegate.swift
Created June 21, 2023 14:24
Adding a Menu Bar extra (icon) to a Flutter macOS app
import Cocoa
import FlutterMacOS
import SwiftUI
// Relevant blog post: https://blog.whidev.com/menu-bar-extra-flutter-macos-app
struct Shortcut {
var combination: String
var description: String
var createdAt: Int