Skip to content

Instantly share code, notes, and snippets.

Daniel LaBarge dalabarge

Block or report user

Report or block dalabarge

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tpavlek
tpavlek / combinations.php
Created Jun 2, 2016
Get all combinations of two collections
View combinations.php
<?php
/**
* If you have two sets of collections, which you would previously have used a nested foreach to do something to each unique
* combination of items, you can use this macro to get it done instead!
*
* It will return a collection of tuples that represent the combination of the two collections. If you'd like to add keys to the tuple
* you can pass that in as an optional second argument!
*/
@mikefrancis
mikefrancis / UploadableTrait.php
Last active Mar 21, 2018
Laravel UploadableTrait
View UploadableTrait.php
<?php namespace DCD\Traits;
use Input;
use Symfony\Component\HttpFoundation\File\UploadableFile;
trait UploadableTrait
{
/**
* Where to store uploads
View awesome-php.md

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

@matthewmccullough
matthewmccullough / git-deletealltags.bsh
Created Apr 1, 2011
Script to delete all tags both locally and remotely
View git-deletealltags.bsh
for t in `git tag`
do
git push origin :$t
git tag -d $t
done
You can’t perform that action at this time.