Skip to content

Instantly share code, notes, and snippets.

View parthiv-d's full-sized avatar

Parthiban D parthiv-d

  • 21:25 (UTC +05:30)
View GitHub Profile
//
// ContentView.swift
//
// Carousel with Parallax Effect SwiftUI
// Created by Igor Shelopaev on 10.08.2022.
//
import SwiftUI
import Combine
struct ContentView: View {
let columns: Int = 28
var body: some View{
ZStack{
Color.clear
HStack(spacing: 0){
ForEach(0..<columns, id:\.self){ i in
ColumnView(delay: 0, offsetY: offsetY(i), color: .blue)
// Just create a project for iOS 17 and put it in ContentView.swift
struct ContentView: View {
@State var colors : [Color] = [.blue, .red, .green, .yellow, .brown, .mint, .indigo, .pink, .teal]
var body: some View {
NavigationStack{
ScrollView(.vertical){
VStack(items: colors){ color in
@parthiv-d
parthiv-d / XCTestCaseExtensions.swift
Created June 7, 2023 07:28 — forked from AvdLee/XCTestCaseExtensions.swift
This extension should make it fairly easy to test your Share Extension. Read more about it here: https://www.avanderlee.com/swift/ui-test-share-extension/
//
// XCTestCaseExtensions.swift
//
// Useful extension to UI Test the Share Extension of apps.
//
//
// Created by Antoine van der Lee on 18/05/2018.
// Copyright © 2018. All rights reserved.
//
@parthiv-d
parthiv-d / macos-sudo-nopasswd.sh
Created November 25, 2022 09:43 — forked from juliyvchirkov/macos-sudo-nopasswd.sh
bash: sudo without a password on macOS
#!/bin/bash
#
# Enable nopasswd mode for sudo on macOS from the userspace in fast and totally non-interactive way
#
# Type the password last time to apply the new mode and forget it for any console task for ages
# Use the rollback to restore password protection
#
# Developed and tested by https://juliyvchirkov.github.io/ under the MIT license on macOS Big Sur 11.2.0
#
# Get latest version at https://gist.github.com/juliyvchirkov/3ca76582ed6b6a8366c9e7d60644960d