Skip to content

Instantly share code, notes, and snippets.

View tisuchi's full-sized avatar
🙂
Smile is Sadaqah (righteousness)

Thouhedul Islam tisuchi

🙂
Smile is Sadaqah (righteousness)
View GitHub Profile
<?php
public function upgradeMgmlCycle($studentInfo)
{
if ($studentInfo->cycle_end >= now()->today()) {
return $studentInfo;
}
if (!$studentInfo->cycle >= $studentInfo->mgml_syllab_cycle) {
$studentInfo->cycle = $studentInfo->cycle + 1;
@tisuchi
tisuchi / vim_cheatsheet.md
Created February 4, 2022 07:16 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@tisuchi
tisuchi / cloudSettings
Created August 2, 2021 21:12
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-08-02T21:12:36.245Z","extensionVersion":"v3.4.3"}
@tisuchi
tisuchi / gist:262413fa53608e31b7d934dfd589f3f5
Created January 20, 2021 06:50 — forked from ackintosh/gist:5791383
DFS Algorithm in PHP
<?php
class Node
{
public $name;
public $linked = array();
public function __construct($name)
{
$this->name = $name;
@tisuchi
tisuchi / EquipmentStoreData.json
Created April 9, 2020 13:17
Equipment Store Data in JSON Format
{
"equipments": [
{
"equipment_owner_id": 1,
"state_name":"Kishoreganj",
"value":4000,
"deductible_amount":500,
"premium_amount":750,
"premium_billing":12,
"description":"Its just a description",
@tisuchi
tisuchi / klaviyo_addMember.php
Created February 20, 2020 13:45
A data example for tracking a metrics in klaviyo.
<?php
$data = [
'profiles' => [
[
'email' => '[email protected]',
]
]
];
@tisuchi
tisuchi / Controller.php
Last active September 12, 2019 10:57
Handling InputExcpetion on the package side.
<?php
namespace App\Http\Controllers;
use App\Exceptions\InputException;
use Bugsnag\BugsnagLaravel\Facades\Bugsnag;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
@tisuchi
tisuchi / parent-child-loop.php
Created July 26, 2019 15:57
Reduce Parent and Child Loop
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class TestController extends Controller
{
public function index()
{
<?php
$db = mysqli_connect("localhost", "root", "", "ramcel");
$sql="SELECT * FROM photo ";
$result = mysqli_query($db,$sql);
?>
<div class="col-row">
<div class='col-lg-12'>
<?php
@tisuchi
tisuchi / altertable
Created October 13, 2018 09:30
How to alter table in full text.
ALTER TABLE events ADD FULLTEXT(ccTitle);