For fun, I recreated a subset of Flutter that is sufficient to build a tiny Minesweeper application for the terminal.
Here is how it looks:
+----------------------+
|Minesweeper 3/12|
| |
function gpt() { | |
local url="https://api.openai.com/v1/chat/completions" | |
local model="gpt-3.5-turbo" | |
local body="{\"model\":\"$model\", \"messages\":[{\"role\": \"user\", \"content\": \"$1\"}]}" | |
local headers="Content-Type: application/json" | |
local auth="Authorization: Bearer ${OPENAI_API_KEY}" | |
curl -s -H "$headers" -H "$auth" -d "$body" "$url" \ | |
| jq -r '.choices[0].message.content' | |
} |
Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.
NOTE: This logic can be extended to more than two accounts also. :)
The setup can be done in 5 easy steps:
##Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:alexpchin/.git