This file contains 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
package main | |
import ( | |
"fmt" | |
"strings" | |
) | |
// https://play.golang.org/p/-U255E1eOf_O | |
func main() { | |
org := "ÀØėÿᾜὨζὅБю Yoùr Śtring šđč枊ĐČĆŽèàì - øÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ" |
This file contains 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
# if you don't understand how to save this file and execute it (open reset-audio.command) | |
# then copy and paste this oneliner and enter your password for privileged access: | |
# sudo kill -9 $(ps axc|awk "{if (\$5==\"coreaudiod\") print \$1}"); | |
# get the process ID of coreaudio | |
PID=$(ps axc|awk "{if (\$5==\"coreaudiod\") print \$1}") | |
if [ $PID != "" ] | |
then | |
echo "Killing coreaudiod process on $PID" |
This file contains 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
# connect to ssh host on a specific port and open the local port (8123 in this case) | |
ssh -D 8123 -f -C -q -N user@example.com -p 1022 | |
# setup the socks proxy for the Wi-Fi adapter to connect to port 8123 | |
networksetup -setsocksfirewallproxy "Wi-Fi" localhost 8123 | |
# wait till user presses a key to revert changes | |
read -p "Setup. Please connect. Press enter key to disconnect" | |
# turn off socks proxy | |
networksetup -setsocksfirewallproxystate "Wi-Fi" off | |
# kill the ssh command | |
kill -15 $(ps aux | grep "[s]sh -D" | awk '{ print $2}') |