Skip to content

Instantly share code, notes, and snippets.

View valakhosravi's full-sized avatar
🤓
Work hard

Vala Khosravi valakhosravi

🤓
Work hard
  • Iran
View GitHub Profile
@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active January 7, 2026 10:37
Install v2ray on Bridge:(Ubuntu +18 via systemd) - Upstream (Ubuntu +18/CentOS +7 via docker)

پنل x-ui

پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور

mkdir x-ui && cd x-ui
docker run -itd --network=host \
    -v $PWD/db/:/etc/x-ui/ \
 -v $PWD/cert/:/root/cert/ \

There's a workaround that might be useful for some people - use the Shadowsocks app for Android TV. Because that app only accepts a JSON configuration file, you need to convert the Outline key to JSON.

  1. Take the following JSON file template:
    {
        "server":"YOUR-SERVER",
        "server_port":12345,
        "local_port":1080,
        "password":"YOUR-PASSWORD",
        "method":"chacha20-ietf-poly1305",
# Read more about setting it up
# https://medium.com/@ljmocic/deploying-react-application-to-aws-s3-using-github-actions-85addacaeace
on:
push:
tags:
- '*'
jobs:
build:
@AmirSbss
AmirSbss / idpay.py
Created September 15, 2019 15:17
IDPay API interface for Python
import requests
import json
# DOCS: https://idpay.ir/web-service/v1.1/index.html
class IDPay:
API_URL = "https://api.idpay.ir/v1.1/payment"
@amrza
amrza / run.py
Last active November 16, 2025 11:00
How to write RTL(Arabic/Persian) text on images in python.
# Tested on Python 3.6.1
# install: pip install --upgrade arabic-reshaper
import arabic_reshaper
# install: pip install python-bidi
from bidi.algorithm import get_display
# install: pip install Pillow
from PIL import ImageFont
@johngrimes
johngrimes / nginx.conf
Created February 14, 2018 22:23
Ideal Nginx configuration for JavaScript single-page app
server {
listen 80;
root /usr/share/nginx/html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
gzip_comp_level 9;
etag on;
location / {
try_files $uri $uri/ /index.html;
}
@kmassada
kmassada / README.md
Last active September 10, 2021 08:29 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-available directory.
mkdir -p /usr/local/etc/nginx/sites-available

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default and default-ssl to /usr/local/etc/nginx/sites-available
    #STOP APACHE
    sudo apachectl stop
@mrdwab
mrdwab / SampleSize.R
Created May 21, 2011 17:35
R sample size and confidence interval calculation
###############################################################################
# Sample Size and Confidence Interval Calculation #
# v 1.3 by "Ananda Mahto"/mrdwab/ananda@mahto.info #
# 2011 May 17 #
# --------------------------------------------------------------------------- #
# #
# Example usage: #
# * sample.size.table(c.lev = c(90, 95, 98, 99), population = 378) #
# * sample.size(c.lev = 98, population = 200) #
# * confidence.interval(c.lev = 95, p.ss = 80, population = 100) #