Skip to content

Instantly share code, notes, and snippets.

View salehi's full-sized avatar

SS Salehi salehi

View GitHub Profile
@salehi
salehi / ttfb.sh
Created September 29, 2021 11:27 — forked from sandeepraju/ttfb.sh
curl command to check the time to first byte
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
@salehi
salehi / zoho_send_email.py
Created September 5, 2021 07:57 — forked from frankyxhl/zoho_send_email.py
Python script to send email by zoho.com's mail service
# Code from best solution in page below:
# https://help.zoho.com/portal/community/topic/zoho-mail-servers-reject-python-smtp-module-communications
import smtplib
from email.mime.text import MIMEText
from email.header import Header
from email.utils import formataddr
# Define to/from
sender = '[email protected]'
lst = [
{"current_time":1618861512,"success":True,"data":[{"id":590,"company":{"name":"افسران جنگ نرم","name_en":"Afsaran","company_slug":"afsaran","logo":"/company/afsaran/9f7d4c70-403a-11e9-ae0e-273fe94d6d59.png"},"job":{"job_slug":"full-stack","name":"Full Stack"},"title":"شرکت افسران جنگ نرم درخواست رسمی خود را مبنی بر عدم به اشتراک گذاری این اطلاعات بر روی پلتفرم جابگای ابلاغ کرده و به این منظور جابگای مجبور به حذف این اطلاعات میباشد.","description":"شرکت افسران جنگ نرم درخواست رسمی خود را مبنی بر عدم به اشتراک گذاری این اطلاعات بر روی پلتفرم جابگای ابلاغ کرده و به این منظور جابگای مجبور به حذف این اطلاعات میباشد.","vote_count":0,"down_vote_count":2,"vote_state":"NONE","view_count":61,"over_all_rate":0,"created":"2020-06-10 18:37","my_review":False,"state":"FULL","approved":True,"has_legal_issue":True}],"message":None,"total":1,"show_type":"TOAST","index":0},
{"current_time":1618861554,"success":True,"data":[{"id":60,"company":{"name":"آپاسای داده سیستم","name_en":"Apasai Dade System","company_sl
from typing import List
import os
# pip install python-gitlab
from gitlab import Gitlab
from gitlab.v4.objects import Project, ProjectRegistryRepository, GitlabDeleteError
if __name__ == '__main__':
gl = Gitlab(os.environ['GITLAB_URL'], private_token=os.environ['TOKEN'])
projects: List[Project] = gl.projects.list(all=True)
@salehi
salehi / php.ini
Created March 1, 2020 12:18
tunning
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@salehi
salehi / keybase.md
Created December 11, 2019 22:47
Prove

Keybase proof

I hereby claim:

  • I am salehi on github.
  • I am s4l3h1 (https://keybase.io/s4l3h1) on keybase.
  • I have a public key ASAOyGfGVIPZh-oiGvYehIXxjgbGUErd36Uj8ISiJDWr_wo

To claim this, I am signing this object:

@salehi
salehi / gist:a0ae6d6ae9fcdae759895f69eb8bf143
Created September 18, 2019 21:20 — forked from trey/gist:5373343
Free Marvel #1s
15-Love #1
5 Ronin #1 (of 5)
A + X #1
A-Babies vs. X-Babies #1
AVX: Consequences #1 (of 5)
AVX: VS. #1 (of 6)
Age of Apocalypse #1
Age of Apocalypse: Sinister Bloodlines
Age of X Universe #1 (of 2)
Age of X: Alpha #1
@salehi
salehi / ipa_cert_checker.py
Created September 15, 2019 20:26 — forked from ronsims2/README.md
A script that will confirm if a specified IPA file was signed with the specified certificate.
import subprocess
import sys
import zipfile
import bs4
import base64
if len(sys.argv) != 3:
print('Invalid number of arguments.')
exit(1)
ffmpeg -i death_valley.mp4 -c:a copy -vf "subtitles=en.vtt:force_style='FontName=Arial Bold,FontSize=22,PrimaryColour=&H0009FAFD,OutlineColour=&H00000000'" -f segment -segment_time 30 -segment_format_options movflags=+faststart out%03d.mp4
docker run -it --rm --name certbot -v "/etc/letsencrypt:/etc/letsencrypt" -v "/var/lib/letsencrypt:/var/lib/letsencrypt" certbot/certbot certonly --agree-tos -m [email protected] -d *.snapp.market --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges=dns-01