Skip to content

Instantly share code, notes, and snippets.

View sae13's full-sized avatar

Saeb sae13

View GitHub Profile

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
function kutt
set API "5deD1GnnzAvAcp5updIjNvbnolj7jkEiI6~yi"
set mainDomain "https://69b.ir/"
set URL $mainDomain"api/v2/links"
set date (date "+%N")
set custom (string sub -l 6 $date)
if test $argv[2]
set custom $argv[2]
end
set newUrl $mainDomain$custom
@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
@sae13
sae13 / ValaGenre.py
Last active December 29, 2020 17:15
#!/usr/bin/env python3
import concurrent.futures
import logging
import re
from sys import argv
if '-v' in argv:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
@sae13
sae13 / style.css
Last active October 26, 2020 12:27
Vazir shabnam sahel css
@font-face {
font-family: Vazir;
src: url('https://cdn.rawgit.com/rastikerdar/vazir-font/3fce13ac/dist/Vazir.eot');
src: url('https://cdn.rawgit.com/rastikerdar/vazir-font/3fce13ac/dist/Vazir.eot?#iefix') format('embedded-opentype'),
url('https://cdn.rawgit.com/rastikerdar/vazir-font/3fce13ac/dist/Vazir.woff2') format('woff2'),
url('https://cdn.rawgit.com/rastikerdar/vazir-font/3fce13ac/dist/Vazir.woff') format('woff'),
url('https://cdn.rawgit.com/rastikerdar/vazir-font/3fce13ac/dist/Vazir.ttf') format('truetype');
font-weight: normal;
}
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, RegexHandler, StringRegexHandler, BaseFilter)
from telegram import MessageEntity
import logging
group_admins = {}
# Enable logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO)
@sae13
sae13 / php iran phone regex
Created July 7, 2020 16:54
رجکس شماره مبایل
<?php
$a = "9133917225";
$mobile_pattern = "/^(\s)*(\+98|0098|98|0)?(9\d{9})(\s*|$)/";
preg_match($mobile_pattern,$a,$matches);
if(sizeof($matches) === 5)
var_dump($matches[3]);