This file contains hidden or 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
#!/bin/sh | |
# | |
# Adapted from: https://www.howtoforge.com/shell-script-to-back-up-all-mysql-databases-each-table-in-an-individual-file-and-upload-to-remote-ftp | |
# | |
# System + MySQL backup script | |
# Copyright (c) 2008 Marchost | |
# This script is licensed under GNU GPL version 2.0 or above | |
# --------------------------------------------------------------------- | |
######################### |
This file contains hidden or 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 | |
namespace App\Http\Controllers\Admin; | |
use App\Http\Requests; | |
use App\Article; | |
use App\Tag; | |
use App\Category; | |
use Zofe\Rapyd\DataForm\Field\Checkboxgroup; | |
class AdminArticlesController extends AdminController |
This file contains hidden or 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 | |
.... | |
public function getLatlon() | |
{ | |
$province = Provincia::all(); | |
foreach($province as $p) | |
{ | |
/** @var \App\Provincia $p */ |
This file contains hidden or 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
<object width="100%" height="100%" id="fp_05257577_api" name="fp_05257577_api" data="/site-assets/flowplayer/flowplayer-3.2.16.swf" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="quality" value="high"><param name="bgcolor" value="#000000"><param name="flashvars" value="config={"clip":{"url":"/uploads/vetrine/00008933/video/sanitaria8.mp4","autoPlay":true},"playerId":"fp_05257577","playlist":[{"url":"/uploads/vetrine/00008933/video/sanitaria8.mp4","autoPlay":true}]}"></object> |
This file contains hidden or 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 | |
namespace App\Services; | |
use App\Helpers\Inliner; | |
class Mailer { | |
public static function send($view, $data, \Closure $callback) { |
This file contains hidden or 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
@servers(['web' => '[email protected]', 'local'=>'localhost']) | |
<?php | |
$repo = 'public_html/stage/'; | |
?> | |
@task('commit', ['on'=>'local']) | |
git add . | |
git commit -m "auto" | |
git push origin master |
This file contains hidden or 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 | |
$response = \Cache::remember('mia_chiave', env('CACHE_EXPIRE'), function() { | |
return view('path.vista')->render(); | |
}); | |
return response($response,200); |
This file contains hidden or 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
<remote> | |
<div id="pjax-{ opts.id }"></div> | |
<script> | |
this.on('mount', function(){ | |
$.get( opts.remote, function( data ) { | |
$( '#pjax-'+opts.id).html( data ); | |
}); | |
$(document).on('submit', '#pjax-'+opts.id+' form', function(event) { | |
$.pjax.submit(event, '#pjax-'+opts.id, {push: false, scrollTo: false}) | |
}); |
This file contains hidden or 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 | |
/** | |
* usage in a controlller: | |
* public function index($page=1) { | |
* $users = User::paginateUri(5, $page, $links); | |
* return view('users', compact('users','links')); | |
* } | |
* it also support variable number of parameters, | |
* routes must be defined using {page} or {page?} placeholders |
This file contains hidden or 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
@servers(['web' => '[email protected]', 'local'=>'localhost']) | |
@task('commit', ['on'=>'local']) | |
git add . | |
git commit -m "auto" | |
git push origin master | |
@endtask | |
@task('pull', ['on'=>'web']) | |
cd /my/remote/host/public_html |