Skip to content

Instantly share code, notes, and snippets.

View mirzabusatlic's full-sized avatar

codepuppet mirzabusatlic

View GitHub Profile
@mirzabusatlic
mirzabusatlic / PreventOnProduction.php
Created April 5, 2016 12:20
Prevent a Laravel Artisan command from executing on a production server
<?php
namespace App\Console;
trait PreventOnProduction
{
/**
* Prevent the command from executing on production.
*
* @param string $message
@mirzabusatlic
mirzabusatlic / ClassifiesDeleted.php
Created June 15, 2016 14:17
Classifies between soft/hard deletion in model observers in Laravel
<?php
namespace Watermark\Observers;
use Illuminate\Database\Eloquent\Model;
trait ClassifiesDeleted
{
/**
* Hook into post-delete operations.
@mirzabusatlic
mirzabusatlic / 00.howto_install_phantomjs.md
Last active December 21, 2016 15:06 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 2.1.1

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@mirzabusatlic
mirzabusatlic / FixCashierNamespace.php
Last active October 21, 2018 08:25
Add a sub-namespace to Laravel Cashier when using both Stripe and Braintree packages
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Finder\Finder;
class FixCashierNamespace extends Command
{
/**