Open terminal
sudo add-apt-repository ppa:webupd8team/sublime-text-2 sudo apt-get update sudo apt-get install sublime-text
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
class JsonMiddleware | |
{ | |
public function handle(Request $request, Closure $next) |
# laravel new-app | |
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git" | |
alias artisan="php artisan" | |
alias migrate="php artisan migrate" | |
alias serve="php artisan serve" | |
alias dump="php artisan dump" | |
alias t="phpunit" | |
# Generators Package |
<?php | |
/** | |
* | |
* Genrate Slugs from Title or any given string | |
* | |
* @param string $str | |
* @return Slug | |
* | |
**/ |
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. | |
| It's a breeze. Simply tell Laravel the URIs it should respond to | |
| and give it the controller to call when that URI is requested. |
# Change to the project directory | |
cd /home/forge/domain.com | |
# Turn on maintenance mode | |
php artisan down | |
# Pull the latest changes from the git repository | |
git pull origin master | |
# Install/update composer dependecies |
#!/bin/bash | |
# MongoDB Setup on Ubuntu 14.04 with PHP7 | |
# Source: | |
#1. Import the public key used by the package management system: | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
#2. Create a list file for MongoDB. | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list |
#!/bin/bash | |
echo "Please, enter your username, it will be added to 'sudo' and 'docker' groups during the process." | |
read USERNAME | |
if [ -z "$USERNAME" ] ; then | |
echo "Exiting... Done." | |
exit | |
else | |
echo "Adding user to 'sudo' group..." |
<a href="javascript:void(0)" class="backtotop">Back to Top</a> | |
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> | |
<script type='text/javascript'> jQuery('.backtotop').click(function(){ jQuery('html, body').animate({scrollTop:0}, 'slow'); }); </script> |
Elasticsearch require Java, so we will install that now. We will install a recent version of Oracle Java 8 because that is what Elasticsearch recommends. It should, however, work fine with OpenJDK, if you decide to go that route.
Add the Oracle Java PPA to apt
:
* sudo add-apt-repository -y ppa:webupd8team/java
Update your apt
package database: