Skip to content

Instantly share code, notes, and snippets.

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

Milan Panchal milanpanchal

🏠
Working from home
View GitHub Profile
@milanpanchal
milanpanchal / github-emoji.md
Created April 26, 2022 14:09 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@milanpanchal
milanpanchal / get-medium-stats.js
Created April 14, 2022 05:41 — forked from igeligel/get-medium-stats.js
medium-get-totals
const totalTypes = {
VIEWS: 2,
READS: 3,
FANS: 5
};
const getTotal = tableColumn =>
[
...document.querySelectorAll(
`td:nth-child(${tableColumn}) > span.sortableTable-number`
@milanpanchal
milanpanchal / StudentSortedByAddressAndAge.swift
Last active March 17, 2021 08:16
2_How to Sort by Multiple Properties in Swift?
let sortedByAddressAndAge = Student.students.sorted {
if $0.address == $1.address {
return $0.age < $1.age
}
return $0.address < $1.address
}
/* Output:
@milanpanchal
milanpanchal / Xcode 12 Build Active Architecture Only
Created December 14, 2020 06:44
Xcode 12 Build Active Architecture Only
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
end
end
end
@milanpanchal
milanpanchal / Xcode 12 Excluded Architectures for arm64
Created December 14, 2020 06:13
Xcode 12, building for iOS Simulator, but linking in object file built for iOS, file for architecture arm64
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
@milanpanchal
milanpanchal / .swiftlint.yml
Last active September 11, 2020 14:02
Swift Lint Configuration file
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji)
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
disabled_rules: # rule identifiers to exclude from running
- trailing_whitespace
- force_cast
- force_unwrapping
@milanpanchal
milanpanchal / app.py
Created June 4, 2020 06:55
Check which countries an app is available in on AppStore
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import json
import sys
countrydict = {
'AE': 'United Arab Emirates',
'AG': 'Antigua and Barbuda',
@milanpanchal
milanpanchal / Recursively Remove .DS_Store
Created May 31, 2020 19:51
Recursively Remove .DS_Store
// Recursively Remove .DS_Store
* Open Terminal Application
* Go to your directory via command, cd path/to/your/directory
* Now type: find . -name '.DS_Store' -type f -delete
* Press enter
@milanpanchal
milanpanchal / ParticlaFunction.swift
Created May 7, 2020 10:27
Partial functions allow you to encapsulate one function within another.
import UIKit
func add(x: Int, y: Int, z: Int) -> Int {
return x + y + z
}
func addX(x: Int) -> (Int, Int) -> Int {
func addYAndZ(y: Int, z: Int) -> Int {
return x + y + z
}
@milanpanchal
milanpanchal / Factorial.swift
Last active May 7, 2020 10:27
Find factorial of the int number in swift
func factorial(of number: Int) -> Int {
if number == 1 {
return 1
} else {
return number * factorial(of: number - 1)
}
}
let val = 5
let result = factorial(of: val)