Skip to content

Instantly share code, notes, and snippets.

View jaketoolson's full-sized avatar

Jake Toolson jaketoolson

View GitHub Profile
<?php
namespace EthicalJobs\Foundation\Storage;
use Illuminate\Support\Collection;
interface Repository
{
/**
* Find a model by its id
<?php
namespace EthicalJobs\Foundation\Storage;
use Illuminate\Support\Collection;
interface Repository
{
/**
* Find a model by its id
//parse meta data
loadImage.parseMetaData(blobOrFile, function(data) {
//default image orientation
var orientation = 0;
//if exif data available, update orientation
if (data.exif) {
orientation = data.exif.get('Orientation');
}
var loadingImage = loadImage(
blobOrFile,
@jaketoolson
jaketoolson / csv_to_array.php
Created July 17, 2016 09:14 — forked from jaywilliams/csv_to_array.php
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
@jaketoolson
jaketoolson / CronSchedule.php
Created July 15, 2016 21:08 — forked from m4tthumphrey/CronSchedule.php
CronSchedule.php - Allows one to parse a cron expression into human readable text.
<?php
/*
* Plugin: StreamlineFoundation
*
* Class: Schedule
*
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back
* and forth between scheduled moments in time and translating the created schedule back to a human readable form.
*
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format.
@jaketoolson
jaketoolson / 01_Laravel 5 Simple ACL manager_Readme.md
Created June 13, 2016 07:41 — 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

@jaketoolson
jaketoolson / config.yml.erb
Created February 16, 2016 22:21 — forked from fny/config.yml.erb
Elastic Beanstalk Deploy with Environment-specific Extensions
# This file lives in `app/.elasticbeanstalk/config.yml.erb`
branch-defaults:
master:
environment: <%= eb_environment %>
# environment: contigo-worker-env # Enable for worker
# Put global configs below!