Skip to content

Instantly share code, notes, and snippets.

View erfan-mehraban's full-sized avatar
😎
correcting ";" mismatch

Erfan Mehraban erfan-mehraban

😎
correcting ";" mismatch
View GitHub Profile
@erfan-mehraban
erfan-mehraban / temp-email-domains
Last active April 10, 2021 06:15
temporary and disposable email domains. (source: merge of presented list in https://gist.github.com/adamloving/4401361)
0-00.usa.cc
001.igg.biz
027168.com
0815.ru
0815.ry
0815.su
0845.ru
0ak.org
0box.eu
0clickemail.com
@erfan-mehraban
erfan-mehraban / shadowsocks_note.txt
Created March 27, 2019 05:32
setup shadowsocks
sudo apt-get install python3-pip
# sudo pip3 install shadowsocks
sudo pip3 install -U git+https://github.com/shadowsocks/shadowsocks.git@master
# LLc error: $ export LC_ALL=C
config: /etc/shadowsocks.json
{
"server": "::",
"port_password": {
"8000": "PASSWORD",
@erfan-mehraban
erfan-mehraban / merge_and_convert_recorder_video.sh
Created February 22, 2019 12:14
By this bash and ffmpeg tool, I merge and convert(resize) long recorded videos from my phone. You can set output file name as an argument.
echo "" > concat.list;
for f in ./*.mp4; do echo "file '$f'" >> concat.list; done;
ffmpeg -f concat -safe 0 -i concat.list -c copy output.mp4;
ffmpeg -i output.mp4 -vcodec libx264 -crf 21 $@.mp4;
@erfan-mehraban
erfan-mehraban / unsigned_related_django_model_field.py
Last active October 12, 2018 18:22
UnsignedForeignKey and UnsignedManyToMany field for django models (diango version == 2.0)
@erfan-mehraban
erfan-mehraban / union_django_filter_backend.py
Last active June 18, 2019 12:28
filter for union all model field (in query param) for django rest framework
from rest_framework import filters
from django.db.models import Q
class UnionFilterBackend(filters.BaseFilterBackend):
"""
Filter that make union queryset with given query parametes
and model filter wich defined in filter_fields
Usage:
[url]/?foo=bar&foo=baz&xyzzy=qux
queryset will be : [queryset].filter(foo=bar or foo=baz or xyzzy=qux)
@erfan-mehraban
erfan-mehraban / README-Template.md
Created August 20, 2018 11:28 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites