This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Bash 4 using homebrew | |
brew install bash | |
# Add the new shell to the list of legit shells | |
sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells" | |
# Change the shell for the user | |
chsh -s /usr/local/bin/bash | |
# Restart terminal.app (new window works too) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateHistoriesTable extends Migration { | |
/** | |
* Run the migrations. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('guidelines/{slug}/{page}', ['as' => 'guideline-page', function($slug, $page) { | |
$guideline = Guideline::findBySlugOrFail($slug); | |
$page = $guideline->guidelineBlocks()->where('slug', $page)->firstOrFail(); | |
// previous pages | |
$previous = $guideline->guidelineBlocks() | |
->where('guideline_blocks.position', '<', $page->position) | |
->orderBy('guideline_blocks.position', 'desc') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var root = this; | |
(function( jQuery ) { | |
if ( root.XDomainRequest ) { | |
jQuery.ajaxTransport(function( s ) { | |
if ( s.crossDomain && s.async ) { | |
if ( s.timeout ) { | |
s.xdrTimeout = s.timeout; | |
delete s.timeout; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class ProductImagesTable extends Migration { | |
/** | |
* Run the migrations. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Homepage feed | |
public function index($filter = null) { | |
// Tell Laravel where to find the mustache views for post | |
app('view')->addNamespace('js', public_path().'/js'); | |
// Render the view | |
$this->layout->nest('content', 'gadget.index', array( |