Skip to content

Instantly share code, notes, and snippets.

View MMnasrabadi's full-sized avatar
🤠
i am happy

Mohammad Mohammadi Nasrabadi MMnasrabadi

🤠
i am happy
View GitHub Profile
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
@MMnasrabadi
MMnasrabadi / Download stream
Last active October 4, 2022 08:53
Download stream video format : M3U8
ffmpeg -user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/537.86.7" -i https://branding.arvanvod.com/w4orK6pYLV/wVmowjK7OW/h_,144_200,240_400,360_800,480_1500,720_2500,k.mp4.list/index-f4-v1-a1.m3u8 -c copy Arvin.mkv
@MMnasrabadi
MMnasrabadi / .gitignore xcode
Created July 24, 2019 07:22
Example .gitignore file for iOS projects
## .DS_Store
.DS_Store
## CocoaPods
Podfile.lock
Pods/
## Userdata
Pock.xcodeproj/xcuserdata/
Pock.xcworkspace/xcuserdata/
@MMnasrabadi
MMnasrabadi / Fix Internet connection in Android Emulator
Created July 24, 2019 07:24
Start the emulator from the command line
Cd ~/Library/Android/sdk/emulator
./emulator -list-avds
./emulator -avd Pixel_2_XL_API_26 -dns-server 8.8.8.8,8.8.4.4
@MMnasrabadi
MMnasrabadi / DNS Terminal on Mac
Last active August 15, 2019 09:25
Change the DNS Servers via Terminal on a Mac
# 1.For add : Once Terminal is open, enter the following command:
$ networksetup -setdnsservers Wi-Fi 178.22.122.100 185.51.200.2
# then press [Enter]
# 2.For Delete :
$ networksetup -setdnsservers Wi-Fi "Empty"
@MMnasrabadi
MMnasrabadi / fazl-cheshmak-zan.sh
Last active June 25, 2020 11:34 — forked from iamvee/fazl-cheshmak-zan.sh
This is from the grace of my Lord
echo "\033[31;32m \033[0m"
echo "\033[31;32m ## \033[0m"
echo "\033[31;32m ### \033[0m"
echo "\033[31;32m ###** #########*####**** \033[0m"
echo "\033[31;32m ## ############********* #* \033[0m"
echo "\033[31;32m *######***** ### #* \033[0m"
echo "\033[31;32m # * #* \033[0m"
echo "\033[31;32m ## # # ## ###' #*
@MMnasrabadi
MMnasrabadi / ZSH and Oh My ZSH installations
Last active March 14, 2020 05:43
Setting up the beautiful terminal by ZSH and Oh My ZSH installations
Setting up the beautiful terminal by ZSH and Oh My ZSH installations
ohmyzsh github page:
https://github.com/ohmyzsh/ohmyzsh
Themes :
https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@MMnasrabadi
MMnasrabadi / CodablePro.swift
Created March 23, 2020 15:18
extension on Codable
// Create by love : Mohammad Nasrabadi [github](https://github.com/mmnasrabadi)
import UIKit
protocol CodablePro: Codable {
func toJsonString() -> String
typealias JSON = [String : Any]
func toDictionary() -> JSON?
init?(json: JSON)
@MMnasrabadi
MMnasrabadi / Demo.swift
Created June 20, 2020 11:20 — forked from AliSoftware/Demo.swift
NestableCodingKey: Nice way to define nested coding keys for properties
struct Contact: Decodable, CustomStringConvertible {
var id: String
@NestedKey
var firstname: String
@NestedKey
var lastname: String
@NestedKey
var address: String
enum CodingKeys: String, NestableCodingKey {
import Foundation
protocol TransformerType {
associatedtype BaseType
associatedtype TypeForCoding: Codable
static var encodeTransform: (BaseType) throws -> TypeForCoding { get }
static var decodeTransform: (TypeForCoding) throws -> BaseType { get }
}
@propertyWrapper