Skip to content

Instantly share code, notes, and snippets.

View dalabarge's full-sized avatar

Daniel LaBarge dalabarge

View GitHub Profile
@tpavlek
tpavlek / combinations.php
Created June 2, 2016 22:12
Get all combinations of two collections
<?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!
*/

Awesome PHP

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

Composer

@matthewmccullough
matthewmccullough / git-deletealltags.bsh
Created April 1, 2011 20:29
Script to delete all tags both locally and remotely
for t in `git tag`
do
git push origin :$t
git tag -d $t
done