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 / 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 / PlaceholderTextView.swift
Created January 13, 2020 09:25 — forked from albertbori/PlaceholderTextView.swift
UITextView support for Placeholder text
import UIKit
import Foundation
@IBDesignable class PlaceholderTextView: UITextView, UITextViewDelegate
{
private let _placeholderColor: UIColor = UIColor(white: 0.78, alpha: 1)
private var _placeholderLabel: UILabel!
@IBInspectable var placeholder: String = "" {
didSet {
import Foundation
import CoreTelephony
class OperatorInfo {
func id() -> String {
let networkInfo = CTTelephonyNetworkInfo()
let carrier = networkInfo.subscriberCellularProvider
let mcc = carrier!.mobileCountryCode
let mnc = carrier!.mobileNetworkCode
@milanpanchal
milanpanchal / DeviceConst.swift
Created February 9, 2017 14:37 — forked from bright23/DeviceConst.swift
DeviceConst.swift
//
// AppConst.swift
// AdBlockSample
//
// Created by bright on 2016/11/26.
// Copyright © 2016年 bright. All rights reserved.
//
import Foundation
import UIKit
@milanpanchal
milanpanchal / CSwift.swift
Created February 9, 2017 08:39 — forked from ankitspd/CSwift.swift
Swift ++ operator
prefix func ++(inout x: Int) -> Int {
x = x + 1
return x
}
postfix func ++(inout x: Int) -> Int {
let oldX = x
x = x + 1
return oldX
}
@milanpanchal
milanpanchal / swift.swift
Created February 9, 2017 07:27 — forked from pedrogimenez/swift.swift
swift.swift
func calculateAverage(total: Int, countOfNumbers: Int) -> Int {
return total / countOfNumbers
}
func average(algorithm: (Int, Int) -> Int, numbers: Int...) -> Int {
var countOfNumbers = 0
var total = 0
for number in numbers {
total += number