Skip to content

Instantly share code, notes, and snippets.

محسن داوری parsibox

Block or report user

Report or block parsibox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@parsibox
parsibox / soap.php
Created Jul 13, 2019
send long number in php soap
View soap.php
<?php
$parm = array();
$parm[] = new SoapVar('27809804001843174', XSD_STRING, null, null, 'ns1:payerId' );
$parm[] = new SoapVar('13980416', XSD_STRING, null, null, 'ns1:persianDate' );
$typedVar = new SoapVar($parm, SOAP_ENC_OBJECT);
$my_res=$client->__call("getTransactionByPayerId", array($typedVar ) );
?>
@parsibox
parsibox / remove.sh
Created Jul 13, 2019
remove line contain a string
View remove.sh
sed -i "/\b\(nf_conntrack_max\)\b/d" /etc/sysctl.conf
@parsibox
parsibox / php-fpm-cpu.sh
Last active Jul 7, 2019
php-fpm-cpu - test Wait a while, then hit Ctr-C
View php-fpm-cpu.sh
sudo strace -f $(pidof php-fpm | sed 's/\([0-9]*\)/\-p \1/g')
sudo strace -c -f $(pidof php-fpm | sed 's/\([0-9]*\)/\-p \1/g')
View cronjob.sh
list
crontab -l | grep sms
add
echo "* * * * * cd /var/www/html/core/cron/;/usr/bin/php70 xxxx.php >/dev/null 2>&1 " >> /var/spool/cron/root
remove
crontab -l | grep -v 'sms' | crontab -
@parsibox
parsibox / read_file_and_convert_to_single_line_in_variable.sh
Created Jun 13, 2019
reading a file and convert it to single line variable in bash script
View read_file_and_convert_to_single_line_in_variable.sh
DATE="$(awk '{ printf "%s", $0 }' /var/www/s.php)" ;
@parsibox
parsibox / jquery-change-css-variables.html
Created May 27, 2019
change css variables with jquery!
View jquery-change-css-variables.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
--color: blue;
background-color: var(--color);
}
</style>
@parsibox
parsibox / svg-save.js
Created May 26, 2019
save svg on page - You can run this code on your javascript console:
View svg-save.js
var e = document.createElement('script');
e.setAttribute('src', 'https://nytimes.github.io/svg-crowbar/svg-crowbar.js');
e.setAttribute('class', 'svg-crowbar');
document.body.appendChild(e);
@parsibox
parsibox / persian_harf.php
Created May 13, 2019
persian alphabet in php array
View persian_harf.php
<?php
$persian_harf['1']='الف';
$persian_harf['2']='ب';
$persian_harf['3']='پ';
$persian_harf['4']='ت';
$persian_harf['5']='ث';
$persian_harf['6']='ج';
$persian_harf['7']='چ';
$persian_harf['8']='ح';
$persian_harf['9']='خ';
@parsibox
parsibox / nginx.conf
Created May 13, 2019
proxy nodejs on nginx on folder!
View nginx.conf
location ^~/nodejs {
proxy_pass http://127.0.0.1:9001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Fowarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Fowarded-Proto $scheme;
@parsibox
parsibox / bank.php
Created May 9, 2019
iranian payment card bank name
View bank.php
<?php
$card_bank['ملی قدیمی']='170019';
$card_bank['توسعه صادرات']='207177';
$card_bank['عرب']='447525';
$card_bank['پاسارگاد - فناپ']='502229';
$card_bank['اعتباری شهر']='502806';
$card_bank['سپه']='589210';
$card_bank['رفاه']='589463';
$card_bank['مرکزی']='599999';
$card_bank['اهلی']='601287';
You can’t perform that action at this time.