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 / htoprc
Last active January 10, 2016 06:14
My htop config
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
@skydiver
skydiver / .csscomb.json
Last active February 17, 2016 19:13
Just a CSScomb config
{
"always-semicolon": true,
"color-case": "upper",
"block-indent": " ",
"element-case": "lower",
"eof-newline": false,
"leading-zero": true,
"quotes": "double",
"space-before-colon": "",
"space-after-colon": "",
@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 / 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 / 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 / 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 / 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 / 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 / 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 / docker-compose.yml
Created June 4, 2017 08:42
Docker -> MongoDB
version: '2'
services:
#####################
# MongoDB
#####################
mongo:
container_name: MongoDB
image: mongo:3.4
volumes: