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
socat \ | |
-v -d -d \ | |
TCP-LISTEN:1234,crlf,reuseaddr,fork \ | |
SYSTEM:" | |
echo HTTP/1.1 200 OK; | |
echo Content-Type\: text/plain; | |
echo; | |
echo \"Server: \$SOCAT_SOCKADDR:\$SOCAT_SOCKPORT\"; | |
echo \"Client: \$SOCAT_PEERADDR:\$SOCAT_PEERPORT\"; | |
" |
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
#!/usr/bin/env bash | |
# Call stockfish engine on mac and return only the evaluation score | |
# Usage stockfish.sh 'r1b2rk1/4qppp/2pp4/pp6/3Bn3/PB3Q1P/1PP2PP1/3R1RK1' 5 mac 12 1024 | |
# Usage stockfish.sh 'r1b2rk1/4qppp/2pp4/pp6/3Bn3/PB3Q1P/1PP2PP1/3R1RK1' 5 mac 12 1024 | |
# Assumes the stockfish binary is called 'stockfish_'+binary | |
fen=$1 | |
seconds=${2:-3} | |
binary=${3:-mac} | |
threads=${4:-12} |
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
local index1, index2 | |
set index1 to 3 -- 1920 x 1200 | |
set index2 to 4 -- 1280 x 800 | |
-- Launch "System Preferences", open the "Displays" options and change to the "Display" tab | |
tell application "System Preferences" | |
activate | |
set the current pane to pane id "com.apple.preference.displays" | |
reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays" |