This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _get_collaborator_match() { | |
| local query="$1" | |
| local repo | |
| repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner) || return 1 | |
| local login_match | |
| login_match=$(gh api "repos/$repo/collaborators" --paginate --jq '.[].login' \ | |
| | grep -i "^$query" | head -n 1) | |
| if [[ -n "$login_match" ]]; then | |
| echo "$login_match" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "now": ["London","Lahore"] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo iptables -t nat -L | |
| sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func textOnImage(drawText text: String, inImage image: UIImage, atPoint point: CGPoint) -> UIImage { | |
| let textColor = UIColor.white | |
| let textFont = UIFont(name: "Helvetica Bold", size: 20)! | |
| let scale = UIScreen.main.scale | |
| UIGraphicsBeginImageContextWithOptions(image.size, false, scale) | |
| let textFontAttributes = [ | |
| NSAttributedString.Key.font: textFont, | |
| NSAttributedString.Key.foregroundColor: textColor, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Originally Created by Tadashi on 2017/03/02. | |
| /// Commented by Usman Nazir | |
| //IMPT | |
| //ADD A INDICATOR VIEW TO THE SCREEN AND LINK HERE TO AVOID CRASHES ALONG WITH A PLAY AND RECORD BUTTON | |
| import UIKit | |
| import AVFoundation | |
| import AudioToolbox |