Skip to content

Instantly share code, notes, and snippets.

View saber13812002's full-sized avatar
💭
stackoverflow+codegrepper.com

Saber tabatabaee yazdi saber13812002

💭
stackoverflow+codegrepper.com
View GitHub Profile
@saber13812002
saber13812002 / example.php
Created November 24, 2019 09:28 — forked from mhemrg/example.php
Liara
if( ! app()->runningInConsole()) {
// Your code...
}
<?php
//set up pods::find parameters to limit to 5 items
$param = array(
'limit' => 5,
);
//create pods object
$pods = pods('pod_name', $params );
//check that total values (given limit) returned is greater than zero
if ( $pods->total() > 0 ) {
@saber13812002
saber13812002 / README.md
Created February 8, 2020 15:18 — forked from manzoorwanijk/README.md
Google Script to bypass the blockage of Telegram Bot API from by webhost

WPTelegram Google Script

You can use this script to bypass the bans on Telegram API by different hosts. Simply send the request to this script instead of the Telegram Bot API after deploying it as a web app and allowing anonymous access.

Params

It accepts bot GET and POST requests with the following params

name type Description
@saber13812002
saber13812002 / xampp_php7_xdebug.md
Created February 16, 2020 17:42 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Permission as PermissionModel;
use App\PermissionRole;
use Illuminate\Support\Facades\Config;
class Permission extends Command
@saber13812002
saber13812002 / grasshopper csharp only
Created August 17, 2020 06:30 — forked from texone/grasshopper csharp only
mesh based reaction diffusion
using System;
using System.Collections;
using System.Collections.Generic;
using Rhino;
using Rhino.Geometry;
using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;
@saber13812002
saber13812002 / gist:e87f59fbb4dde6e08135d24bfd67b27f
Created September 8, 2020 07:18
laravel persian numbers عدد اعداد فارسی برای لاراول
function persianNumber($englishNumber)
{
return str_replace(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'], $englishNumber);
}
<script type="javascript">
$('#tabs').tabs('select', $('div[selected=true]').attr('nav-product-comments-tab'));
$(document).ready(function () {
console.log('d')
const urlParams = new URLSearchParams(window.location.search);
console.log(urlParams)
const activeTab = urlParams.get('active_tab');
console.log(activeTab)
@saber13812002
saber13812002 / README.md
Created September 26, 2020 19:06 — forked from mul14/README.md
Simple Laravel Search Trait

Usage

Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so

use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;

class Article extends Model 
{
@saber13812002
saber13812002 / copy-checklist.js
Created October 2, 2020 08:15 — forked from niallsmart/copy-checklist.js
Copy Trello checklist to clipboard
copy($(".checklist-item:not(.checklist-item-checked)").map(function() {
var e = $(this),
item = e.find(".checklist-item-details-text").text()
if (e.hasClass("checklist-item-state-complete")) {
item = item + " (DONE)"
}
return item
}).get().join("\n"))