Skip to content

Instantly share code, notes, and snippets.

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

Indrajit Chakrabarty indyfromoz

🏠
Working from home
View GitHub Profile
@indyfromoz
indyfromoz / iPod.swift
Created July 28, 2020 03:39 — forked from jordansinger/iPod.swift
Swift Playgrounds iPod Classic
import SwiftUI
import PlaygroundSupport
struct iPod: View {
var body: some View {
VStack(spacing: 40) {
Screen()
ClickWheel()
Spacer()
}
import SwiftUI
import PlaygroundSupport
struct Sunset: View {
@State var backgroundColor = Color.blue
@State var sunSetted = false
let sunGradient = [Color.yellow, Color.orange]
let moonGradient = [Color.gray, Color.black]
@State var alignment = Alignment.top
@indyfromoz
indyfromoz / iPhone12ProWebsite.swift
Created July 15, 2020 19:58 — forked from navsing/iPhone12ProWebsite.swift
iPhone 12 Pro Buying Experience
//
// Apple.swift
// Playground
//
// Created by Navdeep Singh on 7/14/20.
//
import SwiftUI
struct Apple: View {
@indyfromoz
indyfromoz / WheelView.swift
Created July 14, 2020 10:18 — forked from sturdysturge/WheelView.swift
WheelView Colour Picker Maker
import SwiftUI
struct RGBAWheelView: WheelPickable {
typealias DataType = RGBAData
let data: DataType
@State var thumbOffset = CGPoint()
var _$thumbOffset: Binding<CGPoint> { $thumbOffset }
let angularGradient: Gradient
let radialGradient: Gradient
init(data: DataType) {
import SwiftUI
import PlaygroundSupport
struct ShareSheet: View {
var body: some View {
VStack(spacing: 0) {
SheetHeaderView()
.padding()
Divider()
//
// ContentView.swift
// Widgets
//
// Created by Kyle Halevi on 7/3/20.
//
import SwiftUI
struct Widget: View {
@indyfromoz
indyfromoz / StarPlane.swift
Created July 9, 2020 15:23 — forked from JohnSundell/StarPlane.swift
A simple game written in SwiftUI. Note that this is just a fun little hack, the code is not meant to be taken seriously, and only works on iPhones in portrait mode.
// A fun little game written in SwiftUI
// Copyright (c) John Sundell 2020, MIT license.
// This is a hacky implementation written just for fun.
// It's only verified to work on iPhones in portrait mode.
import SwiftUI
final class GameController: ObservableObject {
@Published var plane = GameObject.plane()
@Published private(set) var clouds = [GameObject]()
//
// ContentView.swift
//
//
// Created by Bernstein, Joel on 7/4/20.
//
import SwiftUI
struct ElementModel: Identifiable
# Script to download all the WWDC 2020 session videos in the highest 4K video and audio
# You may have to update ffmpeg before using this script. I needed version 4.3 or higher to successfully download the videos.
#
# If you want the lower bitrate audio, do a find/replace of "audio_english_192" with "audio_english_64"
# If you want lower bitrate or lower resolution video, do a find/replace of "hvc_2160p_16800" with any of the following:
# "hvc_2160p_11600"
# "hvc_1440p_8100"
# "hvc_1080p_5800"
# "hvc_1080p_4500"
# "hvc_720p_3400"
import SwiftUI
import PlaygroundSupport
// constants
let cardWidth: CGFloat = 343
let cardHeight: CGFloat = 212
let spacing = 36
let animation = Animation.spring()
let cardColors = [
Color(UIColor.systemRed),