Skip to content

Instantly share code, notes, and snippets.

View alisafariir's full-sized avatar
🎯
Focusing

Ali Safari alisafariir

🎯
Focusing
View GitHub Profile
@alisafariir
alisafariir / monitor_docker.sh
Last active April 7, 2025 16:53
Set Up Docker Containers Alerts on Telegram
# create /usr/local/bin/monitor_docker.sh
# sudo chmod +x /usr/local/bin/monitor_docker.sh
#!/bin/bash
# Telegram bot settings
BOT_TOKEN="your_bot_token_here"
CHAT_ID="your_chat_id_here"
# Function to send Telegram message
@alisafariir
alisafariir / gsettings.bash
Last active April 26, 2023 19:59
Switch input language by shift and alt in ubuntu
$ gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L','<Shift>Alt_R']"
$ gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Alt>Shift_L','<Alt>Shift_R']"
@royz
royz / MongoDB.md
Last active July 16, 2024 22:15
MongoDB - install, enable authentication & remote access on Ubuntu 20.04

Install MongoDB 5.x

Source: MongoDB Docs

1. Import the public key used by the package management system

wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -

2. Create a list file for MongoDB

@MoienTajik
MoienTajik / iranian-phone-numbers-regex.md
Last active May 11, 2025 11:51
Regex For Iranian Mobile Phone Numbers

Regex For Iranian Phone Numbers

This regex supports all kinds of Iranian mobile phone numbers :

^(\+98|0)?9\d{9}$


Regex Visualized

@PurpleBooth
PurpleBooth / README-Template.md
Last active August 13, 2025 09:33
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites