Skip to content

Instantly share code, notes, and snippets.

View kazem3d's full-sized avatar
🎯
Focusing

kazem ghanati kazem3d

🎯
Focusing
View GitHub Profile
@hubgit
hubgit / README.md
Last active March 23, 2024 19:12
A5 printed card with HTML + CSS
  1. Clone this Gist.
  2. For card sizes other than A5, edit the size value in @page, and the height and width properties of body.
  3. Add contents to each face. The simplest approach is to add an image called front.png of the same dimensions as the card.
  4. Generate a PDF from the HTML + CSS. If using Prince, it's as simple as prince index.html card.pdf.
  5. Take the PDF to a printer, and ask them to print as many copies as you need.
@cansadadeserfeliz
cansadadeserfeliz / forms.py
Created May 13, 2014 14:26
Django: limit choices for model form
class ContactForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(ContactForm, self).__init__(*args, **kwargs)
self.fields['topic'].queryset = ContactTopic.objects.filter(
is_active=True,
)
class Meta:
model = ContactMessage
@kwcooper
kwcooper / watxt2csv.py
Last active September 27, 2023 12:58
To clean and convert a whatsapp txt file export to a CSV file
# To clean and convert a whatsapp txt file export to a CSV file
import pandas as pd
# read file by lines
file_path = "whatsapp.txt"
f = open(file_path, 'r')
data = f.readlines()
f.close()
@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active July 4, 2024 21:53
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/ \