Skip to content

Instantly share code, notes, and snippets.

@dj1020
dj1020 / gist:541b9bcadb6181802847
Created March 21, 2015 06:27
composer install on mac
curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin
@dj1020
dj1020 / macros.php
Last active August 29, 2015 14:17
Laravel Response extend for inline displaying of images
<?php
Response::macro('inlineImage', function($path, $name = null, $lifetime = 0)
{
if (is_null($name)) {
$name = basename($path);
}
$filetime = filemtime($path);
$etag = md5($filetime . $path);
@dj1020
dj1020 / gist:b0453ed2462436f59d1a
Last active August 29, 2015 14:16
Vagrant file for chgrp to www-data to fix Laravel permission issues.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.33.21"