Skip to content

Instantly share code, notes, and snippets.

View manishpathak99's full-sized avatar
💭
Worked with iOS/Android/AWS. Technology Geek ##@@##

Manish Pathak manishpathak99

💭
Worked with iOS/Android/AWS. Technology Geek ##@@##
View GitHub Profile
@manishpathak99
manishpathak99 / xcode-downloader.rb
Created October 30, 2017 09:10
Script for reliably downloading binaries (e.g. Xcode) from Apple's CDN
#!/usr/bin/env ruby
print "What is the URL of your Apple Downloads resource?\nURL:"
url = gets.strip
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
token = gets.strip
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads"
@manishpathak99
manishpathak99 / Xcode iOS Commands
Last active December 1, 2021 02:42
Xcode iOS Commands
***************** Show build duration time during running the project in xcode ******************
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES
*****Create ipa from xarchive******** -> To convert .xcarchive to .ipa | xcode 9
xcodebuild
-exportArchive
@manishpathak99
manishpathak99 / drop-stash.sh
Created May 30, 2018 11:31
Remove/Drop git stash range
# This will remove stash stash@{10}, stash@{11} , stash@{12}
for n in {1..2}
do
git stash drop stash@{10}
done
@manishpathak99
manishpathak99 / New Mac Setup from old one
Last active February 23, 2023 18:24
Setup MacbookPro
Install alfred 4
Install Cinch
Open finder -> show PathBar and show Status bar
show hidden Mac OS X files: run
Install Rosetta2
softwareupdate --install-rosetta
Install Homebrew :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@manishpathak99
manishpathak99 / gist:5b6878931282a86ff111bf204c74c126
Created August 31, 2018 09:00
How to find the Xcode version from archive .
Instructions:
1. Change extension of your file from *.ipa to* .zip.
2. Unzip it.
3. Open extracted folder, right click on Application file and then choose "Show Package Contents".
4. Find Info.plist file and open it.
5. Find value for key "DTXcodeBuild".
@manishpathak99
manishpathak99 / uikit-equivalent-swiftui.csv
Created March 12, 2023 18:06
UIKit equivalent to SwiftUI
UIKit SwiftUI
UILabel Text & Label
UIImageView Image
UITextField TextField
UITextView TextEditor
UISwitch Toggle
UISlider Slider
UIButton Button
UITableView List
UICollectionView LazyVGrid / LazyHGrid