Skip to content

Instantly share code, notes, and snippets.

View mahdyar's full-sized avatar
🌱

Mahdyar Hasanpour mahdyar

🌱
View GitHub Profile
@mahdyar
mahdyar / whichiswhich.sh
Last active March 1, 2021 14:46
Detect which apps are running under Rosetta2 or native on Apple Silicon M1.
for appFolder in /Applications/*/ ; do
cd "$appFolder/Contents/MacOS/" 2> /dev/null
if [[ "$?" != 0 ]]; then continue; fi
for file in * ; do
if [ ! -d "$file" ] && [[ $file != *"."* ]]; then
architecture=$(file "$file")
if [[ $architecture != *"arm64"* ]]; then
echo "\"$file\" doesn't support arm64."
@mahdyar
mahdyar / ir-whois.go
Last active January 30, 2021 21:21
Whois lookup script written in Golang for .ir domains
package main
import (
"fmt"
"net"
)
/*************************************************************************