This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: Sahel; | |
src: url('https://cdn.rawgit.com/rastikerdar/sahel-font/5d124266/dist/Farsi-Digits/Sahel-FD.eot'); | |
src: url('https://cdn.rawgit.com/rastikerdar/sahel-font/5d124266/dist/Farsi-Digits/Sahel-FD.eot?#iefix') format('embedded-opentype'), | |
url('https://cdn.rawgit.com/rastikerdar/sahel-font/5d124266/dist/Farsi-Digits/Sahel-FD.woff') format('woff'), | |
url('https://cdn.rawgit.com/rastikerdar/sahel-font/5d124266/dist/Farsi-Digits/Sahel-FD.ttf') format('truetype'); | |
font-weight: normal; | |
} | |
@font-face { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from subprocess import run, getoutput | |
from time import sleep | |
from pytg.sender import Sender | |
dlDir = "/tmp/es6/dl" | |
sentDir = "/tmp/es6/sent" | |
sender = Sender('localhost',6670) | |
to = "$050000007d208f3f0115b300fb607ab4" | |
ls = getoutput('find {} -name "*.*"'.format(dlDir)).splitlines() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from telegram.ext import Updater, Dispatcher, Job, CommandHandler | |
import logging | |
# Enable logging | |
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', | |
level=logging.INFO) | |
logger = logging.getLogger(__name__) | |
def error(bot, update, error): | |
"""Log Errors caused by Updates.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: Sahel; | |
src: url('https://cdn.jsdelivr.net/gh/rastikerdar/sahel-font@latest/dist/Farsi-Digits/Sahel-FD.eot'); | |
src: url('https://cdn.jsdelivr.net/gh/rastikerdar/sahel-font@latest/dist/Farsi-Digits/Sahel-FD.eot?#iefix') format('embedded-opentype'), | |
url('https://cdn.jsdelivr.net/gh/rastikerdar/sahel-font@latest/dist/Farsi-Digits/Sahel-FD.woff') format('woff'), | |
url('https://cdn.jsdelivr.net/gh/rastikerdar/sahel-font@latest/dist/Farsi-Digits/Sahel-FD.ttf') format('truetype'); | |
font-weight: normal; | |
} | |
@font-face { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openpyxl import load_workbook | |
from openpyxl.worksheet.worksheet import Worksheet | |
from requests import get | |
xlsxFileAddress = "/home/saeb/PycharmProjects/SendSMS/xlsx/139804.xlsx" #xlsx file | |
def sendToSMSCenter(phone="09133917225", text="سلام دنیا"): | |
params = { | |
"from": "+98100020400", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void getUserName(String xlsLocation) throws IOException { | |
FileInputStream file = new FileInputStream( new File(xlsLocation)); | |
Workbook workbook = new XSSFWorkbook(file); | |
Sheet sheet = workbook.getSheetAt(0); | |
for(Row row: sheet) | |
{ | |
Cell tenCell = row.getCell(0); | |
tenCell.setCellType(CellType.STRING); | |
Cell sixCell = row.getCell(1); | |
sixCell.setCellType(CellType.STRING); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip a|awk '{if ($1 ~ /^[0-9]:/) print $1 ; if (/inet/) print $2}' | |
1: | |
127.0.0.1/8 | |
::1/128 | |
2: | |
172.16.6.164/24 | |
fe80::681a:78de:211:28d2/64 | |
3: | |
192.168.122.1/24 | |
4: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
load_plugin_textdomain('gflimitbyday', | |
false, | |
basename(dirname(__FILE__)) . '/languages'); | |
} | |
add_action('init','gflimitbyday_add_languages'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#alias login "curl 'http://devapp01.icico.net.ir/oauth/token' -s -H 'Authorization: Basic U2FsZXM6cGFzc3dvcmQ=' -H 'Content-Type: application/x-www-form-urlencoded' --data 'grant_type=password&username=saeb&password=password'|jq '.access_token'" | |
#alias auth2 "echo \"Authorization: Bearer \" ( string replace -a '\"' '' (login))" | |
function nicico | |
set login (curl 'http://devapp01.icico.net.ir/oauth/token' -s -H 'Authorization: Basic U2FsZXM6cGFzc3dvcmQ=' -H 'Content-Type: application/x-www-form-urlencoded' --data 'grant_type=password&username=saeb&password=password'|jq '.access_token') | |
set auth2 (echo "Authorization: Bearer " ( string replace -a '"' '' $login)) | |
# echo $login $auth2 | |
curl -s -H $auth2 $argv | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import django_filters | |
from django.contrib.auth.models import User | |
from django.contrib.contenttypes.models import ContentType | |
from rest_framework import status | |
from rest_framework.generics import GenericAPIView | |
from rest_framework.mixins import ListModelMixin, RetrieveModelMixin, CreateModelMixin, DestroyModelMixin, \ | |
UpdateModelMixin | |
from rest_framework.request import Request | |
from rest_framework.response import Response |