Skip to content

Instantly share code, notes, and snippets.

View sinamiandashti's full-sized avatar
🏋️‍♀️
Focusing

sina miandashti sinamiandashti

🏋️‍♀️
Focusing
View GitHub Profile
<?php
namespace App\Http\Middleware;
use Closure;
use Menu;
class AdminMenuGenerator
{
/**
; Start a new pool named 'www'.
; the variable $pool can be used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
function start_progress {
while true
do
echo -ne "#"
sleep 1
done
}
function stop_progress {
kill $1
wait $1 2>/dev/null
@sinamiandashti
sinamiandashti / Verta.php
Created August 8, 2018 06:58
vendor/hekmatinasser/verta/src/Verta.php
<?php
namespace Hekmatinasser\Verta;
/*
* This file is part of the Jalali package.
*
* (c) Nasser Hekmati <hekmati.nasser@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
@sinamiandashti
sinamiandashti / fail.php
Created December 13, 2017 09:26
2 method of query in IPTV
<?php
$query = "SELECT SQL_CALC_FOUND_ROWS notifications.* FROM notifications WHERE";
if (!empty($filters['subsystem_id'])) {
$query .= " notifications.subsystem_id=:subsystem_id";
}
$stm = $this->db->prepare($query);
$stm->execute([':subsystem_id' => $filters['subsystem_id']]);
$data = [];
while ($row = $stm->fetch(\PDO::FETCH_ASSOC)) {
@sinamiandashti
sinamiandashti / Pm24 new api
Last active June 21, 2017 08:04
Pm24 new api
Payment24 new API!
===================
[TOC]
Here is newly added api's for mobile applications
----------
@sinamiandashti
sinamiandashti / index.js
Created September 19, 2015 05:53
sanarate.ir driver
var count =0;
var unameArr = ['usdirr','eurirr','uaeirr'];
$('#MainContent_ViewSanaRates_tblSale').find('.trAgg').each(function(index){
if (count ==0) {
count++;
return true;
}
var price = u.getPrice($(index).text());
@sinamiandashti
sinamiandashti / province_with_cities.js
Created February 14, 2015 08:32
Iran Province with Cities Json
{"آذربايجان شرقي":["آذر شهر","اسكو","اهر","بستان آباد","بناب","بندر شرفخانه","تبريز","تسوج","جلفا","سراب","شبستر","صوفیان","عجبشير","قره آغاج","كليبر","كندوان","مراغه","مرند","ملكان","ممقان","ميانه","هاديشهر","هريس","هشترود","ورزقان"],"آذربايجان غربي":["اروميه","اشنويه","بازرگان","بوكان","پلدشت","پيرانشهر","تكاب","خوي","سردشت","سلماس","سيه چشمه- چالدران","سیمینه","شاهين دژ","شوط","ماكو","مهاباد","مياندوآب","نقده"],"اردبيل":["اردبيل","بيله سوار","پارس آباد","خلخال","سرعين","كيوي (كوثر)","گرمي (مغان)","مشگين شهر","مغان (سمنان)","نمين","نير"],"اصفهان":["آران و بيدگل","اردستان","اصفهان","باغ بهادران","تيران","خميني شهر","خوانسار","دهاقان","دولت آباد-اصفهان","زرين شهر","زيباشهر (محمديه)","سميرم","شاهين شهر","شهرضا","فريدن","فريدون شهر","فلاورجان","فولاد شهر","قهدریجان","كاشان","گلپايگان","گلدشت اصفهان","گلدشت مركزی","مباركه اصفهان","مهاباد-اصفهان","نايين","نجف آباد","نطنز","هرند"],"البرز":["آسارا","اشتهارد","شهر جديد هشتگرد","طالقان","كرج","گلستان تهران","نظرآباد","هشتگرد"],"ايلام":["آبدانان","ايلام","ايوان","دره
[ 0%] Built target fastlz
[ 2%] Built target pcre
[ 2%] Built target afdt
[ 2%] Built target sqlite3
[ 7%] Built target mbfl
[ 8%] Built target timelib
[ 8%] Built target lz4
[ 8%] Built target double-conversion
[ 14%] Built target zip_static
[ 16%] Built target hphp_thrift
@sinamiandashti
sinamiandashti / gist:22dfc847570ede4e9f02
Created September 10, 2014 08:32
osx make 100% failed
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Bits.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Checksum.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Conv.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Demangle.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/dynamic.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/File.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/FileUtil.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/Format.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/GroupVarint.cpp.o
[ 0%] Building CXX object third-party/folly/CMakeFiles/folly.dir/folly/IPAddress.cpp.o