Skip to content

Instantly share code, notes, and snippets.

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

Bunty Madan buntylm

🏠
Working from home
  • Grab
  • Singapore
  • 07:41 (UTC -12:00)
  • X @buntylm
View GitHub Profile
@buntylm
buntylm / CURL+URLRequest.swift
Created December 14, 2021 05:54
Extension for `URLRequest` to get the CURL out of it.
import Foundation
extension URLRequest {
public var curlString: String {
guard let url = url else { return "" }
var baseCommand = #"curl "\#(url.absoluteString)""#
if httpMethod == "HEAD" {
baseCommand += " --head"
@buntylm
buntylm / unit-test-static-func
Created May 22, 2021 04:17
How to write the Unit Test for static functions?
import Foundation
import AppTrackingTransparency
import PlaygroundSupport
protocol PrivacyManagerBridge {
static func requestTrackingAuthorization(completionHandler completion: @escaping (ATTrackingManager.AuthorizationStatus) -> Void)
}
extension ATTrackingManager: PrivacyManagerBridge {}
@buntylm
buntylm / SSH_Key.md
Created December 27, 2020 06:17
How to create SSH Key #Github #SSH
  1. Open terminal
  2. ssh-keygen -t rsa -b 4096 -C “<EMAIL ADDRESS>” (enter your email address)
  3. Just press Enter to save it on default location, which is /Users/<Account-Name>/.ssh/id_rsa.pub
  4. Copy on Clipboard pbcopy < ~/.ssh/id_rsa.pub
  5. Open Github Account and add SSH Key by pasting it into text-field.
@buntylm
buntylm / skip-mac-app-verification
Last active October 11, 2020 05:04
[Terminal Command] Skip verification for Mac applications
xattr -d com.apple.quarantine /path/to/app/<app-name>.app