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

Keybase proof

I hereby claim:

  • I am skydiver on github.
  • I am skydiver (https://keybase.io/skydiver) on keybase.
  • I have a public key whose fingerprint is 3803 CC4E 7A6E 5F28 4C85 65AB 15B5 F00A F32D 4514

To claim this, I am signing this object:

@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 / docker-compose.yml
Created June 4, 2017 08:42
Docker -> MongoDB
version: '2'
services:
#####################
# MongoDB
#####################
mongo:
container_name: MongoDB
image: mongo:3.4
volumes:
@skydiver
skydiver / do-swap.md
Created March 7, 2017 03:16
[Digital Ocean] Add Swap Space on Ubuntu 16.04
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
@skydiver
skydiver / bitbucket_backup.sh
Created August 7, 2016 00:56
Backup Bitbucket
#!/usr/bin/env bash
# Bitbucket backup script
# backups all repos (including wiki and issues) of a user
#
# requires (in PATH):
# - hg (http://mercurial.selenic.com)
# - git (http://git-scm.com)
# - jq (http://stedolan.github.io/jq/)
# - curl (http://curl.haxx.se)
#
@skydiver
skydiver / docker-compose.yml
Created July 31, 2016 23:52
LAMP development environment using docker
version: '2'
services:
#####################
# DATABASE
#####################
db:
container_name: DEV-Apache-MariaDB
image : mariadb:latest
volumes :
@skydiver
skydiver / docker-compose.yml
Last active December 16, 2018 04:47
Shipyard stack using docker-compose
version: '2'
services:
rethinkdb:
container_name: shipyard-rethinkdb
image : rethinkdb
discovery:
container_name: shipyard-discovery
image : microbox/etcd
@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 / s3size.sh
Created March 16, 2016 03:16
get s3 bucket space in GB
s3cmd du s3://{BUCKET}/ | awk '{print $0/1024/1024/1024" GB"}'
@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