http://www.shaunfreeman.co.uk/install-fail2ban-on-centos-6-with-plesk/
http://forum.parallels.com/showthread.php?72464-Shell-script-for-checking-mail-queue
http://www.devcu.com/forums/topic/274-locking-down-postfix-against-spam/
<?php | |
### --- Snip --- ### | |
App::after(function($request, $response) | |
{ | |
// HTML Minification | |
if(App::Environment() != 'local') | |
{ | |
if($response instanceof Illuminate\Http\Response) |
#!/bin/bash | |
# This script creates a new project (or site) under /var/sites and creates | |
# new virtual host for that site. With the options a site can also | |
# install the latest version of Laravel directly. | |
# This script was originally based on the following script by @Nek from | |
# Coderwall: https://coderwall.com/p/cqoplg | |
# Display the usage information of the command. | |
create-project-usage() { |
# ... pre-writing it down, but basically install the OS | |
# then update | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get dist-upgrade | |
# Ubuntu comes with tasksel, so going with that | |
sudo tasksel # choose openSSH server and LAMP, Basic Ubuntu Server will have already been chosen. These can also be chosen during the install process but I found it may make for a less smooth install process | |
# So I can install the iso and other things into the future |
For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');
<?php | |
/* app/validators.php */ | |
Validator::extend('alpha_spaces', function($attribute, $value) | |
{ | |
return preg_match('/^[\pL\s]+$/u', $value); | |
}); | |
/* |
<?php | |
use Illuminate\Database\Eloquent\Collection; | |
class BaseCollection extends Collection { | |
public function sortByOrder($order, $delimeter = ',') | |
{ | |
$order = is_array($order) ? $order : explode($delimeter, $order); | |