- We need to authenticate to multiple private external repositories using credentials stored in a file
- We don't want use private/public RSA keys with ssh
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
<?php | |
use Illuminate\Support\Facades\App; | |
use Illuminate\Database\Eloquent\Model; | |
class Capacity extends Model { | |
// ... | |
} | |
class Supplier { | |
public $capacity; | |
/** | |
* Supplier constructor. |
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
<?php | |
namespace Illuminate\Routing; | |
class Route | |
{ | |
/** | |
* The route action array. | |
* |
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
<?php | |
Route::get('/params/{name}', [ | |
'middleware' => 'App\Http\Middleware\DumpMiddleware', | |
function () { | |
return view('welcome'); | |
}]); | |
namespace Illuminate\Routing; |
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
// var ClasseFiglia = Class.extend(...); | |
// oppure | |
// var ClasseFiglia = ClassePadre.extend(...); | |
// crea una funzione costruttore ClasseFiglia ( detta classe in OOP ) | |
// che si comporta secondo i meccanismi dell ereditarieta' | |
// Object Oriented, tale costruttore/funzione si puo usare come : | |
// var instance = new ClasseFiglia({...}) | |
// e generare istanze di quella classe | |
// Si puo legare su proto.init un costruttore oltre | |
// alla dichiarazione di proprieta ( condivise ) e metodi che appunto finiranno sul prototype |
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
<?php | |
// General error: 2014 Cannot execute queries while other unbuffered queries are active | |
\DB::getPdo()->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true); |
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
<?php | |
// THIS causes a [Illuminate\Database\QueryException] exception : | |
// SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. | |
// Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against | |
// mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. | |
// (SQL: LOCK TABLES imports WRITE) | |
// see: https://stackoverflow.com/questions/31582445/table-locking-issues-with-laravel-5-1 | |
\DB::statement('LOCK TABLES mytable WRITE'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<base href="http://demos.telerik.com/kendo-ui/treelist/editing"> | |
<style> | |
html { | |
font-size: 14px; | |
font-family: Arial, Helvetica, sans-serif; | |
} |
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
$.each([ | |
'author.package1', | |
'author.package2.subpackage1', | |
'author.package3.subpackage4', | |
'author.package3.subpackage4.subpackage5', | |
],function(i,f){f.split('.').reduce(function(n,c){return n[c]||(n[c]={});},g)}); |
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
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Event; | |
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; | |
class EventServiceProvider extends ServiceProvider | |
{ | |
/** |
OlderNewer