Skip to content

Instantly share code, notes, and snippets.

View Mohammad-Alavi's full-sized avatar
🏠
Working from home

Mohammad Alavi Mohammad-Alavi

🏠
Working from home
View GitHub Profile
@Mohammad-Alavi
Mohammad-Alavi / paginate.php
Created April 25, 2018 23:37 — forked from vluzrmos/paginate.php
Laravel Paginate Collection or Array
View paginate.php
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
View Migration.php
<?php namespace Gazugafan\Temporal;
use Gazugafan\Temporal\Exceptions\TemporalException;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class Migration
{
/**
* Makes the necessary modifications on a table to make it support a temporal model, such as adding temporal and version columns, and setting up primary keys and indexes.
View router.js
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
// Define base routes here
const baseRoutes = [
{
path: '/',
name: 'index',
@Mohammad-Alavi
Mohammad-Alavi / conventional-commits.md
Last active January 15, 2022 06:55 — forked from Zekfad/conventional-commits.md
Conventional Commits Cheatsheet
View conventional-commits.md

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change in API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes wich doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
View gist:6b3cddcffc92701ca5136e13d0366c1e
Error Output: [debug] Parsed options:
{
excludeFilters: [ 'apidoc.config.js', 'node_modules' ],
includeFilters: [ 'public.php' ],
src: [ 'app' ],
dest: 'app/Containers/Vendor/Documentation/UI/WEB/Views/documentation/public',
template: '/var/www/html/node_modules/apidoc/template/',
config: 'app/Containers/Vendor/Documentation/ApiDocJs/public/apidoc.json',
apiprivate: false,