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
#!/bin/bash | |
# Specifica l'ID del layer di overlay2 | |
OVERLAY_ID="$1" | |
# Cerca il container associato all'ID del layer | |
CONTAINER_ID=$(sudo grep -l -r "$OVERLAY_ID" /var/lib/docker/overlay2/*/link | \ | |
sed -n 's|.*/overlay2/\(.*\)/link|\1|p') | |
# Ottieni il nome del container |
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 | |
/** | |
* User: matteo.orefice | |
* Date: 16/02/2018 | |
* Time: 16:57 | |
*/ | |
namespace MatteoOrefice\Illuminate\Database\Eloquent\Concerns; |
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
/* é necessario poi circorscivere la regola usando un selettore dedicato oltre al sibling css */ | |
body link[rel=alternate][href*="/collections/"] ~ div > div, | |
body link[rel=alternate][href*="/products/"] ~ div > div,{ | |
background-color: red !important; | |
} |
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 | |
/** | |
* Inspired from | |
* 1. https://github.com/laravel/framework/blob/5.6/src/Illuminate/Mail/TransportManager.php | |
* 2. https://github.com/laravel/framework/blob/5.6/src/Illuminate/Mail/MailServiceProvider.php | |
* | |
* A service provider to register a custom mailer with Dynamic Options ( determined at Dependency Injection Container resolve-time ) | |
* | |
* 1. resolve-time options: host, port, user, password, secure: [tls,ssl] could be determined at DI container resolve-time | |
* 2. global options in mail.dynamic config file |
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
#!/usr/bin/env bash | |
az devops project list | jq ".value[].name" -r | while read -r PROJECT ; | |
do | |
az repos list --project "$PROJECT" | jq ".[].remoteUrl" -r | while read -r GIT_URL ; do | |
rm -fr "$GIT_URL" | |
git clone "$GIT_URL" | |
done | |
done |
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 | |
/** | |
* Credits to : | |
* @see https://gist.github.com/psampaz/7f2aad5d1d54eeeec8ae | |
*/ | |
use GuzzleHttp\Handler\CurlMultiHandler; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Middleware; |
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
#!/bin/bash | |
## NOTA: questo script non va lanciato direttamente ma incluso tramite source o . | |
if docker-machine status default > /dev/null ; | |
then | |
echo "Creazione default docker machine" | |
docker-machine create default | |
fi |
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
[Unit] | |
Description=Write Network Configurations Metadata to /run/network/meta-environ | |
Requires=network-online.target | |
After=network-online.target | |
Before=containerd.service docker.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/bash -c "FILE=/run/network/meta-environ ; hostname -i | sed -e '$ s/^/HOST_ADDRESS_IPV4=/' > $FILE" |
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 |
NewerOlder