Skip to content

Instantly share code, notes, and snippets.

View khurshid-alam's full-sized avatar

Khurshid Alam khurshid-alam

View GitHub Profile
@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
@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
name: "Development Build"
on:
push:
branches: [ development ]
pull_request:
branches: [ development ]
jobs:
Build:
@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')
@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
@probonopd
probonopd / Wayland.md
Last active April 16, 2025 20:29
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 18, 2025 18:48
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@om-henners
om-henners / podcast_app.py
Created July 3, 2019 14:02
Simple flask app to dummy up a Podcast RSS feed using Flask and feedgen. Written with Python 3.7
"""
Simple app that generates a podcasst XML feed for Radicalized
To be fair this could be easily adapted to any audiobook / set of NP3s - you'd
just need to change the image, the path to the music and all the descriptions.
Requires:
- feedgen
- flask
@MineBartekSA
MineBartekSA / catbox
Last active April 19, 2025 15:24
CatBox - An implementation of catbox.moe API in Bash
#!/bin/bash
#
# CatBox v2.0
# An implementation of catbox.moe API in Bash
# Author: MineBartekSA
# Gist: https://gist.github.com/MineBartekSA/1d42d6973ddafb82793fd49b4fb06591
# Change log: https://gist.github.com/MineBartekSA/1d42d6973ddafb82793fd49b4fb06591?permalink_comment_id=4596132#gistcomment-4596132
#
# MIT License
#
@pmkay
pmkay / top-brew-packages.txt
Last active April 22, 2025 12:10 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles