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
@zohaibhassan156
zohaibhassan156 / mysql57-docker
Created June 29, 2025 08:02
docker compose settings for mysql57 for older systems
version: '3.3'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
command: mysqld --sql_mode=""
ports:
- '3506:3306'

WSL Conf common settings

sudo nao /etc/wsl.conf

[boot]
systemd=true

[user]
default=zohaib
<?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.md
Last active July 12, 2025 19:38
wsl-settings

Fresh WSL Ubuntu Settings

Common OS Packages

sudo apt update && sudo apt upgrade; 
sudo apt install -y zip unzip curl wget;

For Ubuntu, this PPA provides the latest stable upstream Git version

@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
{