Skip to content

Instantly share code, notes, and snippets.

View sooraj12's full-sized avatar
🎯
Focusing

Sooraj C S sooraj12

🎯
Focusing
View GitHub Profile
@sooraj12
sooraj12 / add_to_zshrc.sh
Created April 7, 2025 20:46 — forked from karpathy/add_to_zshrc.sh
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
@sooraj12
sooraj12 / embedded-file-viewer.md
Created June 15, 2023 09:30 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@sooraj12
sooraj12 / gist:fd9bc8493a5745efe30314190570c797
Created October 30, 2022 10:50 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@sooraj12
sooraj12 / automate-merge.sh
Created October 30, 2022 09:22
used to automate the merging of feature branch with main branch and main branch with other stable branches
#!/usr/bin/env bash
function print {
printf "\n**$1**\n\n"
}
function main {
# feature branch
local feature_branch='feature-1'
# master branch