Skip to content

Instantly share code, notes, and snippets.

View skydiver's full-sized avatar
👨‍💻
Always coding ...

Martin M. skydiver

👨‍💻
Always coding ...
View GitHub Profile
@skydiver
skydiver / s3purge.sh
Last active March 12, 2016 02:54 — forked from adatta02/gist:4743092
Purge old files from S3 with "s3cmd"
#!/bin/bash
# Version: 0.2.0
#
# Usage:
# ./s3purge "bucketname" "30 days"
# ./s3purge "bucketname" "6 hours"
/usr/local/bin/s3cmd ls s3://$1 | while read -r line;
do
@skydiver
skydiver / 01_Laravel 5 Simple ACL manager_Readme.md
Created May 3, 2016 15:38 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@skydiver
skydiver / PHP composer tools.md
Created August 18, 2017 02:12 — forked from davebarnwell/PHP composer tools.md
Global installation of PHP tools with Composer

Global installation of PHP tools with Composer

To install a composer package globally, you run the usual require command, but with the addition of the global modifier. So to install PHPUnit, you would run:

$ composer global require phpunit/phpunit
$ composer global require phpunit/dbunit
$ composer global require phing/phing
$ composer global require phpdocumentor/phpdocumentor
$ composer global require sebastian/phpcpd
@skydiver
skydiver / deploy.php
Created October 14, 2019 05:21 — forked from martincarlin87/deploy.php
Deployer Laravel 5
<?php
namespace Deployer;
require 'recipe/laravel.php';
$repo_url = '';
$branch = 'master';
$server_url = '';
$user = '';