Skip to content

Instantly share code, notes, and snippets.

View zohaibhassan156's full-sized avatar
💭
I may be slow to respond.

Zohaib Hassan zohaibhassan156

💭
I may be slow to respond.
View GitHub Profile
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
return new class extends Migration {
/**
* Run the migrations.
@zohaibhassan156
zohaibhassan156 / list-page.ts
Created March 28, 2025 14:27
list-page mixin Vue
import Vue from 'vue';
import { DataOptions } from 'vuetify';
import { Watch } from 'vue-property-decorator';
import Component from 'vue-class-component';
import Toast from '@/utils/toast';
import sleep from '@/utils/sleep';
const initPageSize = 10;
@Component
@zohaibhassan156
zohaibhassan156 / wsl-settings
Last active November 18, 2024 18:34
wsl-settings
sudo apt install -y zip unzip
#valet linux OS packages
sudo apt install -y network-manager libnss3-tools jq xsel
#install php
sudo add-apt-repository ppa:ondrej/php
@zohaibhassan156
zohaibhassan156 / gist:c7163d834b96274f25e488617a674cca
Created April 4, 2024 09:24
cart service for laravel projects
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace App\Services;
@zohaibhassan156
zohaibhassan156 / gist:4648ee19a416e7035221496f4846dac6
Created April 4, 2024 09:22
laravel view files translation scanner service
<?php
namespace App\Services;
use App\Models\LanguagePhrase;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Arr;
class TranslationScanner
{
@zohaibhassan156
zohaibhassan156 / wsl configurations and bashrc.md
Last active April 24, 2023 04:22
wsl2 bashrc and config options

Add this to /etc/wsl.conf file to enable systemctl commands

[boot]
systemd=true

To add composer global plugins to path

export PATH="~/.config/composer/vendor/bin:$PATH"

To share ssh-agent between terminals add this to .bashr