rsync -av -e ssh SOURCE/ USERNAME@NEW_SERVER.COM:/PATH/TO/DESTINATION/
mysqldump --allow-keywords --opt -uMySQL_USERNAME -pPASSWORD DATABASE | ssh USER@DOMAIN "mysql -uMySQL_USERNAME -pPASSWORD DATABASE"
#!/usr/bin/env bash | |
export DEBIAN_FRONTEND=noninteractive | |
# Check if user is root | |
[ $(id -u) != "0" ] && { echo "${CFAILURE}Error: You must be root to run this script${CEND}"; exit 1; } | |
# Configure | |
MYSQL_ROOT_PASSWORD="123qweasdzxc" | |
MYSQL_NORMAL_USER="m5lil" |
Model:: | |
/*Select*/ | |
select('col1','col2') | |
->select(array('col1','col2')) | |
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating')) | |
->addSelect('col3','col4') | |
->distinct() // distinct select | |
/*From*/ |
# Apache Server Configs v3.0.0 | MIT License | |
# https://github.com/h5bp/server-configs-apache | |
# (!) Using `.htaccess` files slows down Apache, therefore, if you have | |
# access to the main server configuration file (which is usually called | |
# `httpd.conf`), you should add this logic there. | |
# | |
# https://httpd.apache.org/docs/current/howto/htaccess.html | |
# ###################################################################### |
rsync -av -e ssh SOURCE/ USERNAME@NEW_SERVER.COM:/PATH/TO/DESTINATION/
mysqldump --allow-keywords --opt -uMySQL_USERNAME -pPASSWORD DATABASE | ssh USER@DOMAIN "mysql -uMySQL_USERNAME -pPASSWORD DATABASE"
//install laravel-dompdf Package and arutil/ar-ph
public function pdf($id)
{
$data = Invoice::find($id);
$pdf = \PDF::loadView('invoice', ['data' => $data]);
return $pdf->stream('invoice.pdf');
}
<?php | |
namespace Translator\Command; | |
use Illuminate\Console\Command; | |
class Translator extends Command | |
{ | |
/** | |
* @var string |
cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
continues...
I'd suggest something like this:
url/item/?registered=>:DDMMYYYY
The parameter name is the name of the attribute
Right at the beginning of the parameter value is the operator
Operator and value is separated by a : (it actually can be any separation character you want)
Other examples:
url/item/?name=like:foo
if (! function_exists('home_route')) {
/**
* Return the route to the "home" page depending on authentication/authorization status.
*
* @return string
*/
function home_route()
{