Skip to content

Instantly share code, notes, and snippets.

View aliinreallife's full-sized avatar

Ali Rashidi aliinreallife

View GitHub Profile
@aliinreallife
aliinreallife / .bashrc
Created April 27, 2025 05:57
A small shell function to safely find and kill the process using a specific port, with confirmation prompt; works for Fish, Bash, and Zsh.
killport() {
port=$1
pid=$(lsof -t -i :$port)
if [ -n "$pid" ]; then
echo "Process using port $port:"
lsof -i :$port
echo
read -p "Are you sure you want to kill PID $pid? (y/n) " confirm
if [ "$confirm" = "y" ]; then
kill -9 $pid
@aliinreallife
aliinreallife / persian_job_titles_categorized.json
Created November 27, 2024 13:17
This Gist contains a categorized list of job titles in Persian, sourced from the "معرفی مشاغل" section of www.e-estekhdam.com. The data is organized into fields such as Engineering, Healthcare, Arts, Education, and more. This dataset can be used for research, applications, and other purposes requiring job title classification.
{
"engineering": [
"مهندس برق", "مهندس معماری", "مهندس شیمی", "مهندس سخت افزار", "مهندس هوافضا", "مهندس دریا",
"مهندس کشاورزی", "مهندس بهداشت حرفه ای", "مهندس عمران", "مهندس صنایع", "مهندس نفت",
"مهندس رباتیک", "مهندس معدن", "مهندس پزشکی", "مهندس بهداشت محیط", "مهندس راه آهن",
"مهندس مکانیک", "مهندس مواد (متالورژی)", "مهندس پلیمر", "مهندس هسته ای", "مهندس نساجی",
"مهندس شهرسازی"
],
"education_and_social_services": [
"استاد دانشگاه", "معلم", "معلم کودکان خاص", "مشاور شغلی", "پژوهشگر", "مترجم", "فیزیکدان",
@aliinreallife
aliinreallife / shecan-toggler.bat
Last active January 16, 2025 05:47
This script toggles your network's DNS settings between Shecan DNS (for bypassing restrictions) and the default automatic settings. It detects your active network adapter, updates the DNS configurationt. Simple, fast, and user-friendly.
@echo off
setlocal enabledelayedexpansion
REM Set the CMD window title
title Shecan Toggler
REM Check for admin privileges and self-elevate if needed
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...