- 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 | |
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
<?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
<!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 | |
{ | |
/** |
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
/** | |
* La variabile $checkedField che vedi riferita arriva da una variabile lato server che contiene | |
* il nome della colonna da utilizzarsi per settare in automatico il campo del model sul checkbox click | |
* | |
* Puo anche valere null o false, in quel caso il valore Javascript deve corrispondere a null o false, per | |
* fare questo in php si usa il metodo json_encode | |
*/ | |
/** | |
* Determina quale e' la colonna tenuta in sync con la checkbox |
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
// 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 |
OlderNewer