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
echo "Loading composer repositories with package information"; | |
echo "Updating dependencies"; | |
sleep(9999999999); | |
..... | |
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
I am curious on what is your favorite aspects to Laravel compared to other frameworks? If | |
you are trying to sell Laravel to another dev what would be your selling points? | |
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
@foreach (array_slice($posts->toArray(), 0, 5) as $post) | |
<h1>{{ $post['title'] }}</h1> | |
@endforeach |
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
this.selectize = this.$("#js-tags").selectize({ | |
persist: true, | |
maxItems: null, | |
valueField: "tag", | |
labelField: "tag", | |
searchField: ["tag"], | |
options: tags.toJSON(), // Backbone collection | |
render: { | |
item: function(item) { | |
return "<div><i class='icon-tag'></i> " + item.tag + "</div>"; |
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
/** | |
* Filter to check for CSRF attacks from the ajax requests. | |
*/ | |
Route::filter('csrf_header', function() | |
{ | |
if (Session::token() != Request::header('x-csrf-token')) | |
{ | |
throw new Illuminate\Session\TokenMismatchException; | |
} | |
}); |
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
// DB Dumpers | |
DB::listen(function($sql) | |
{ | |
var_dump($sql); | |
}); | |
Event::listen('laravel.query', function($sql) | |
{ | |
var_dump($sql); |
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
# easy installation: | |
# brew install python | |
# sudo easy_install pip # PIP is recommended for installation | |
# sudo -s # Creates a new sudo shell | |
# export ARCHFLAGS="-arch i386 -arch x86_64" # Need to set some GCC flags | |
# exit | |
# sudo pip install fabric # Get the install on | |
# sudo pip install python-simple-hipchat | |
import os, getpass, random, hipchat |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "precise32" | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
config.vm.network :forwarded_port, guest: 80, host: 8080 | |
config.vm.network :forwarded_port, guest: 5432, host: 54320 |
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
server { | |
access_log /home/webroots/default/logs/access.log; | |
error_log /home/webroots/default/logs/error.log; | |
root /home/webroots/default/public_html; | |
index index.php; | |
# Make site accessible from http://localhost/ | |
server_name localhost; |
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
interface PostRepositoryInterface { | |
public function create($title, $content, $slug, array $meta, array $tags, $active, $user_id, Carbon $publish_date); | |
} | |
interface PostRepositoryInterface { | |
public function create(array $data); | |
} | |