Skip to content

Instantly share code, notes, and snippets.

View chiragparekh's full-sized avatar
🏠
Working from home

Chirag Parekh chiragparekh

🏠
Working from home
View GitHub Profile
@chiragparekh
chiragparekh / Laravel-Pint-PHPStorm-Sail.md
Created July 3, 2023 06:31
Setup Laravel Pint with PHPStorm - Laravel Sail

Setup Image

@chiragparekh
chiragparekh / gist:16b85d1813e603b42b0750d5b6d2d57b
Created June 15, 2022 15:27
Laravel Sail Existing Application Install Without local php composer install with docker
#composer install
docker pull composer/composer
docker run --rm -it -v "$(pwd):/app" composer/composer require laravel/sail --dev
#artisan install
docker pull php
docker container run --rm -v $(pwd):/app/ php php /app/artisan sail:install
@chiragparekh
chiragparekh / DateInput.vue
Created September 18, 2019 18:54 — forked from reinink/DateInput.vue
Pikaday Vue Component
<template>
<div>
<label v-if="label" class="form-label" :for="`date-input-${_uid}`">{{ label }}:</label>
<input v-bind="$attrs" class="form-input" :id="`date-input-${_uid}`" :class="{ error: error }" type="text" ref="input" :value="value" @change="change" @keyup="change">
<div v-if="error" class="form-error">{{ error }}</div>
</div>
</template>
<script>
import pikaday from 'pikaday'
@chiragparekh
chiragparekh / 1-add-middleware.php
Created February 16, 2018 10:10 — forked from adamwathan/1-add-macros.php
Multiformat Endpoints in Laravel
<?php
namespace App\Http\Middleware;
class CaptureRequestExtension
{
public function handle($request, $next)
{
if ($request->route()->parameter('_extension') !== null) {
$request->attributes->set('_extension', substr($request->route()->parameter('_extension'), 1));
NOTE : Following procedure are for windows user.
* Tools needed
- HeidiSQL
- Putty
Steps:
1) Create a new session in session manager and give appropriate name to it
2) In settings tab make changes following:
@chiragparekh
chiragparekh / OpenWithSublimeText3.bat
Created September 8, 2016 08:50 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@chiragparekh
chiragparekh / gist:423daa5eedf9ddb0b2b772f4fdc1bd1c
Created June 6, 2016 06:07
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@chiragparekh
chiragparekh / import-variation.php
Created January 26, 2016 12:07 — forked from galalaly/import-variation.php
Create WooCommerce variations with PHP
<?php
// In a class constructor
$this->size_tax = wc_attribute_taxonomy_name( 'Size' );
$this->color_tax = wc_attribute_taxonomy_name( 'Color' );
// Insert the main product first
// It will be used as a parent for other variations (think of it as a container)
$product_id = wp_insert_post( array(
@chiragparekh
chiragparekh / BlogController.php
Created December 26, 2015 13:13 — forked from tobysteward/BlogController.php
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@chiragparekh
chiragparekh / sublime-text-3-build-3065-license.md
Created December 22, 2015 17:05
Sublime Text 3 (build 3065+) - VALID License

SublimeText3 Valid License without cracking! Just download/install then use this license.

Notice that it may not work on dev builds, but still works on 3083 build!

----- BEGIN LICENSE -----

Andrew Weber
Single User License
EA7E-855605
813A03DD 5E4AD9E6 6C0EEB94 BC99798F