Skip to content

Instantly share code, notes, and snippets.

View khurshid-alam's full-sized avatar

Khurshid Alam khurshid-alam

View GitHub Profile
@jpillora
jpillora / icloud-dl.sh
Created February 7, 2021 06:47
Download iCloud link from Terminal
#!/bin/bash
# given "https://www.icloud.com/iclouddrive/<ID>#<Filename>
ID="...."
URL=$(curl 'https://ckdatabasews.icloud.com/database/1/com.apple.cloudkit/production/public/records/resolve' \
--data-raw '{"shortGUIDs":[{"value":"$ID"}]}' --compressed \
jq -r '.results[0].rootRecord.fields.fileContent.value.downloadURL')
curl "$URL" -o myfile.ext
@naimurhasan
naimurhasan / commit _file_to_git.py
Created October 12, 2021 10:01
Using pygithub upload file | Advantage do not need to clone the repo.
import base64
from github import Github
from github import InputGitTreeElement
g = Github("YOUR TOKEN")
# for org repo
# org = g.get_organization("NaimurDev")
# repo = org.get_repo('test_file')
name: "Development Build"
on:
push:
branches: [ development ]
pull_request:
branches: [ development ]
jobs:
Build:
@voodoohop
voodoohop / chatgpt_commit_messages.sh
Last active December 10, 2024 14:52
One-Liner Using ChatGPT for Concise, Automated Git Commit Messages
# install
pip install shell-gpt
sgpt "hi" (and enter your API key)
# commit the current folder with the generated message
git commit . -m "$(git diff | sgpt --model gpt-4o --code 'Write concise, informative commit messages: Start with a summary in imperative mood, explain the 'why' behind changes, keep the summary under 50 characters, use bullet points for multiple changes, avoid using the word refactor, instead explain what was done, and reference related issues or tickets. What you write will be passed to git commit -m "[message]"')"
# you could assign an alias now if you like it
@Swiss-Mac-User
Swiss-Mac-User / icon_maker.sh
Last active January 13, 2025 13:31
macOS shell script to create an .icns icon file from an image input file
#!/bin/zsh
# ================================================================================
# A macOS shell script to create an .icns icon file from an image input file
#
# NOTE: make this file executable first using:
# chmod +x /path/to/icon_maker.sh
#
# --------------------------------------------------------------------------------
# Source: https://gist.github.com/Swiss-Mac-User/7a1a55e499db618c59718cbffe23318c