Skip to content

Instantly share code, notes, and snippets.

View mahdi-malv's full-sized avatar

Mahdi Malvandi mahdi-malv

View GitHub Profile
@mahdi-malv
mahdi-malv / todo-pre-commit.sh
Last active March 6, 2024 16:25 — forked from shahin-you/pre-commit
Block the commit if there was unmentioned TODO
#!/bin/sh
# Check for "TODO" in staged files
TODO_FOUND=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.(kt|java|xml|kts|properties)$' | xargs -r grep -l 'TODO')
if [ ! -z "$TODO_FOUND" ]; then
echo "🔴 These TODOs are not refering to any task"
echo "$TODO_FOUND"
echo "Consider addressing the TODOs or creating tickets for them before committing."
# Uncomment the next line to block the commit until TODOs are addressed
@mahdi-malv
mahdi-malv / configure_dns.sh
Created July 11, 2022 21:03 — forked from smhdhsn/configure_dns.sh
Dynamic shecan.ir configurator.
#! /bin/bash
#####################################################
# Fetch DNS configurations from shecan.ir #
#####################################################
set -e
reset=`tput sgr0`
red=`tput setaf 1`
@mahdi-malv
mahdi-malv / AdbCommands.md
Created July 1, 2019 09:06 — forked from Pulimet/AdbCommands
Adb useful commands list

Adb Server

adb kill-server
adb start-server 

Adb Reboot

adb reboot
adb reboot recovery