Skip to content

Instantly share code, notes, and snippets.

View 54keesh's full-sized avatar
💭
Working on web

M kashif 54keesh

💭
Working on web
View GitHub Profile
@54keesh
54keesh / git-commit-styleguide.md
Created October 17, 2025 11:29 — forked from rishavpandey43/git-commit-styleguide.md
This gist consist of the rules and best practice of good conventional git commit message

Git Commit Messages Style-Guides

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji

Types

@54keesh
54keesh / script.sh
Created October 14, 2025 08:40
commit unstaged files directly
git commit -m "Commit only unstaged changes" $(git diff --name-only)
@54keesh
54keesh / linux-create-desktop-shortcut.txt
Last active September 9, 2025 10:00
Script to create desktop icons from standalone app images
!# /bin/bash
cp app.AppImage ~/Applications/app.appimage
// following is the .desktop file to be placed in ~/.local/share/applications/
/** app.desktop **/
[Desktop Entry]
Name=file name
Exec=/home/username/Applications/app.appimage
Terminal=false
@54keesh
54keesh / commit_messages.sh
Last active August 15, 2025 05:51
A script to group commit messages by date and log them on the console
#! /bin/bash
# This script groups commit messages by date for the current user and logs them on the console - ignores merge commits
FROM="2025-08-15";
TO="2025-08-15";
git log --no-merges --all --author="$(git config user.email)" --since="$FROM 00:00" --until="$TO 23:59" --date=short --pretty=format:'%ad%x09%s' | awk -F'\t' 'NR==1{d=$1; print d; print $2; next} $1!=d{print ""; d=$1; print d} {print $2}'

(Working as of 2025-02-09)

There are websites that use disable-devtool to prevent you from opening or using devtools. They typically prevent you from right clicking or using the keyboard shortcut to open devtools. Even if you successfully do so, they detect it and redirect you elsewhere. You can bypass this by using one of the following ways.

Opening devtools

If the shortcut F12 on Windows or Option + ⌘ + I on Mac do not work. Press the three vertically aligned dots in the top right corner of your Google Chrome or Microsoft Edge window. Under the section "More Tools", you'll see the option to select "Developer Tools" which opens the toolkit in your window.

@54keesh
54keesh / git_pull.apache
Created July 21, 2024 19:58
git pull via other user in apache/nginx based deployments
OPTIONAL
ensure pulling is possible via www-data user
-> sudo -u www-data git pull
if not add it in visudo
-> git ALL = (www-data) /usr/bin/git pull
add ubuntu to www-data group
-> sudo usermod -aG www-data ubuntu
@54keesh
54keesh / ssh-hostname-unhash.sh
Created July 15, 2024 07:37 — forked from xxorax/ssh-hostname-unhash.sh
Unhash the hostnames hashed in your known_hosts file by passing their names.
#!/bin/bash
# based on http://unix.stackexchange.com/questions/175071/how-to-decrypt-hostnames-of-a-crypted-ssh-known-hosts-with-a-list-of-the-hostna/175199#175199
function replace {
host="$1"
found=$(ssh-keygen -F "$host" 2>/dev/null | grep -v '^#' | sed "s/^[^ ]*/$host/")
if [ -n "$found" ]; then
ssh-keygen -R "$host" &>/dev/null
echo "$found" >>~/.ssh/known_hosts
echo "Found and replaced: $host"
@54keesh
54keesh / multiple_ssh_setting.md
Created February 2, 2024 11:55 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@54keesh
54keesh / multiple_ssh_setting.md
Created February 2, 2024 11:55 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@54keesh
54keesh / .tmux.conf
Created February 2, 2024 08:25 — forked from justinwalz/.tmux.conf
basic tmux conf
# allow reload of this file with PRE r
bind r source-file ~/.tmux.conf \; display "Reloaded."
# switch prefix to control-a, unmap b, allow double-a to go through
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# -r repeat time (Default 500 millis)
set -g repeat-time 2000