Skip to content

Instantly share code, notes, and snippets.

@shahidghafoor00
shahidghafoor00 / ViewController.swift
Created April 26, 2022 20:33
open external links in iOS WKWebview like mailto:, whatsapp, tell etc..
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
if navigationAction.request.url?.scheme == "tel" || navigationAction.request.url?.scheme == "mailto" {
UIApplication.shared.open(navigationAction.request.url!)
decisionHandler(.cancel)
} else {
decisionHandler(.allow)
}
}
@shahidghafoor00
shahidghafoor00 / gist:63faf4058a89e00c748757cb58713d28
Last active October 28, 2021 14:06
create macOS Monterey bootable disk
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/yourUSBVolumeName
[ 2.877432] evm: security.SMACK64
[ 2.877432] evm: security.SMACK64EXEC
[ 2.877433] evm: security.SMACK64TRANSMUTE
[ 2.877433] evm: security.SMACK64MMAP
[ 2.877433] evm: security.apparmor
[ 2.877433] evm: security.ima
[ 2.877434] evm: security.capability
[ 2.877434] evm: HMAC attrs: 0x1
[ 2.877824] PM: Magic number: 5:564:46
[ 2.877844] event_source uprobe: hash matches
@shahidghafoor00
shahidghafoor00 / ssh.md
Created July 3, 2020 08:09 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test