Skip to content

Instantly share code, notes, and snippets.

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

Sabid Barahona sabid

🏠
Working from home
View GitHub Profile
@sabid
sabid / deploy.sh
Created February 23, 2024 01:51 — forked from cagartner/deploy.sh
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
#!/bin/bash
#
# Upgrades or Installs Xdebug on Mac OSX (Tested with Yosemite) YMMV
# @author Michael Jett
# @requires brew
#
# curl -kL http://git.io/vBGmR | bash
#
@sabid
sabid / left-bar.vue
Created March 22, 2019 01:17 — forked from languanghao/left-bar.vue
element ui menu with vue-router
<template>
<el-menu :router="true" :default-active="activeLink">
<template v-for="rule in $router.options.routes">
<el-submenu v-if="rule.children && rule.children.length > 0"
:index="rule.path"
>
<template slot="title"><i :class="rule.icon"></i>{{ rule.title }}</template>
<el-menu-item v-for="child in rule.children" :index="rule.path + '/' + child.path">{{ child.title }}</el-menu-item>
</el-submenu>
<el-menu-item v-else
<?php
namespace App\Shop\Base;
use App\Shop\Base\Interfaces\BaseRepositoryInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Pagination\LengthAwarePaginator;
/**
@sabid
sabid / gist:bf428dbaf8ac962dda1c3714802adfdf
Created January 21, 2018 12:44 — forked from MrDys/gist:3512455
Link directly to an open modal window in Bootstrap
/* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it:
Make sure your modal has an id:
<div class="modal" id="myModal" ... >
Then stick this bit of Javascript at at the end of your document:
*/
$(document).ready(function() {
@sabid
sabid / list-grid.html
Created December 27, 2017 20:40 — forked from gskema/list-grid.html
Bootstrap 3 varied height columns
<style type="text/css">
/*
* Allows to usage of <ul> as .row and <li> as .col-**-*
* Benefit of using <li> is that the column can be of varied height,
* unlike when using div.row - columns collapse when heights are different.
* The tricky part is to eliminate whitespaces between <li></li> tags.
*
* Usage: <ul class="list-grid row">
* <li class="col-md-3">...</li>
*
@sabid
sabid / passwordvalidation
Created October 10, 2017 23:40 — forked from Michael-Brooks/passwordValidation.php
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
*/
$rules = array(
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
);
/*
* Use this one if you also require at least one symbol.
@sabid
sabid / mfp-blurred.css
Created September 5, 2017 01:07 — forked from agragregra/mfp-blurred.css
Magnific-Popup Blurred Background
CSS:
* {
transition: filter .25s ease;
}
.mfp-wrap ~ * {
filter: blur(1px);
}
Sass:
*
@sabid
sabid / Laravel PHP7 LEMP AWS.md
Created August 2, 2017 02:17 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@sabid
sabid / remove-rev-slider-metabox.php
Created June 9, 2017 22:27 — forked from DevinWalker/remove-rev-slider-metabox.php
This code removed the Revolution Slider metabox on pages, posts and CTPs
/**
* Remove Rev Slider Metabox
*/
if ( is_admin() ) {
function remove_revolution_slider_meta_boxes() {
remove_meta_box( 'mymetabox_revslider_0', 'page', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'post', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'YOUR_CUSTOM_POST_TYPE', 'normal' );
}