Skip to content

Instantly share code, notes, and snippets.

View erfanhs's full-sized avatar
🎯
Focusing

Erfan Harirsaz erfanhs

🎯
Focusing
  • Mashhad, Iran
View GitHub Profile
{"remarks":"🇩🇪 𝐈𝐑𝐂𝐏 | @Ln2Ray hiiiiiiiii","dns":{"servers":["1.1.1.2","1.0.0.2"]},"policy":{"system":{"statsOutboundUplink":true,"statsOutboundDownlink":true}},"log":{"access":"","error":"","loglevel":"warning"},"inbounds":[{"tag":"socks","port":10808,"listen":"127.0.0.1","protocol":"socks","sniffing":{"enabled":true,"destOverride":["http","tls"],"routeOnly":false},"settings":{"auth":"noauth","udp":true,"allowTransparent":false}},{"tag":"http","port":10809,"listen":"127.0.0.1","protocol":"http","sniffing":{"enabled":true,"destOverride":["http","tls"],"routeOnly":false},"settings":{"auth":"noauth","udp":true,"allowTransparent":false}},{"tag":"api","port":9090,"listen":"127.0.0.1","protocol":"dokodemo-door","settings":{"udp":false,"address":"127.0.0.1","allowTransparent":false}}],"outbounds":[{"tag":"proxy","protocol":"vless","settings":{"vnext":[{"address":"c.88981401.xyz","port":443,"users":[{"id":"5bdf790f-0af2-4481-a624-41b66e7e3489","alterId":0,"email":"IRCP","security":"auto","encryption":"none"}]}]},"str
@erfanhs
erfanhs / resize.py
Last active November 23, 2022 10:24
Get new dimensions by changing width or height ( remain aspect ratio )
def gcd(x, y): # Simplify Fraction (Greatest common divisor)
if (x < y):
temp = x
x = y
y = temp
while (y != 0):
remainder = x % y
x = y
y = remainder
r = x
@erfanhs
erfanhs / writeOnImage.py
Last active March 9, 2021 09:50
write persian text on image (python+pillow)
import arabic_reshaper # pip install arabic-reshaper
from bidi.algorithm import get_display # pip install python-bidi
from PIL import ImageFont, Image, ImageDraw # pip install Pillow
def wrap(text, maxLen):
res_lines = []
for line in text.split('\n'):
lines = []
words = line.split(' ')
line = ''
### Keybase proof
I hereby claim:
* I am erfanhs on github.
* I am erfoon (https://keybase.io/erfoon) on keybase.
* I have a public key ASA_MoCunSQ8x8Ph-sIFK9cInnNc77Vf76nv88XEoR4vcwo
To claim this, I am signing this object:
@erfanhs
erfanhs / twitter_vdl.py
Created June 1, 2020 10:04
download twitter videos with python
import requests
from bs4 import BeautifulSoup
from pathlib import Path
# github.com/erfanhs
# download with twittervideodownloader.com
class Downloader:
def __init__(self, output_dir='./output/'):