Skip to content

Instantly share code, notes, and snippets.

View mahdizojaji's full-sized avatar
:octocat:
Working from home

Mahdi Zojaji mahdizojaji

:octocat:
Working from home
View GitHub Profile
@mahdizojaji
mahdizojaji / disable-keyborad.desktop
Created March 10, 2024 07:13
Disable specific keyboard
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Name=Clavier ON-OFF
Exec=bash disable-keyborad.sh
Path=/home/mahdi/Music/
NoDisplay=false
Categories=Utility;
StartupNotify=false
@mahdizojaji
mahdizojaji / buynow_calculator.js
Last active February 12, 2024 14:11
buynow paid calculator
var total = 0;
const paid_amounts = document.getElementsByClassName("purchase-amount-number");
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g];
var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g];
fixNumbers = function (str)
{
if(typeof str === 'string')
{
@mahdizojaji
mahdizojaji / .env
Created January 8, 2024 18:41
Simple Bale Lib
TOKEN=
version: "3"
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://example.com'
registry_external_url 'https://reg.example.com'
mattermost_external_url 'https://mattermost.example.com'
@mahdizojaji
mahdizojaji / captcha_image_generator.py
Created July 21, 2021 13:04
Generate captcha image
def create_captcha_image() -> List[Union[BytesIO, str]]:
def rand_color_one():
return random.randint(64, 255), random.randint(64, 255), random.randint(64, 255)
def rand_color_two():
return random.randint(32, 127), random.randint(32, 127), random.randint(32, 127)
def rand_str():
result = [
random.choice([chr(_) for _ in range(1570, 1595)]),
from requests import get
from redis import Redis
from flask import Flask, jsonify
from threading import Thread
app = Flask(__name__)
class JobDB:
redis = Redis(decode_responses=True)
@mahdizojaji
mahdizojaji / movie_finder.py
Created October 21, 2019 12:18
find movie
from requests import get
from bs4 import BeautifulSoup
from re import search
def get_all_urls():
urls = [
'http://dl8.sabadl.xyz/ali/',
'http://dl8.sabadl.xyz/ali/1/',
'http://dl8.sabadl.xyz/ali/2/',
@mahdizojaji
mahdizojaji / README.md
Last active April 15, 2021 23:12
delete self messages

Delete all self messages (when user not admin of telegram group) [with pyrogram]

  • Requirements:

    1. pip3 install pyrogram
    2. pip3 install -U pyrogram[fast]
  • Usag:

    1. Get your api-id & api-hash then Insert these on Client parameters.
    2. Enter command python3 delete_self_msg.py (if your region has limited: torsocks python3 delete_self_msg.py)
  • Community:

#!/usr/bin/python2
import requests
import os
import sys
import random
import string
FILTERS = [
"smile",
"smile_2",
@mahdizojaji
mahdizojaji / CheckPayment.py
Created September 2, 2018 21:36
چک کردن تراکنش کارت به کارت بانک ملی
# trans_id -> شماره ارجاع یا پیگیری
# card -> چهار رقم آخر شماره کارت بانکی
# amount -> مبلغ تراکنش به ریال
# با تغییر در کد میتوانید کلیه تراکنش هارو چک کنید. ولی این فقط برای تراکنش های ورودی کارت به کارت هستش
def check_payment(trans_id, card, amount):
login_url = 'https://my.bmi.ir/portalserver/j_spring_security_check'
headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json'}
username = ''