Skip to content

Instantly share code, notes, and snippets.

View shan-shaji's full-sized avatar
🧑‍💻
Coding Remotely

Shan Shaji shan-shaji

🧑‍💻
Coding Remotely
View GitHub Profile
@amn41
amn41 / gpt.sh
Created March 2, 2023 08:40
chatGPT on the command line - add to your bashrc/zshrc
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'
}
@sma
sma / terminal-flutter.md
Last active October 3, 2024 19:12
For fun, I wrote a Flutter-like framework for command line applications

Terminal Flutter

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|
| |
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active April 8, 2025 12:17
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

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:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@alexpchin
alexpchin / Setting_upa_new_repo.md
Last active March 28, 2025 14:18
Create a new repository on the command line

Setting up a new Git Repo

##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