Skip to content

Instantly share code, notes, and snippets.

View sae13's full-sized avatar

Saeb sae13

View GitHub Profile
@sae13
sae13 / 1server.json
Last active July 20, 2023 15:40
sinxbox-reality sample
{
"inbounds": [
{
"type": "vless",
"tag": "vless-in",
"listen": "::",
"listen_port": 1443,
"sniff": true,
"sniff_override_destination": true,
"domain_strategy": "ipv4_only",
@sae13
sae13 / config.json
Created June 24, 2023 04:54
sing-box client json config ./sing-box -c config2.json run
{
"log": {"level": "info"},
"dns": {},
"ntp": {},
"inbounds": [ {
"domain_strategy": "",
"listen": "0.0.0.0",
"type": "mixed",
"listen_port": 2081
}],
@sae13
sae13 / .env
Last active April 6, 2024 04:50
send latest versions of ss apks to telegram
DEBUG=10
TG_API_ID=61369
TG_API_HASH=a2a6455ff461sdfsdf532ce03795278fb92f56
TG_BOT_TOKEN=6281007953:AAHE4sdsdfsdfl9h3XsdfsdfJK6-yWhaTdxkCE8pxizJbXgqQ
TG_CHANNEL_ID=-1000000
@sae13
sae13 / code_melli_generator.py
Created March 1, 2023 07:11
code melli generator validator
import random
class NationalCode:
code_melli:str = None
def __init__(self,code_melli:str|int=None,starts_with='',with_numbers=[0,1,2,3,4,5,6,7,8,9]):
self.code_melli=str(code_melli).rjust(10,'0')
if code_melli is not None:
self.validate()
else:
self.code_melli=self.generate(with_numbers=with_numbers,starts_with=starts_with)
def validate(self):
@sae13
sae13 / ss_xray.sh
Last active October 8, 2024 10:45
install ss+xray
#!/bin/bash
export version_vray="$(curl -L -s -o /dev/null -w %{url_effective} https://github.com/shadowsocks/v2ray-plugin/releases/latest|rev|cut -d/ -f1|rev)"
export version_xray="$(curl -L -s -o /dev/null -w %{url_effective} https://github.com/teddysun/xray-plugin/releases/latest|rev|cut -d/ -f1|rev)"
export version_ss="$(curl -L -s -o /dev/null -w %{url_effective} https://github.com/shadowsocks/shadowsocks-rust/releases/latest|rev|cut -d/ -f1|rev)"
export version_singbox="$(curl -L -s -o /dev/null -w %{url_effective} https://github.com/SagerNet/sing-box/releases/latest|rev|cut -d/ -f1|rev)"
export v_singbox="${version_singbox:1}"
export url_vray="https://github.com/shadowsocks/v2ray-plugin/releases/download/$version_vray/v2ray-plugin-linux-amd64-$version_vray.tar.gz"
export url_xray="https://github.com/teddysun/xray-plugin/releases/download/$version_xray/xray-plugin-linux-amd64-$version_xray.tar.gz"
export url_ss="https://github.com/shadowsocks/shadowsocks-rust/releases/download/$version_ss/shadowsocks-$v

Shadowsocks

https://github.com/shadowsocks/shadowsocks-rust/releases/

Xray

https://github.com/teddysun/xray-plugin/releases/

shadowsocks command

/home/saeb/ssr/ss/ssservice server -s 127.0.0.1:11080 -k pa33word -m chacha20-ietf-poly1305 --plugin /home/saeb/ssr/xtls/xray-plugin_linux_amd64 --plugin-opts server -v

nginx config

@sae13
sae13 / Audit.py
Created May 22, 2022 09:38
Django Audit Model
class Audit(models.Model):
created_date = models.DateTimeField(auto_now_add=True, verbose_name=gettext('created_date'))
created_by = models.CharField(max_length=255, verbose_name=gettext('created by'))
last_modified_date = models.DateTimeField(auto_now=True, verbose_name=gettext('last modified date'))
last_modified_by = models.CharField(max_length=255, blank=True, null=True, verbose_name=gettext('last modified by'))
description = models.CharField(max_length=255, blank=True, null=True, verbose_name=gettext('description'))
# extra_json = models.JSONField(blank=True, null=True, verbose_name=gettext('extra json'))
is_deleted = models.BooleanField(default=0, verbose_name=gettext('is deleted'))
DECLARE
first_owner varchar2(40) := 'SOURCE_USER_NAME'; --SOURCE SCHEMA
grant_to varchar2(40) := 'TARGET_USER_NAME'; --USER WHO WANTS GRANT
BEGIN
FOR r IN (
@sae13
sae13 / iptables.restore.sh
Last active September 25, 2021 19:03
redirect iran ip to transport
# Generated by iptables-save v1.8.7 on Sat Sep 25 18:49:08 2021
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [1734:238204]
:OUTPUT ACCEPT [0:0]
:DOCKER - [0:0]
:DOCKER-ISOLATION-STAGE-1 - [0:0]
:DOCKER-ISOLATION-STAGE-2 - [0:0]
:DOCKER-USER - [0:0]
COMMIT
@sae13
sae13 / delete_tables.sql
Created March 30, 2021 04:59
delete all tables in postgreSQL
do $$
declare
q record
begin
for q in SELECT 'drop table ' || tablename query
FROM pg_catalog.pg_tables
WHERE schemaname != 'pg_catalog' AND
schemaname != 'information_schema'
loop execute immediate q.query;
end loop