Skip to content

Instantly share code, notes, and snippets.

package com.lyft.android.composemap
import android.graphics.Bitmap
import androidx.compose.foundation.Image
import androidx.compose.foundation.gestures.awaitDragOrCancellation
import androidx.compose.foundation.gestures.awaitEachGesture
import androidx.compose.foundation.gestures.awaitFirstDown
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
@alexjlockwood
alexjlockwood / radiohead-setlists.txt
Last active November 14, 2025 22:38
A script that queries the Setlist FM API and prints out the dates where Radiohead played identical setlists (same songs and same order)
Found 34 groups of identical setlists.
################################################################################
Group 2: 2 matching shows
################################################################################
- 14-11-2025 – Unipol Arena – Casalecchio di Reno, Italy (id: 1b40c9d0)
- 07-11-2025 – Movistar Arena – Madrid, Spain (id: 1340c9dd)
Songs:
1. Planet Telex
@alexjlockwood
alexjlockwood / HeartBreakView.swift
Last active February 16, 2025 22:56
Favorite/unfavorite heart break animation in SwiftUI
import SwiftUI
/// A heart break icon animation in SwiftUI.
struct HeartBreakView: View {
@Binding private var isSelected: Bool
@State private var rotation: CGFloat = 0
@State private var strokeHeartOpacity: CGFloat = 1
@State private var heartBreakOpacity: CGFloat = 0
@State private var trimProgress: CGFloat = 1
@alexjlockwood
alexjlockwood / HappyValentinesDayView.swift
Last active February 14, 2025 03:20
A cute lil happy valentines day animation in SwiftUI
import SwiftUI
/// Happy Valentines Day!
struct HappyValentinesDayView: View {
@State private var progress: CGFloat = 0
var body: some View {
AnimatedStrokePath(progress: progress)
.trim(from: 0, to: progress)
.stroke(.red, style: .init(lineWidth: 6, lineCap: .round, lineJoin: .round))
@alexjlockwood
alexjlockwood / RingOfCircles.swift
Last active December 1, 2024 15:37
Ring of Circles animation written in SwiftUI
import SwiftUI
private let kNumDots = 16
private let kTau: CGFloat = 2 * .pi
private let kDotPeriod: CGFloat = 10
private let kWavePeriod: CGFloat = 10 / (4 * kTau)
private let kRingRadiusFactor: CGFloat = 0.35
private let kWaveRadiusFactor: CGFloat = 0.10
struct RingOfCircles: View {
@alexjlockwood
alexjlockwood / SegmentedControl.kt
Last active September 23, 2024 02:10
A simple animated segmented control component written with Jetpack Compose
package com.example.segmentedcontrol
import androidx.compose.animation.ExperimentalSharedTransitionApi
import androidx.compose.animation.animateBounds
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
// This file is automatically generated. Do not edit.
package com.lyft.android.design.coreui.compose.attributes
import com.lyft.android.design.coreui.compose.components.Icon
import com.lyft.android.design.coreui.compose.components.IconButton
import com.lyft.android.design.coreui.iconography.R
/**
* Definitions for LPL iconography.
@alexjlockwood
alexjlockwood / detach-color-styles.ts
Last active July 12, 2025 19:06
This plugin recurses every layer in every page of the current figma file, and detaches color styles that are backed by a single bound color variable.
// This plugin recurses every layer in every page of the current figma file, and detaches
// color styles that are backed by a single bound color variable.
(function main() {
recurseLayerHierarchy(figma.root, false);
figma.closePlugin();
})();
function recurseLayerHierarchy(node: BaseNode, isChildOfInstanceNode: boolean) {
if (node.type === 'INSTANCE') {
using System;
using System.Collections.Generic;
using System.Linq;
using FG.Common;
using SRF;
using UnityEngine;
namespace Levels.CrownMaze
{
// Token: 0x020004C1 RID: 1217
using System;
using System.Collections.Generic;
using System.Linq;
using FG.Common;
using Levels.ProceduralGeneration;
using MPG.Utility;
using UnityEngine;
namespace Levels.CrownMaze
{